Nir Soffer has uploaded a new change for review.
Change subject: vm: Gather disk replication private methods ......................................................................
vm: Gather disk replication private methods
Move disk replication private methods together, bellow the public methods without any code change.
Change-Id: I075636735ad9f2a53c2ed81ea20925a7bfda376d Signed-off-by: Nir Soffer nsoffer@redhat.com --- M vdsm/virt/vm.py 1 file changed, 30 insertions(+), 30 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/21/40221/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 2896c30..caefa62 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -2996,36 +2996,6 @@ (snapFlags & libvirt.VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE == libvirt.VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE)}
- def _setDiskReplica(self, drive, replica): - """ - This utility method is used to set the disk replication information - both in the live object used by vdsm and the vm configuration - dictionary that is stored on disk (so that the information is not - lost across restarts). - """ - if drive.isDiskReplicationInProgress(): - raise RuntimeError("Disk '%s' already has an ongoing " - "replication" % drive.name) - - disk = self._findConfDisk(drive.name) - with self._confLock: - disk['diskReplicate'] = replica - self.saveState() - - drive.diskReplicate = replica - - def _delDiskReplica(self, drive): - """ - This utility method is the inverse of _setDiskReplica, look at the - _setDiskReplica description for more information. - """ - del drive.diskReplicate - - disk = self._findConfDisk(drive.name) - with self._confLock: - del disk['diskReplicate'] - self.saveState() - def diskReplicateStart(self, srcDisk, dstDisk): try: drive = self._findDriveByUUIDs(srcDisk) @@ -3194,6 +3164,36 @@
self._dom.blockRebase(drive.name, base, flags=flags)
+ def _setDiskReplica(self, drive, replica): + """ + This utility method is used to set the disk replication information + both in the live object used by vdsm and the vm configuration + dictionary that is stored on disk (so that the information is not + lost across restarts). + """ + if drive.isDiskReplicationInProgress(): + raise RuntimeError("Disk '%s' already has an ongoing " + "replication" % drive.name) + + disk = self._findConfDisk(drive.name) + with self._confLock: + disk['diskReplicate'] = replica + self.saveState() + + drive.diskReplicate = replica + + def _delDiskReplica(self, drive): + """ + This utility method is the inverse of _setDiskReplica, look at the + _setDiskReplica description for more information. + """ + del drive.diskReplicate + + disk = self._findConfDisk(drive.name) + with self._confLock: + del disk['diskReplicate'] + self.saveState() + def _diskSizeExtendCow(self, drive, newSizeBytes): # Apparently this is what libvirt would do anyway, except that # it would fail on NFS when root_squash is enabled, see BZ#963881
automation@ovirt.org has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 1:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 1:
Build Started (1/2) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18144/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 1:
Build Started (2/2)
0 -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1374/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18144/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1374/ : 0
Nir Soffer has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 1: Verified+1
automation@ovirt.org has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 2:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 2:
Build Started (1/2) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18159/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 2:
Build Started (2/2)
0 -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1389/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18159/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1389/ : 0
automation@ovirt.org has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 3:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 3:
Build Started (1/2) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18185/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 3:
Build Started (2/2)
0 -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1415/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 3:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18185/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1415/ : 0
Freddy Rolland has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 3: Code-Review+1
Francesco Romani has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 3: Code-Review+1
Adam Litke has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 3: Code-Review+2
automation@ovirt.org has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 4:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 4:
Build Started (1/2) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18387/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 4:
Build Started (2/2) -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1617/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 4:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18387/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1617/ : SUCCESS
automation@ovirt.org has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 5:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Nir Soffer has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 5: Verified+1
Rebased manually after " vm: Simplify error handling in diskReplicateStart" changed.
The entire series was tested again on rhel 7.1 and fedora 21.
automation@ovirt.org has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 6:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 7:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Federico Simoncelli has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 7: Code-Review+2
automation@ovirt.org has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 8:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 9:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 10:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 11:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Nir Soffer has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 11: Verified+1
automation@ovirt.org has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 12:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 13:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 14:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 15:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Francesco Romani has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 15: Code-Review+1
little tidier, little nicer. Thanks!
Freddy Rolland has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 15: Code-Review+1
Dan Kenigsberg has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 15: Code-Review+2
Dan Kenigsberg has submitted this change and it was merged.
Change subject: vm: Gather disk replication private methods ......................................................................
vm: Gather disk replication private methods
Move disk replication private methods together, bellow the public methods without any code change.
Change-Id: I075636735ad9f2a53c2ed81ea20925a7bfda376d Signed-off-by: Nir Soffer nsoffer@redhat.com Reviewed-on: https://gerrit.ovirt.org/40221 Continuous-Integration: Jenkins CI Reviewed-by: Francesco Romani fromani@redhat.com Reviewed-by: Freddy Rolland frolland@redhat.com Reviewed-by: Dan Kenigsberg danken@redhat.com --- M vdsm/virt/vm.py 1 file changed, 43 insertions(+), 43 deletions(-)
Approvals: Nir Soffer: Verified Jenkins CI: Passed CI tests Dan Kenigsberg: Looks good to me, approved Freddy Rolland: Looks good to me, but someone else must approve Francesco Romani: Looks good to me, but someone else must approve
automation@ovirt.org has posted comments on this change.
Change subject: vm: Gather disk replication private methods ......................................................................
Patch Set 16:
* Update tracker::IGNORE, no Bug-Url found * Set MODIFIED::IGNORE, no Bug-Url found.
vdsm-patches@lists.fedorahosted.org