Eduardo has posted comments on this change.

Change subject: hsm: use misc.parseBool instead of ad-hoc bool convertion
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(1 inline comment)

....................................................
File vdsm/storage/hsm.py
Line 1704:            raise se.VolumeGroupSizeError("VG size must be more than 
%s MiB" % str(MINIMALVGSIZE / constants.MEGAB))
Line 1705: 
Line 1706:         lvm.createVG(vgname, devices, 
blockSD.STORAGE_UNREADY_DOMAIN_TAG,
Line 1707:                      metadataSize=blockSD.VG_METADATASIZE,
Line 1708:                      force=misc.parseBool(force))
The actual implementation of misc.parseBool() is problematic.
Due to the lack of time was decided not to fix it (were 8 use cases once upon a 
time).
The dependency with the misc.parseBool() was avoided here intentionally.
The input should be sanitized in the wrappers, and we want to assert that '5' 
or 5 valued is not interpreted  as a True value in the force parameter, likes 
misc.parseBool() does.
Line 1709: 
Line 1710:         return dict(uuid=lvm.getVG(vgname).uuid)
Line 1711: 
Line 1712: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2ce0ec34d10380c8e1e8bd94e17ef436deb28579
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Eduardo <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to