Ayal Baron has posted comments on this change.
Change subject: sp: move reconnection info check to StoragePool
......................................................................
Patch Set 1: Code-Review-1
(2 comments)
....................................................
File vdsm/storage/sp.py
Line 676: self.log.info("Connect host #%s to the storage pool %s with
master "
Line 677: "domain: %s (ver = %s)" %
Line 678: (hostID, self.spUUID, msdUUID, masterVersion))
Line 679:
Line 680: if not hostID or not scsiKey or not msdUUID or not
masterVersion:
this should come after 'if not os.path.exists' and
self._saveReconnectInformation should be in the 'else'
if not hostID or ...
hostID, ...
...
else:
self._saveReconnectInformation
Line 681: hostID, scsiKey, msdUUID, masterVersion =
self.getPoolParams()
Line 682: self.log.info("Using saved connection parameters:
hostID=%s"
Line 683: "scsiKey=%s, msdUUID=%s, masterVersion=%s",
Line 684: hostID, scsiKey, msdUUID, masterVersion)
Line 740: def getPoolParams(self):
Line 741: with open(self._poolFile, "r") as f:
Line 742: poolInfo = dict((x.strip().split("=", 1) for x in f))
Line 743: return tuple(poolInfo.get(x) for x in
Line 744: ("hostId", "scsiKey", "msdUUID",
"masterVersion"))
previously the code exploded on the return statement if one of these was not
available, now we return None. this means that in the least, connect should
validate that all are present or something
Line 745:
Line 746: @unsecured
Line 747: def createMaster(self, poolName, domain, masterVersion,
leaseParams):
Line 748: """
--
To view, visit http://gerrit.ovirt.org/21424
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia57afc04db02b6c15633d09349a55b3ff5ae7fda
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches