Skip to content

Commit

Permalink
Fix Nova server diagnostic tests
Browse files Browse the repository at this point in the history
Signed-off-by: Bohdan Dobrelia <[email protected]>
  • Loading branch information
bogdando committed Mar 14, 2024
1 parent 99e7b17 commit eebfd1a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions docs_user/modules/openstack-edpm_adoption.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -609,15 +609,15 @@ 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 |' && ${BASH_ALIASES[openstack]} server stop test
${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 |' && ${BASH_ALIASES[openstack]} server start test
${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
----
12 changes: 6 additions & 6 deletions tests/roles/dataplane_adoption/tasks/nova_verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
{{ 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 | 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

Expand All @@ -22,9 +22,9 @@
{{ 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 -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

0 comments on commit eebfd1a

Please sign in to comment.