Simone Tiraboschi has posted comments on this change. Change subject: iscsi: checking image size against VG free space ......................................................................
Patch Set 1: (3 comments) http://gerrit.ovirt.org/#/c/34940/1/src/plugins/ovirt-hosted-engine-setup/vm/image.py File src/plugins/ovirt-hosted-engine-setup/vm/image.py: Line 44: """ Line 45: Line 46: def __init__(self, context): Line 47: super(Plugin, self).__init__(context=context) Line 48: self.serv = None > Why do you need this instance variable? You can get this from the environme Done Line 49: Line 50: @plugin.event( Line 51: stage=plugin.Stages.STAGE_INIT, Line 52: ) Line 81: ohostedcons.Stages.DIALOG_TITLES_E_VM, Line 82: ), Line 83: ) Line 84: def _disk_customization(self): Line 85: self.serv = self.environment[ohostedcons.VDSMEnv.VDS_CLI] > Initializing here create temporal dependency, function using self.serv will Done Line 86: interactive = self.environment[ Line 87: ohostedcons.StorageEnv.IMAGE_SIZE_GB Line 88: ] is None Line 89: Line 100: raise RuntimeError(vginfo['status']['message']) Line 101: vgfree = int(vginfo['info']['vgfree']) Line 102: vgmaxavailable = ( Line 103: vgfree / ohostedcons.Const.MINIMUM_SPACE_STORAGEDOMAIN_MB * Line 104: ohostedcons.Const.MINIMUM_SPACE_STORAGEDOMAIN_MB > Seems that you mean: vgavailable = vgfree / EXTENT_SIZE * EXTENT_SIZE, yes sorry :-) will the GiB be always a right multiple of the extent size? Line 105: ) Line 106: Line 107: valid = False Line 108: while not valid: -- To view, visit http://gerrit.ovirt.org/34940 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I17f861a053f6ac38983967ffb07ecca9ff9b8de1 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-hosted-engine-setup Gerrit-Branch: master Gerrit-Owner: Simone Tiraboschi <stira...@redhat.com> Gerrit-Reviewer: Lev Veyde <lve...@redhat.com> Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com> Gerrit-Reviewer: Simone Tiraboschi <stira...@redhat.com> Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches