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 #202

Merged
merged 4 commits into from
Feb 8, 2018
Merged

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

merged 4 commits into from
Feb 8, 2018

Conversation

edwintorok
Copy link
Contributor

@edwintorok edwintorok commented Feb 6, 2018

This is part of the SMAPIv3 interface change from feature/REQ477/master branch (that branch had 2 full nightlies run on it).

SMAPIv3 requires a uuid returned from SR.create, this PR together with the one for XAPI changes SMAPIv2 to allow for that (SMAPIv1 is not affected).
This is a breaking API change for SMAPIv3 plugins!

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/xen-api#3433

I've done a build of these changes separately on the internal branch private/edvint/477-idl-part2

jonludlam and others added 4 commits February 6, 2018 10:23
Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
There is a default_vdi_info in Storage_interface and another in Storage_client.
Just define it in one place to make updating fields easier and avoid diverging.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
The HA statefile and redo log needs to be attachable from multiple hosts, which
used to be done as a side-effect of sm-config:type=raw in SMAPIv1.
For SMAPIv3 we'll introduce a sharable flag in the vdi creation phase to make
the semantics clearer, because  for GFS2 what matters is not whether the file
format is raw or not, but whether it can be attached from multiple hosts.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
…ng place

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
@coveralls
Copy link

Coverage Status

Coverage remained the same at 61.934% when pulling 362a463 on edwintorok:477-idl-part2 into bda1536 on xapi-project:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 61.934% when pulling 362a463 on edwintorok:477-idl-part2 into bda1536 on xapi-project:master.

@@ -266,7 +271,7 @@ module SR = struct
(** Functions which manipulate SRs *)

(** [create dbg sr name_label name_description device_config physical_size] creates an sr with id [sr] *)
external create : dbg:debug_info -> sr:sr -> name_label:string -> name_description:string -> device_config:(string * string) list -> physical_size:int64 -> unit = ""
external create : dbg:debug_info -> sr:sr -> name_label:string -> name_description:string -> device_config:(string * string) list -> physical_size:int64 -> (string * string) list = ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it returns the UUID as a string * string list? 😮

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It returns an updated device-config, containing the UUID. I think it is the equivalent of { foo with uuid = ...}, except device-config is a string map not a regular type.

@edwintorok edwintorok merged commit 236beab into xapi-project:master Feb 8, 2018
@edwintorok edwintorok deleted the 477-idl-part2 branch February 13, 2018 13:42
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.

None yet

4 participants