Repository navigation
xapi: Fix pool.join breaking due to dangling ref - #7365
Open
last-genius wants to merge 2 commits into
Open
last-genius wants to merge 2 commits into
last-genius wants to merge 2 commits into
Conversation
SR.destroy above has the same assert, duplicate it for forget as well. Forgetting a local cache SR currently leads to a dangling reference, which in turn prevents pool join from completing successfully. Signed-off-by: Andrii Sultanov <andriy.sultanov@vates.tech>
SR.forget can create a dangling reference in Host.local_cache_sr. During
pool join, this will prevent the supporter host from creating its host object
on the coordinator, which leads to a broken supporter host:
[debug||pool.join|xapi_pool] Found no host with uuid = 'SUPPORTER' on the master, so creating one.
[debug||pool.join|xapi_pool] Ignoring exception: Db_exn.DBCache_NotFound("missing row", "SR", "OpaqueRef:DANGLING")
[error||pool.join|backtrace] Raised Db_exn.DBCache_NotFound("missing row", "SR", "OpaqueRef:DANGLING")
[error||pool.join|backtrace] 1/5 xapi Raised at file ocaml/database/db_cache_impl.ml, line 151
[error||pool.join|backtrace] 2/5 xapi Called from file ocaml/xapi/db_actions.ml, line 14885
[error||pool.join|backtrace] 3/5 xapi Called from file ocaml/xapi/xapi_pool.ml, line 1101
[error||pool.join|backtrace] 4/5 xapi Called from file ocaml/xapi/xapi_pool.ml, line 1539
[error||pool.join|backtrace] 5/5 xapi Called from file lib/backtrace.ml, line 110
In case of an error, simply set Host.local_cache_sr to Ref.null and continue.
Thus, after the fix:
[debug||pool.join|xapi_pool] Found no host with uuid = 'SUPPORTER' on the master, so creating one.
[debug||pool.join|xapi_pool] Creating host object on master
Signed-off-by: Andrii Sultanov <andriy.sultanov@vates.tech>
Contributor
Author
|
I tested this manually - pool.join works after the fix and is broken without it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SR.forgetcan create a dangling reference inHost.local_cache_sr. Duringpool join, this will prevent the supporter host from creating its host object
on the coordinator, which leads to a broken supporter host:
In case of an error, simply set
Host.local_cache_srtoRef.nulland continue.Thus, after the fix: