Skip to content

Commit 6d3670a

Browse files
author
Matt Riedemann
committed
Add a way to enable file injection for nova/tempest
File injection is disabled by default for the libvirt driver in nova. This adds a variable to enable file injection for the libvirt driver and is also used to configure tempest.conf for running personality tests. Change-Id: I34790fadeffd6e3fdc65bd9feed3d6e62316896c Related-Bug: #1598581
1 parent 9079a40 commit 6d3670a

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

lib/nova_plugins/hypervisor-libvirt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ function configure_nova_hypervisor {
5757
iniset $NOVA_CONF vnc enabled "false"
5858
fi
5959

60+
if isset ENABLE_FILE_INJECTION; then
61+
if [ "$ENABLE_FILE_INJECTION" == "True" ]; then
62+
# -1 means use libguestfs to inspect the guest OS image for the
63+
# root partition to use for file injection.
64+
iniset $NOVA_CONF libvirt inject_partition '-1'
65+
fi
66+
fi
67+
6068
if [[ "$LIBVIRT_TYPE" = "parallels" ]]; then
6169
iniset $NOVA_CONF libvirt connection_uri "parallels+unix:///system"
6270
iniset $NOVA_CONF libvirt images_type "ploop"

lib/tempest

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ function configure_tempest {
348348
iniset $TEMPEST_CONFIG compute max_microversion $tempest_compute_max_microversion
349349
fi
350350

351+
iniset $TEMPEST_CONFIG compute-feature-enabled personality ${ENABLE_FILE_INJECTION:-False}
351352
iniset $TEMPEST_CONFIG compute-feature-enabled resize True
352353
iniset $TEMPEST_CONFIG compute-feature-enabled live_migration ${LIVE_MIGRATION_AVAILABLE:-False}
353354
iniset $TEMPEST_CONFIG compute-feature-enabled change_password False

0 commit comments

Comments
 (0)