CA-426596: Supports SM feature removing#7042
Merged
changlei-li merged 2 commits intoxapi-project:26.1-lcmfrom Apr 29, 2026
Merged
CA-426596: Supports SM feature removing#7042changlei-li merged 2 commits intoxapi-project:26.1-lcmfrom
changlei-li merged 2 commits intoxapi-project:26.1-lcmfrom
Conversation
In current xapi_sm.ml, the quired new sm features at XAPI start goes to pending_features. After all hosts reporting the new sm features, they are set in xapi-db. However, when the sm feature is removed, the item still exists. For example, xapi-storage-plugins-xfs remove SR_PROB as it is not implemented, but XAPI doesn't detect it. It leads to fresh-installed host (withour xfs SR_PROB) can't join the pool (with xfs SR_PROB) due to POOL_JOINING_SM_FEATURES_INCOMPATIBLE. Considering the pending_features, it wants to keep the minimal common features all over the hosts. As the same principle, the removed feature shall be removed immediately in the pool-level sm table. If one host reports the feature is removed, it should be removed from pool-level db. Signed-off-by: Changlei Li <changlei.li@citrix.com>
Signed-off-by: Changlei Li <changlei.li@citrix.com>
557ac3b to
f44069e
Compare
Contributor
Author
|
Test: before xfs plugin update: after xfs plugin update (and restart xapi): |
minglumlu
reviewed
Apr 29, 2026
| List.iter | ||
| (fun (f, v) -> debug "%s: removing features %s:%Ld" __FUNCTION__ f v) | ||
| removed_features ; | ||
| let retained_features = |
Member
There was a problem hiding this comment.
Just an observation: the retained_features and removed_features are just the partition of whether each feature in existing_features being in query_features or not.
Member
There was a problem hiding this comment.
This can be done in ocaml with
let retained_features, removed_features =
List.partition (fun x -> List.mem x query_features) existing_features
in
minglumlu
approved these changes
Apr 29, 2026
lindig
approved these changes
Apr 29, 2026
pull Bot
pushed a commit
to acefei/xen-api
that referenced
this pull request
Apr 29, 2026
In current xapi_sm.ml, the quired new sm features at XAPI start goes to pending_features. After all hosts reporting the new sm features, they are set in xapi-db. However, when the sm feature is removed, the item still exists. For example, xapi-storage-plugins-xfs remove SR_PROB as it is not implemented, but XAPI doesn't detect it. It leads to fresh-installed host (withour xfs SR_PROB) can't join the pool (with xfs SR_PROB) due to POOL_JOINING_SM_FEATURES_INCOMPATIBLE. Considering the pending_features, it wants to keep the minimal common features all over the hosts. As the same principle, the removed feature shall be removed immediately in the pool-level sm table. If one host reports the feature is removed, it should be removed from pool-level db. This the forward port of PR xapi-project#7042.
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.
In current xapi_sm.ml, the quired new sm features at XAPI start goes to pending_features. After all hosts reporting the new sm features, they are set in xapi-db.
However, when the sm feature is removed, the item still exists. For example, xapi-storage-plugins-xfs remove SR_PROB as it is not implemented, but XAPI doesn't detect it. It leads to fresh-installed host (withour xfs SR_PROB) can't join the pool (with xfs SR_PROB) due to POOL_JOINING_SM_FEATURES_INCOMPATIBLE.
Considering the pending_features, it wants to keep the minimal common features all over the hosts. As the same principle, the removed feature shall be removed immediately in the pool-level sm table. If one host reports the feature is removed, it should be removed from pool-level db.