Mark Wu has posted comments on this change.
Change subject: fix masterVersion 0 err when connecting storage pool
......................................................................
Patch Set 2:
I think we need clarify that the parameter definition of API connectStoragePool. It seems
that we intend to use some special value to indicate that these parameters can be
retrieved from pool metadata and the client needn't pass them. If my understanding is
correct, those parameters should be given a default value in the API definition.
Do we want to use None as the special value? I found in vdsClient.py, the default value
for masterVersion is set to -1 if no value given from command line. Can anyone explain
what it expects by setting masterVersion to -1?
I am also confused about the following code snippet:
<snip>
pool = sp.StoragePool(spUUID, self.taskMng)
if not hostID or not scsiKey or not msdUUID or not masterVersion:
hostID, scsiKey, msdUUID, masterVersion = pool.getPoolParams()
res = pool.connect(hostID, scsiKey, msdUUID, masterVersion)
if res:
self.pools[spUUID] = pool
return res
</snip>
getPoolParams() is called before pool connection, the same problem described in commit
message will happen. So it should be a bug too. Please correct me if I am wrong.
--
To view, visit
http://gerrit.ovirt.org/2679
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I7228bd340a4281400e16c26b311d9945dd5ce597
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Adam Litke <agl(a)us.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Royce Lv <lvroyce(a)linux.vnet.ibm.com>