Change in vdsm[master]: hsm: validate storage pool in prepareImage

Federico Simoncelli fsimonce at redhat.com
Tue Sep 23 13:02:52 UTC 2014


Federico Simoncelli has posted comments on this change.

Change subject: hsm: validate storage pool in prepareImage
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.ovirt.org/#/c/32502/1//COMMIT_MSG
Commit Message:

Line 5: CommitDate: 2014-09-04 17:09:03 +0000
Line 6: 
Line 7: hsm: validate storage pool in prepareImage
Line 8: 
Line 9: If the storage pool is specified (non-blank) we should validate that
> Could you explain why we should? If we don't use an arg, we can deprecate i
The spUUID use is hidden here, basically linkBCImage is returning a path that is spUUID-dependent (/rhev/data-center/<spuuid>/...).

Anyway until we keep spUUID, I think we should try to validate if it's either BLANK or a valid spUUID.

I fear regressions in vm.py (especially on negative flows when we lose the pool connection)... that's why I want this in asap to see if we're doing everything by the book there.
Line 10: we're connected.
Line 11: 
Line 12: Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1130995
Line 13: Change-Id: Ia85c2b2acedf7bdbadd930596987cc4828e24ddd


http://gerrit.ovirt.org/#/c/32502/1/vdsm/storage/hsm.py
File vdsm/storage/hsm.py:

Line 3230: 
Line 3231:         # If the pool is not blank we should make sure that we are connected
Line 3232:         # to the pool.
Line 3233:         if spUUID != sd.BLANK_UUID:
Line 3234:             self.getPool(spUUID)
> Shouldn't we do this before taking the lock?
Yes I was just keeping the same order of other verbs.
Line 3235: 
Line 3236:         imgVolumesInfo = []
Line 3237:         dom = sdCache.produce(sdUUID)
Line 3238:         allVols = dom.getAllVolumes()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia85c2b2acedf7bdbadd930596987cc4828e24ddd
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce 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