Change in vdsm[master]: Live Merge: Resolve unknown merge status in vdsm after host ...

alitke at redhat.com alitke at redhat.com
Wed Aug 20 19:03:36 UTC 2014


Adam Litke has posted comments on this change.

Change subject: Live Merge: Resolve unknown merge status in vdsm after host crash
......................................................................


Patch Set 5:

(2 comments)

http://gerrit.ovirt.org/#/c/31267/5/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 5321:         with self._jobsLock:
Line 5322:             for storedJob in self.conf['_blockJobs'].values():
Line 5323:                 jobID = storedJob['jobID']
Line 5324:                 cleanThread = self._liveMergeCleanupThreads.get(jobID)
Line 5325:                 if cleanThread and cleanThread.isFinalized():
> Previously we handled only successful jobs, and now we handle only successf
yes
Line 5326:                     # Handle successfully cleaned jobs early because the job
Line 5327:                     # just needs to be untracked and the stored disk info might
Line 5328:                     # be stale anyway (ie. after active layer commit).
Line 5329:                     self.untrackBlockJob(jobID)


Line 5655:         """
Line 5656:         Returns True if the last cleanup phase succeeded and the job can be
Line 5657:         removed.
Line 5658:         """
Line 5659:         return self.success and self.mode == self.MODE_CLEANUP
> This new interface and its handling is very confusing. I don't see here any
A live merge can have one or two phases depending on if it's an internal volume or the active layer that is being merged.

The phases are:
- MODE_PIVOT: In this phase, libvirt is mirroring writes to the old active layer and also to it's parent (which will become the new active layer).  We ask libvirt to pivot from old to new.

- MODE_CLEANUP: At this point, libvirt has stopped reporting the job and we know it's finished.  We need to synchronize vdsm's VM object metadata and also the volume chain info kept on the storage.  Once completed we can stop tracking the job ourselves.

For internal volumes we have only MODE_CLEANUP.  For active layer jobs we have MODE_PIVOT followed by MODE_CLEANUP.
Line 5660: 
Line 5661: 
Line 5662: def _devicesWithAlias(domXML):
Line 5663:     return vmxml.filter_devices_with_alias(vmxml.all_devices(domXML))


-- 
To view, visit http://gerrit.ovirt.org/31267
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1ca5e4ad67216d30c3149a53c2ea65cc97601bfc
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke 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: 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