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

Already on GitHub? Sign in to your account

CA-94406: VDI reset only on epoch begin #927

Merged
merged 2 commits into from Jan 20, 2013

Conversation

Projects
None yet
3 participants
Contributor

mcclurmc commented Nov 29, 2012

This resolves a bug where VDIs were reset after migration, because the act of
plugging a VBD will reset the VDI. A corresponding change in the storage
managers moves the reset_leaf call (which resets VDIs) to the SR command
"vdi_epoch_begin", which was recently added to Xapi's SMAPIv2.

This commit just adds the plumbing necessary to call epoch_begin and epoch_end
on VDIs in the storage layer. The corresponding commit in sm.hg adds those
commands to the storage layer, and also moves the reset_leaf call into
vdi_epoch_begin.

Signed-off-by: Mike McClurg mike.mcclurg@citrix.com

Mike McClurg CA-94406: VDI reset only on epoch begin
This resolves a bug where VDIs were reset after migration, because the act of
plugging a VBD will reset the VDI. A corresponding change in the storage
managers moves the reset_leaf call (which resets VDIs) to the SR command
"vdi_epoch_begin", which was recently added to Xapi's SMAPIv2.

This commit just adds the plumbing necessary to call epoch_begin and epoch_end
on VDIs in the storage layer. The corresponding commit in sm.hg adds those
commands to the storage layer, and also moves the reset_leaf call into
vdi_epoch_begin.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
a257229
Contributor

mcclurmc commented Nov 29, 2012

Don't merge yet! This depends on a change in sm.hg from @andreil.

Contributor

mcclurmc commented Nov 30, 2012

@andreil has pushed the changesets we depend on into trunk-storage. I recommend that we pull those changesets into trunk-ring3 manually, and then merge this pull request on Monday. After we get a build and BVT from trunk-ring3, we can merge the sm.hg and the xen-api.git changes into the Clearwater branch.

@djs55 djs55 commented on an outdated diff Dec 3, 2012

ocaml/xenops/xenops_server.ml
@@ -773,6 +774,9 @@ let rec atomics_of_operation = function
VM_destroy_device_model id;
] @ (List.map (fun vbd -> VBD_unplug (vbd.Vbd.id, true))
(VBD_DB.vbds id |> vbd_unplug_order)
+ ) @ (List.concat (List.map (fun vbd -> Opt.default [] (Opt.map
+ (fun x -> [ VBD_epoch_end (vbd.Vbd.id, x) ]) vbd.Vbd.backend))
@djs55

djs55 Dec 3, 2012

Collaborator

I think VBD_epoch_end needs to be in VM_poweroff and VM_reboot but not VM_shutdown -- if you look at VM_suspend it calls VM_shutdown. Probably we should rename "VM_shutdown" to something more domain-specific to avoid this kind of confusion in future!

Mike McClurg Remove erroneous extra call to VDI.epoch_end
Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
e0b2283
Owner

jonludlam commented Dec 17, 2012

Have you tested this latest fix with sxm?

Contributor

mcclurmc commented Dec 19, 2012

@jonludlam Did we decide that the error case would be with SXM from local LVM to local LVM?

Owner

jonludlam commented Dec 19, 2012

That's right

Owner

jonludlam commented Jan 15, 2013

@mcclurmc - ping!

Contributor

mcclurmc commented Jan 20, 2013

Sorry, @jonludlam! I tested this out local LVM to local LVM SXM, and everything worked fine. I think this is ready to merge.

Owner

jonludlam commented Jan 20, 2013

Good stuff. thanks!

@jonludlam jonludlam added a commit that referenced this pull request Jan 20, 2013

@jonludlam jonludlam Merge pull request #927 from mcclurmc/ca94406-vdi-reset-only-on-epoch…
…-trunk

CA-94406: VDI reset only on epoch begin
d93a500

@jonludlam jonludlam merged commit d93a500 into xapi-project:master Jan 20, 2013

1 check passed

default Merged build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment