Move flag in libvirt's utils to the libvirt group
This change continues moving libvirt specific flags into a libvirt specific configuration group. Progresses blueprint libvirt-opts-group. DocImpact: the following flag is now in the libvirt group: snapshot_compression (formerly libvirt_snapshot_compression) Change-Id: I9eddec5cdb72a1313e044a3c7c6d75e8ad34533a
This commit is contained in:
parent
25a7de2054
commit
2ea3cab1ec
|
@ -1939,15 +1939,6 @@
|
||||||
#force_raw_images=true
|
#force_raw_images=true
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Options defined in nova.virt.libvirt.utils
|
|
||||||
#
|
|
||||||
|
|
||||||
# Compress snapshot images when possible. This currently
|
|
||||||
# applies exclusively to qcow2 images (boolean value)
|
|
||||||
#libvirt_snapshot_compression=false
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options defined in nova.virt.libvirt.vif
|
# Options defined in nova.virt.libvirt.vif
|
||||||
#
|
#
|
||||||
|
@ -2674,6 +2665,15 @@
|
||||||
#checksum_interval_seconds=3600
|
#checksum_interval_seconds=3600
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Options defined in nova.virt.libvirt.utils
|
||||||
|
#
|
||||||
|
|
||||||
|
# Compress snapshot images when possible. This currently
|
||||||
|
# applies exclusively to qcow2 images (boolean value)
|
||||||
|
#snapshot_compression=false
|
||||||
|
|
||||||
|
|
||||||
[baremetal]
|
[baremetal]
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -35,14 +35,16 @@ from nova import utils
|
||||||
from nova.virt import images
|
from nova.virt import images
|
||||||
|
|
||||||
libvirt_opts = [
|
libvirt_opts = [
|
||||||
cfg.BoolOpt('libvirt_snapshot_compression',
|
cfg.BoolOpt('snapshot_compression',
|
||||||
default=False,
|
default=False,
|
||||||
help='Compress snapshot images when possible. This '
|
help='Compress snapshot images when possible. This '
|
||||||
'currently applies exclusively to qcow2 images'),
|
'currently applies exclusively to qcow2 images',
|
||||||
|
deprecated_group='DEFAULT',
|
||||||
|
deprecated_name='libvirt_snashot_compression'),
|
||||||
]
|
]
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.register_opts(libvirt_opts)
|
CONF.register_opts(libvirt_opts, 'libvirt')
|
||||||
CONF.import_opt('instances_path', 'nova.compute.manager')
|
CONF.import_opt('instances_path', 'nova.compute.manager')
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -519,7 +521,7 @@ def extract_snapshot(disk_path, source_fmt, out_path, dest_fmt):
|
||||||
qemu_img_cmd = ('qemu-img', 'convert', '-f', source_fmt, '-O', dest_fmt)
|
qemu_img_cmd = ('qemu-img', 'convert', '-f', source_fmt, '-O', dest_fmt)
|
||||||
|
|
||||||
# Conditionally enable compression of snapshots.
|
# Conditionally enable compression of snapshots.
|
||||||
if CONF.libvirt_snapshot_compression and dest_fmt == "qcow2":
|
if CONF.libvirt.snapshot_compression and dest_fmt == "qcow2":
|
||||||
qemu_img_cmd += ('-c',)
|
qemu_img_cmd += ('-c',)
|
||||||
|
|
||||||
qemu_img_cmd += (disk_path, out_path)
|
qemu_img_cmd += (disk_path, out_path)
|
||||||
|
|
Loading…
Reference in New Issue