-
Couldn't load subscription status.
- Fork 293
CP-17506: Add new SM capability Vdi_mirror and update VDI and SR operations. #2679
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
Conversation
ocaml/xapi/xapi_vdi.ml
Outdated
| if List.exists (fun (_, op) -> op <> `copy) current_ops | ||
| then Some(Api_errors.other_operation_in_progress,["VDI"; _ref]) | ||
| if (List.exists (fun (_, op) -> op <> `copy) current_ops) & | ||
| not ((op = `destroy) & (List.exists (fun (_, op) -> op = `mirror) current_ops)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should break this clause out into a separate check for clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the infix & operator is deprecated for a while now; should be &&:
$ ocaml
OCaml version 4.02.1
# (&);;
Characters 0-3:
(&);;
^^^
Warning 3: deprecated: Pervasives.&
Use (&&) instead.
- : bool -> bool -> bool = <fun>|
Your commit message needs changing 'CP-17506: Add new capability Vdi_mirror for NutanixSR' to remove branding. Also it's the opposite of what we're trying to achieve with this change :) There's nothing specific to any SR in your pull-request and we'll be adding this capability to many existing SM plugins. |
Signed-off-by: Sharad Yadav <sharad.yadav@citrix.com>
Add new operation `VDI.mirror` for SR allowed_operations only when SR backend furnish Vdi_mirror capability Signed-off-by: Sharad Yadav <sharad.yadav@citrix.com>
|
I'll add the needs updating label because there are some minor fixups required. However, @jonludlam is going to give an additional review on this to check I've not missed anything. |
|
Looks good to me, once the bits @simonjbeaumont has pointed out have been done. |
|
Thanks @jonludlam. @sharady: Jon pointed out that we can't merge this until the existing storage drivers are advertising this capability. Have you created the ticket for them? Also, he suggests we run this change through the SXM XenRT suite before merging which I think is a good idea. |
Add new operation `mirror` to VDI operations. Call vdi_pool_migrate can perform VDI mirroring only when SR backend furnish Vdi_mirror capability Signed-off-by: Sharad Yadav <sharad.yadav@citrix.com>
|
Unblocking this PR, As SM changes has gone into |
No description provided.