Nir Soffer has posted comments on this change. Change subject: iscsi: checking image size against VG free space ......................................................................
Patch Set 10: (3 comments) The commit message need little fix and reformatting and the comments are misleading. http://gerrit.ovirt.org/#/c/34940/10//COMMIT_MSG Commit Message: Line 10: disk image so we need to check if we have enough Line 11: free space before starting. Line 12: We need to validate the image size before creating the VG Line 13: so we cannot simply check the VG free space but we need Line 14: a rought estimate of its overhead rought -> rough While you fix the typo, it would be nice if you also keep these rules when formatting the commit message: - Wrap lines at 72-80 characters - Empty line between paragraphs Line 15: Line 16: Change-Id: I17f861a053f6ac38983967ffb07ecca9ff9b8de1 Line 17: Bug-Url: https://bugzilla.redhat.com/1142710 http://gerrit.ovirt.org/#/c/34940/10/src/plugins/ovirt-hosted-engine-setup/vm/image.py File src/plugins/ovirt-hosted-engine-setup/vm/image.py: Line 89: estimate_gb = None Line 90: if self.environment[ Line 91: ohostedcons.StorageEnv.BDEVICE_SIZE_GB Line 92: ] is not None: Line 93: # conservative estimate You removed the parts that added value to the reader, and left the obvious parts; It is clear that this is an estimate, what this comment can add is *why* we need to estimate now, and when we can get the real value. Your old comment included this info. Line 94: estimate_gb = int(self.environment[ Line 95: ohostedcons.StorageEnv.BDEVICE_SIZE_GB Line 96: ]) - ohostedcons.Const.STORAGE_DOMAIN_OVERHEAD_GIB Line 97: Line 185: Line 186: if self.environment[ohostedcons.StorageEnv.DOMAIN_TYPE] in ( Line 187: ohostedcons.DomainTypes.ISCSI, Line 188: ): Line 189: # Double check for available VG space on the block device where This is not double check - this is the first check. Before we had only an estimate, and only here we can get the real value. Line 190: # we have to preallocate the image Line 191: vginfo = serv.s.getVGInfo( Line 192: self.environment[ohostedcons.StorageEnv.VG_UUID] Line 193: ) -- 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: 10 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