diff --git a/docs_user/modules/openstack-edpm_adoption.adoc b/docs_user/modules/openstack-edpm_adoption.adoc index c6a62b0a6..ab5dc6b1f 100644 --- a/docs_user/modules/openstack-edpm_adoption.adoc +++ b/docs_user/modules/openstack-edpm_adoption.adoc @@ -609,15 +609,17 @@ oc exec -it nova-cell1-conductor-0 -- nova-manage db online_data_migrations * Verify if Nova services can stop the existing test VM instance: + ---- -${BASH_ALIASES[openstack]} server list | grep -qF '| test | ACTIVE |' && openstack server stop test -${BASH_ALIASES[openstack]} server list | grep -qF '| test | SHUTOFF |' -${BASH_ALIASES[openstack]} server --os-compute-api-version 2.48 show --diagnostics test | grep "it is in power state shutdown" || echo PASS +${BASH_ALIASES[openstack]} server list | grep -qF '| test | ACTIVE |' || echo FAIL +${BASH_ALIASES[openstack]} server stop test || echo FAIL +${BASH_ALIASES[openstack]} server list | grep -qF '| test | SHUTOFF |' || echo FAIL +${BASH_ALIASES[openstack]} server --os-compute-api-version 2.48 show --diagnostics test 2>&1 | grep -q "it is in power state shutdown" || echo FAIL ---- * Verify if Nova services can start the existing test VM instance: + ---- -${BASH_ALIASES[openstack]} server list | grep -qF '| test | SHUTOFF |' && openstack server start test -${BASH_ALIASES[openstack]} server list | grep -F '| test | ACTIVE |' -${BASH_ALIASES[openstack]} server --os-compute-api-version 2.48 show --diagnostics test --fit-width -f json | jq -r '.state' | grep running +${BASH_ALIASES[openstack]} server list | grep -qF '| test | SHUTOFF |' || echo FAIL +${BASH_ALIASES[openstack]} server start test || echo FAIL +${BASH_ALIASES[openstack]} server list | grep -F '| test | ACTIVE |' || echo FAIL +${BASH_ALIASES[openstack]} server --os-compute-api-version 2.48 show --diagnostics test --fit-width -f json | jq -r '.state' | grep running || echo FAIL ---- diff --git a/tests/roles/dataplane_adoption/tasks/nova_verify.yaml b/tests/roles/dataplane_adoption/tasks/nova_verify.yaml index b475fd016..b8a7cf846 100644 --- a/tests/roles/dataplane_adoption/tasks/nova_verify.yaml +++ b/tests/roles/dataplane_adoption/tasks/nova_verify.yaml @@ -9,11 +9,12 @@ ansible.builtin.shell: | {{ shell_header }} {{ nova_header }} - ${BASH_ALIASES[openstack]} server list | grep -qF '| test | ACTIVE |' && ${BASH_ALIASES[openstack]} server stop test - ${BASH_ALIASES[openstack]} server list | grep -qF '| test | SHUTOFF |' - ${BASH_ALIASES[openstack]} server --os-compute-api-version 2.48 show --diagnostics test | grep "it is in power state shutdown" || echo PASS + ${BASH_ALIASES[openstack]} server list | grep -qF '| test | ACTIVE |' || echo FAIL + ${BASH_ALIASES[openstack]} server stop test || echo FAIL + ${BASH_ALIASES[openstack]} server list | grep -qF '| test | SHUTOFF |' || echo FAIL + ${BASH_ALIASES[openstack]} server --os-compute-api-version 2.48 show --diagnostics test 2>&1 | grep -q "it is in power state shutdown" || echo FAIL register: nova_verify_stop_result - until: nova_verify_stop_result is success + until: ("FAIL" not in nova_verify_stop_result.stdout_lines) retries: 10 delay: 6 @@ -21,10 +22,11 @@ ansible.builtin.shell: | {{ shell_header }} {{ nova_header }} - ${BASH_ALIASES[openstack]} server list | grep -qF '| test | SHUTOFF |' && ${BASH_ALIASES[openstack]} server start test - ${BASH_ALIASES[openstack]} server list | grep -F '| test | ACTIVE |' - ${BASH_ALIASES[openstack]} server --os-compute-api-version 2.48 show --diagnostics test --fit-width -f json | jq -r '.state' | grep running + ${BASH_ALIASES[openstack]} server list | grep -qF '| test | SHUTOFF |' || echo FAIL + ${BASH_ALIASES[openstack]} server start test || echo FAIL + ${BASH_ALIASES[openstack]} server list | grep -F '| test | ACTIVE |' || echo FAIL + ${BASH_ALIASES[openstack]} server --os-compute-api-version 2.48 show --diagnostics test --fit-width -f json | jq -r '.state' | grep running || echo FAIL register: nova_verify_start_result - until: nova_verify_start_result is success + until: ("FAIL" not in nova_verify_stop_result.stdout_lines) retries: 60 delay: 6