summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPádraig Brady <pbrady@redhat.com>2013-01-29 14:30:00 +0000
committerPádraig Brady <pbrady@redhat.com>2013-02-04 12:35:56 +0000
commit7843a554b02a86d3bc5e2c02e414d630a4be6e27 (patch)
treeff91ea7bb54c6332bad0218704de908bbc2367da
parentca7143cf2d81d7bdca55838d893dc33dbc953089 (diff)
downloadnova-7843a554b02a86d3bc5e2c02e414d630a4be6e27.tar.gz
nova-7843a554b02a86d3bc5e2c02e414d630a4be6e27.tar.xz
nova-7843a554b02a86d3bc5e2c02e414d630a4be6e27.zip
allow disabling file injection completely
With the libvirt_injection_partition config set to -2, file injection is avoided completely. This can be required if you want to make user specified files available from the metadata server (and config drive is not enabled), then you would want to avoid injection completely for performance reasons, but also to avoid boot failure if the injection itself failed. Flags: DocImpact Change-Id: I604f4189114515c70c58cf183622542c4633e44a
-rw-r--r--nova/virt/libvirt/driver.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py
index 0607e2df9..757e8a037 100644
--- a/nova/virt/libvirt/driver.py
+++ b/nova/virt/libvirt/driver.py
@@ -115,8 +115,8 @@ libvirt_opts = [
cfg.IntOpt('libvirt_inject_partition',
default=1,
help='The partition to inject to : '
- '-1 => inspect (libguestfs only), 0 => not partitioned, '
- '>0 => partition number'),
+ '-2 => disable, -1 => inspect (libguestfs only), '
+ '0 => not partitioned, >0 => partition number'),
cfg.BoolOpt('use_usb_tablet',
default=True,
help='Sync virtual and real mouse cursors in Windows VMs'),
@@ -1513,7 +1513,7 @@ class LibvirtDriver(driver.ComputeDriver):
raise
# File injection
- else:
+ elif CONF.libvirt_inject_partition != -2:
target_partition = None
if not instance['kernel_id']:
target_partition = CONF.libvirt_inject_partition