fix ocata stack by looking for rabbitmq pid 92/69092/2
authorSam Hague <shague@redhat.com>
Mon, 5 Mar 2018 22:20:19 +0000 (17:20 -0500)
committerSam Hague <shague@redhat.com>
Mon, 5 Mar 2018 23:27:08 +0000 (18:27 -0500)
Change-Id: I1277b8c172fffd365a2da51362f22d935c78c550
Signed-off-by: Sam Hague <shague@redhat.com>
jjb/integration/integration-deploy-openstack-run-test.sh

index 2521f80d951e065194eeacdd6ad4adf954e3e760..f74e416bc0d2bcf2976fac95c4505396f30c4160 100644 (file)
@@ -553,6 +553,7 @@ EOF
     mkdir -p ${WORKSPACE}/archives
 
     mv /tmp/changes.txt ${WORKSPACE}/archives
+    mv ${WORKSPACE}/rabbit.txt ${WORKSPACE}/archives
 
     sleep 5
     # FIXME: Do not create .tar and gzip before copying.
@@ -775,10 +776,16 @@ function get_service () {
 # Check if rabbitmq is ready by looking for a pid in it's status.
 # The function returns the status of the grep command which callers can check.
 function is_rabbitmq_ready() {
-    local -r ip=$1
+    local -r ip=${1}
+    local grepfor="nova_cell1"
     rm -f rabbit.txt
-    ${SSH} ${ip} "sudo rabbitmqctl list_vhosts" > rabbit.txt
-    grep nova_cell1 rabbit.txt
+    if [ "${OPENSTACK_BRANCH}" == "stable/ocata" ]; then
+        ${SSH} ${ip} "sudo rabbitmqctl status" > rabbit.txt
+        grepfor="pid"
+    else
+        ${SSH} ${ip} "sudo rabbitmqctl list_vhosts" > rabbit.txt
+    fi
+    grep ${grepfor} rabbit.txt
 }
 
 # retry the given command ($3) until success for a number of iterations ($1)