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
| ... | ... |
@@ -57,6 +57,14 @@ function configure_nova_hypervisor {
|
| 57 | 57 |
iniset $NOVA_CONF vnc enabled "false" |
| 58 | 58 |
fi |
| 59 | 59 |
|
| 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 |
+ |
|
| 60 | 68 |
if [[ "$LIBVIRT_TYPE" = "parallels" ]]; then |
| 61 | 69 |
iniset $NOVA_CONF libvirt connection_uri "parallels+unix:///system" |
| 62 | 70 |
iniset $NOVA_CONF libvirt images_type "ploop" |
| ... | ... |
@@ -348,6 +348,7 @@ function configure_tempest {
|
| 348 | 348 |
iniset $TEMPEST_CONFIG compute max_microversion $tempest_compute_max_microversion |
| 349 | 349 |
fi |
| 350 | 350 |
|
| 351 |
+ iniset $TEMPEST_CONFIG compute-feature-enabled personality ${ENABLE_FILE_INJECTION:-False}
|
|
| 351 | 352 |
iniset $TEMPEST_CONFIG compute-feature-enabled resize True |
| 352 | 353 |
iniset $TEMPEST_CONFIG compute-feature-enabled live_migration ${LIVE_MIGRATION_AVAILABLE:-False}
|
| 353 | 354 |
iniset $TEMPEST_CONFIG compute-feature-enabled change_password False |