Skip to content

Commit da352ed

Browse files
kk7dsElod Illes
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) (cherry picked from commit 67e5376)
1 parent d69d441 commit da352ed

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
@@ -438,6 +438,16 @@
438438
Howerver, if you don't use automatic cleaning, it can cause an
439439
extra delay before and Ironic node is available for building a
440440
new Nova instance.
441+
"""),
442+
cfg.BoolOpt(
443+
'disable_deep_image_inspection',
444+
default=False,
445+
help="""
446+
This disables the additional deep image inspection that the compute node does
447+
when downloading from glance. This includes backing-file, data-file, and
448+
known-features detection *before* passing the image to qemu-img. Generally,
449+
this inspection should be enabled for maximum safety, but this workaround
450+
option allows disabling it if there is a compatibility concern.
441451
"""),
442452
]
443453

0 commit comments

Comments
 (0)