diff --git a/roles/run-evacuate-hook/files/setup_evacuate_resources.sh b/roles/run-evacuate-hook/files/setup_evacuate_resources.sh index 814b5a1d852e..2b7beb89b6cb 100755 --- a/roles/run-evacuate-hook/files/setup_evacuate_resources.sh +++ b/roles/run-evacuate-hook/files/setup_evacuate_resources.sh @@ -11,10 +11,12 @@ echo "Creating ephemeral test server on subnode" openstack --os-compute-api-version 2.74 server create --image ${image_id} --flavor ${flavor_id} \ --nic net-id=${network_id} --host $SUBNODE_HOSTNAME --wait evacuate-test -echo "Creating boot from volume test server on subnode" -openstack --os-compute-api-version 2.74 server create --flavor ${flavor_id} \ ---block-device source_type=image,uuid=${image_id},destination_type=volume,volume_size=1,boot_index=0,delete_on_termination=true \ ---network ${network_id} --host ${SUBNODE_HOSTNAME} --wait evacuate-bfv-test +if openstack endpoint list | grep cinder; then + echo "Creating boot from volume test server on subnode" + openstack --os-compute-api-version 2.74 server create --flavor ${flavor_id} \ + --block-device source_type=image,uuid=${image_id},destination_type=volume,volume_size=1,boot_index=0,delete_on_termination=true \ + --network ${network_id} --host ${SUBNODE_HOSTNAME} --wait evacuate-bfv-test +fi echo "Forcing down the subnode so we can evacuate from it" openstack --os-compute-api-version 2.11 compute service set --down ${SUBNODE_HOSTNAME} nova-compute