Simone Tiraboschi has uploaded a new change for review. Change subject: upload: adding --ignore-lsc CLI options ......................................................................
upload: adding --ignore-lsc CLI options .gz images are decompressed locally before uploading them. gzip doesn't provide accurate informations about the real uncompressed file size and so the free space on local tmp dir are checked against the maximum image size as stated in the image metadata. This is, with thin disk images, is often too conservative. Adding a CLI option to ignore this kind of errors. Change-Id: I8ae3e90c4abd832891088899e713c26eac495a4d Bug-Url: https://bugzilla.redhat.com/1119798 Signed-off-by: Simone Tiraboschi <[email protected]> --- M src/__main__.py 1 file changed, 21 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-image-uploader refs/changes/05/31005/1 diff --git a/src/__main__.py b/src/__main__.py index 4a38d96..d19cb33 100644 --- a/src/__main__.py +++ b/src/__main__.py @@ -1872,7 +1872,7 @@ ovf_file, ovf_extract_dir ) - if retVal: + if retVal or conf.get('ignorelsc'): if self.unpack_ovf(ovf_file, ovf_extract_dir): if (self.update_ovf_xml(ovf_extract_dir)): self.copy_files_nfs( @@ -1890,7 +1890,12 @@ logging.error( _( "Not enough space in {tempdir}:" - " {size_needed}Mb are needed." + " up to {size_needed}Mb are needed. " + "Either free it up or supply " + "the --ignore-lsc option to " + "ignore this error if you are sure " + "that the free space is enough " + "to decompress the image." ).format( tempdir=tempfile.gettempdir(), size_needed=size_needed_mb @@ -2068,6 +2073,20 @@ default=False ) + parser.add_option( + "", + "--ignore-lsc", + dest="ignorelsc", + help=_( + "ignore free space errors on local " + "{tempdir} filesystem (default=off)" + ).format( + tempdir=tempfile.gettempdir(), + ), + action="store_true", + default=False + ) + engine_group = OptionGroup( parser, _("oVirt Engine Configuration"), -- To view, visit http://gerrit.ovirt.org/31005 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8ae3e90c4abd832891088899e713c26eac495a4d Gerrit-PatchSet: 1 Gerrit-Project: ovirt-image-uploader Gerrit-Branch: master Gerrit-Owner: Simone Tiraboschi <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
