Change in vdsm[master]: sp: consolidate getMasterVersion in one method

abaron at redhat.com abaron at redhat.com
Tue Dec 17 22:02:19 UTC 2013


Ayal Baron has posted comments on this change.

Change subject: sp: consolidate getMasterVersion in one method
......................................................................


Patch Set 4:

(1 comment)

....................................................
File vdsm/storage/sp.py
Line 1503:             self.log.error("Requested master domain %s does not belong to pool"
Line 1504:                            " %s", msdUUID, self.spUUID)
Line 1505:             raise se.StoragePoolWrongMaster(self.spUUID, msdUUID)
Line 1506: 
Line 1507:         version = self.getMasterVersion(useMasterDomain=domain)
optionally passing the domain in this call is really bugging me and it made me think whether this version check shouldn't actually be moved into domain.isMaster.

e.g.
if not domain.isMaster(expectedVersion = masterVersion):
    self.log.error("Requested domain %s is not marked as a master domain or its version is wrong", msdUUID).

If you think about it, master domain is a combination of role and version so I think this makes sense.
Line 1508:         if version != int(masterVersion):
Line 1509:             self.log.error("Requested master domain %s does not have expected "
Line 1510:                            "version %s it is version %s",
Line 1511:                            msdUUID, masterVersion, version)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8a055c9eb21cc5681d1f9afde5e7eab899aa65c0
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgotliv at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list