Skip to content

Commit 67e5376

Browse files
kk7dsgibizer
authored andcommitted
Check images with format_inspector for safety
It has been asserted that we should not be calling qemu-img info on untrusted files. That means we need to know if they have a backing_file, data_file or other unsafe configuration *before* we use qemu-img to probe or convert them. This grafts glance's format_inspector module into nova/images so we can use it to check the file early for safety. The expectation is that this will be moved to oslo.utils (or something) later and thus we will just delete the file from nova and change our import when that happens. NOTE: This includes whitespace changes from the glance version of format_inspector.py because of autopep8 demands. Change-Id: Iaefbe41b4c4bf0cf95d8f621653fdf65062aaa59 Closes-Bug: #2059809 (cherry picked from commit 9cdce71) (cherry picked from commit f07fa55) (cherry picked from commit 0acf5ee)
1 parent af4d819 commit 67e5376

File tree

5 files changed

+1121
-9
lines changed

5 files changed

+1121
-9
lines changed

nova/conf/workarounds.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,16 @@
460460
Howerver, if you don't use automatic cleaning, it can cause an
461461
extra delay before and Ironic node is available for building a
462462
new Nova instance.
463+
"""),
464+
cfg.BoolOpt(
465+
'disable_deep_image_inspection',
466+
default=False,
467+
help="""
468+
This disables the additional deep image inspection that the compute node does
469+
when downloading from glance. This includes backing-file, data-file, and
470+
known-features detection *before* passing the image to qemu-img. Generally,
471+
this inspection should be enabled for maximum safety, but this workaround
472+
option allows disabling it if there is a compatibility concern.
463473
"""),
464474
]
465475

0 commit comments

Comments
 (0)