Skip to content

Conversation

@sharady
Copy link
Contributor

@sharady sharady commented Jun 21, 2016

No description provided.

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))
Copy link
Contributor

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.

Copy link
Contributor

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>

@simonjbeaumont
Copy link
Contributor

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.

sharady added 2 commits June 21, 2016 12:06
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>
@simonjbeaumont
Copy link
Contributor

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.

@jonludlam
Copy link
Contributor

Looks good to me, once the bits @simonjbeaumont has pointed out have been done.

@simonjbeaumont
Copy link
Contributor

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>
@sharady sharady changed the title CP-17506: Block vdi-pool-migrate on the NutanixSR CP-17506: Add new SM capability Vdi_mirror and update VDI and SR operations. Jun 22, 2016
@sharady
Copy link
Contributor Author

sharady commented Jun 23, 2016

Unblocking this PR, As SM changes has gone into trunk-ring3/sm.pg.git as part of CP-17867.

@simonjbeaumont simonjbeaumont merged commit 9415c46 into xapi-project:master Jun 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants