Skip to content

Commit

Permalink
Add timeout 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 Oct 21, 2022
1 parent bf31221 commit e00b91b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions virttest/qemu_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -986,9 +986,13 @@ 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 = convert_params.get_numeric("image_conversion_timeout", -1)
timeout = None if timeout == -1 else timeout

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 e00b91b

Please sign in to comment.