Files
nova/roles/run-graceful-shutdown-tests/files/verify_build_instance.sh
T
Ghanshyam Maan b47d217ca7 Add more test for graceful shutdown
Adding more tests for graceful shutdown:
- shutdown the destination compute and see how live and cold migration
progress
- start build instance and ocne comoute start building instance then
shutdown the comoute service and see if build instance finish or not.
- revert resize server

Partial implement blueprint nova-services-graceful-shutdown-part1

Change-Id: I57132fb7b7fa614dfc138508581ff5a67aaed906
Signed-off-by: Ghanshyam Maan <gmaan.os14@gmail.com>
2026-02-25 20:46:24 +00:00

26 lines
632 B
Bash
Executable File

#!/bin/bash
source /opt/stack/devstack/openrc admin
set -x
set -e
# Wait for the server to finish building and become active which confirms that
# the build completed during graceful shutdown.
build_start=$(date +%s)
while true; do
status=$(openstack server show server-build -f value -c status)
if [ "${status}" == "ACTIVE" ]; then
build_end=$(date +%s)
build_duration=$((build_end - build_start))
echo "Build completed in ${build_duration} seconds."
break
fi
if [ "${status}" == "ERROR" ]; then
echo "Server went to ERROR status."
exit 6
fi
sleep 5
done