CP-540722: Define the MIRROR interface to be implemented by Storage_smapi{v1,v3}_migrate.ml#6404
Merged
Merged
Conversation
3ed0aba to
743f149
Compare
psafont
approved these changes
Apr 3, 2025
743f149 to
3267ec3
Compare
`import_activate` and `get_nbd_server` is more like datapath functions so I am moving them into the `DATA` module whereas they were previoulsy in `DATA.MIRROR` module. Reserve `DATA.MIRROR` only for storage migrate functionalities that is implemented in the xapi layer but no in the storage layer. Signed-off-by: Vincent Liu <shuntian.liu2@cloud.com>
There are several functions in storage_interface and hence storage_mux, such as `start`, `stop`, `list`. These functions are currently not multiplexed but just called directly into storage_migrate. In fact, they are unlikely to be multiplexed because they use the `State` module in storage migrate, which is a in memory hashtable in xapi, not accessible by xapi-storage-script. So remove them from the storage interface, and callers of these functions can call them from storage_migrate directly rather than going through the storage interface. None of these are remote functions so no need to worry about backwards compatibility. Signed-off-by: Vincent Liu <shuntian.liu2@cloud.com>
The `send_start` function is a subroutine inside the `Storage_migrate.start` function, which takes the mirror prepared by the `receive_start` and initiates mirroring to the remote VDI. This commit only defines the interface, which means this function is currently unused. Signed-off-by: Vincent Liu <shuntian.liu2@cloud.com>
Just so that they type check, some of the functions are still unimplemented, and these functions are still unused. Signed-off-by: Vincent Liu <shuntian.liu2@cloud.com>
Contributor
|
Would suggest to replace:
|
3267ec3 to
36d41aa
Compare
Signed-off-by: Vincent Liu <shuntian.liu2@cloud.com>
MIRROR interface to be implemented by Storage_smapi{v1,v3}_migrate.mlMIRROR interface to be implemented by Storage_smapi{v1,v3}_migrate.ml
lindig
approved these changes
Apr 8, 2025
| let nearest = | ||
| List.fold_left | ||
| (fun acc content_id -> | ||
| match acc with |
Contributor
There was a problem hiding this comment.
Is this really a fold? I understand it returns the first acc it finds - so It is more like a find.
Contributor
Author
There was a problem hiding this comment.
Yeah, problem of using List.find is that it will return an element in similar while what we want is an element in vdis
Member
There was a problem hiding this comment.
Talked it with Vincent, the List.finds can't be switched, because ordering is important
Signed-off-by: Vincent Liu <shuntian.liu2@cloud.com>
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Apr 17, 2025
This is a continuation of #6404, which completes the refactoring of SXM code for the new architecture. I expect there to be no functional change, although there is a significant change of how error handling is done. The last couple of commits contain the design for this PR. To be continued...
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.
This is a continuation of #6378: the refactoring effort of SXM code.
To be continued...