Skip to content

Commit

Permalink
Add timeout and allow space containing paths for "qemu-img convert"
Browse files Browse the repository at this point in the history
Signed-off-by: Plamen Dimitrov <plamen.dimitrov@intra2net.com>
  • Loading branch information
pevogam committed Sep 9, 2022
1 parent bf31221 commit 5fc7df3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions virttest/qemu_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ class QemuImg(storage.QemuImg):
"{target_image_format} {options} {convert_sparse_size} "
"{rate_limit} {convert_target_is_zero!b} "
"{convert_backing_file} "
"{image_filename} {target_image_filename} "
"'{image_filename}' '{target_image_filename}' "
"{target_image_opts}")
commit_cmd = ("commit {secret_object} {image_format} {cache_mode} "
"{backing_file} {commit_drop!b} {image_filename} "
Expand Down Expand Up @@ -986,9 +986,12 @@ def convert(self, params, root_dir, cache_mode=None,
convert_cmd = self.image_cmd + " " + \
self._cmd_formatter.format(self.convert_cmd, **cmd_dict)

LOG.info("Convert image %s from %s to %s", self.image_filename,
self.image_format, convert_image.image_format)
process.run(convert_cmd)
timeout = params.get_numeric("conversion_timeout", 12000)

LOG.info("Convert image %s from %s to %s with timeout %s",
self.image_filename, self.image_format,
convert_image.image_format, timeout)
process.run(convert_cmd, timeout=timeout)
if convert_image.encryption_config.key_secret:
convert_image.encryption_config.key_secret.save_to_file()

Expand Down

0 comments on commit 5fc7df3

Please sign in to comment.