Configurable timeout of the QEMU img conversion
Instead of having a hardcoded value the conversion prlimits are now operator configurable. These settings have always been arbitrary as it depends on the environment. Change-Id: I462cecc3152bf838b7d42d5abc3ca31610567e5e Closes-Bug: #1705340
This commit is contained in:
parent
8a9a4be968
commit
f3ebdd56c5
@ -63,14 +63,20 @@ image_opts = [
|
||||
default=True,
|
||||
help='When possible, compress images uploaded '
|
||||
'to the image service'),
|
||||
cfg.IntOpt('image_conversion_cpu_limit',
|
||||
default=60,
|
||||
help='CPU time limit in seconds to convert the image'),
|
||||
cfg.IntOpt('image_conversion_address_space_limit',
|
||||
default=1,
|
||||
help='Address space limit in gigabytes to convert the image'),
|
||||
]
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(image_opts)
|
||||
|
||||
QEMU_IMG_LIMITS = processutils.ProcessLimits(
|
||||
cpu_time=30,
|
||||
address_space=1 * units.Gi)
|
||||
cpu_time=CONF.image_conversion_cpu_limit,
|
||||
address_space=CONF.image_conversion_address_space_limit * units.Gi)
|
||||
|
||||
|
||||
QEMU_IMG_FORMAT_MAP = {
|
||||
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Added the ``image_conversion_cpu_limit`` and
|
||||
``image_conversion_address_space_limit`` as configurable parameters. This
|
||||
adds configurability to the image conversion process to prevent the process
|
||||
from timing out when converting larger images.
|
Loading…
Reference in New Issue
Block a user