Change in vdsm[master]: Live Merge: work around racy libvirt pivot
alitke at redhat.com
alitke at redhat.com
Tue Mar 31 13:56:41 UTC 2015
Adam Litke has posted comments on this change.
Change subject: Live Merge: work around racy libvirt pivot
......................................................................
Patch Set 3:
(3 comments)
https://gerrit.ovirt.org/#/c/39303/3/vdsm/virt/vm.py
File vdsm/virt/vm.py:
Line 5121: # synchronized and we may start the vm with a stale volume in the
Line 5122: # future. See https://bugzilla.redhat.com/show_bug.cgi?id=1202719 for
Line 5123: # more details.
Line 5124: #
Line 5125: # TODO: Remove once we depend on a libvirt with this bug fixed.
> How about adding a whitespace here? The single line of code (origVols = ...
I'll just move the origVols below the lower comment. It's pertinent to the comment anyway.
Line 5126: origVols = sorted([x['volumeID'] for x in self.drive.volumeChain])
Line 5127: # We expect libvirt to show that the original leaf has been removed
Line 5128: # from the active volume chain.
Line 5129: expectedVols = origVols[:]
Line 5130: expectedVols.remove(self.drive.volumeID)
Line 5131:
Line 5132: alias = self.drive['alias']
Line 5133: self.vm.log.debug("Waiting for libvirt to update the XML after pivot "
Line 5134: "of drive %s completed", alias)
> I wonder if log.info is more appropriate
Sure, I don't mind bumping it.
Line 5135: while True:
Line 5136: # This operation should complete in either one or two iterations of
Line 5137: # this loop. Until libvirt updates the XML there is nothing to do
Line 5138: # but wait. While we wait we continue to tell engine that the job
Line 5141: # reconcileVolumeChain verb.
Line 5142: chains = self.vm._driveGetActualVolumeChain([self.drive])
Line 5143: if alias not in chains.keys():
Line 5144: raise RuntimeError("Failed to retrieve volume chain for "
Line 5145: "drive:%s. Pivot failed.", alias)
> "drive:%s" seems annoying how about "drive: %s" or even "drive %s" ?
ok.
Line 5146: curVols = sorted([entry.uuid for entry in chains[alias]])
Line 5147:
Line 5148: if curVols == origVols:
Line 5149: time.sleep(1)
--
To view, visit https://gerrit.ovirt.org/39303
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1e794622baf66c75cbe583be03a7b9a4a7e4883d
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadgett at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list