Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[477 idl part2] SR.create API change and sharable flag #3433

Merged
merged 6 commits into from
Feb 8, 2018

Conversation

edwintorok
Copy link
Contributor

This is part of the SMAPIv3 interface change from feature/REQ477/master branch.

Also expose the sharable field to SMAPIv3 (required for the HA statefile and redolog), internally XAPI already tracked this field. SMAPIv1 looked in sm-config to find this out, no change there.

This PR needs to be merged together with these ones otherwise the build breaks:
xapi-project/sm-cli#26
xapi-project/xapi-storage#70
xapi-project/xapi-storage-script#56
xapi-project/xcp-idl#202

Build on internal branch private/edvint/477-idl-part2. The feature/REQ477/master branch that these commits were part of had 2 full nightlies run on it, please let me know what kind of tests should be run on these reduced set of changes.

jonludlam and others added 4 commits February 5, 2018 17:34
Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
SMAPIv3 backends need to know whether the VDI is sharable.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
This update_vdis function is called from places like SR.scan and
VDI.update.

Now that we have SMAPIv3 plugins that are not backed by the database,
xapi really needs to check the returned vdi_info records and update the
database if necessary. Previously the SMAPIv1 plugins updated xapi's
database, so the whole code in update_vdis did nothing. But now with
SMAPIv3 plugins, we have to ensure that we propagate the information
from the vdi_info records returned by the SM layer into the database,
because it may not be in the database, and it may be different from
what's in the database.

This change does not break SMAPIv1 plugins, because the
vdi_info_of_vdi_rec function in storage_access.ml fetches the correct
VDI.sharable field from xapi's database, so in case of SMAPIv1 plugins,
this should be a no-op. This vdi_info_of_vdi_rec is the function we use
in SR.scan and VDI.stat in our SMAPIv1<->SMAPIv2 translator in
storage_access.ml to return a list of vdi_info's, or a single vdi_info,
respectively, from xapi's database.

Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
edwintorok and others added 2 commits February 6, 2018 14:59
Signed-off-by: Edwin Török <edvin.torok@citrix.com>
…nfig after SR.create

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
@edwintorok edwintorok merged commit 7a889ec into xapi-project:master Feb 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants