Apex: More snapshot fixes 21/60021/1
authorTim Rozet <trozet@redhat.com>
Thu, 19 Jul 2018 20:34:55 +0000 (16:34 -0400)
committerTim Rozet <trozet@redhat.com>
Thu, 19 Jul 2018 20:34:55 +0000 (16:34 -0400)
Changes-Include:
 - Use correct csit env file with promote jobs
 - Ensure odl container starts when snapshots brought up
 - Use SDN_CONTROLLER_PASSWORD for ODL pass rather than
   hardcoding admin

Change-Id: I910a4eefa2b4c621e3f82939bedee338fad91bf3
Signed-off-by: Tim Rozet <trozet@redhat.com>
jjb/apex/apex-deploy.sh
jjb/apex/apex-snapshot-deploy.sh

index f5c6ab1..52b8a4c 100755 (executable)
@@ -119,7 +119,12 @@ if [[ "$JOB_NAME" =~ "virtual" ]]; then
     DEPLOY_CMD="${DEPLOY_CMD} --virtual-default-ram 12 --virtual-compute-ram 7"
   fi
   if [[ "$PROMOTE" == "True" ]]; then
-    DEPLOY_CMD="${DEPLOY_CMD} --virtual-computes 2 -e csit-environment.yaml"
+    if [[ "$JOB_NAME" =~ "queens" ]]; then
+      CSIT_ENV="csit-queens-environment.yaml"
+    else
+      CSIT_ENV="csit-environment.yaml"
+    fi
+    DEPLOY_CMD="${DEPLOY_CMD} --virtual-computes 2 -e ${CSIT_ENV}"
   fi
 else
   # settings for bare metal deployment
index 9738ecb..a6dc190 100644 (file)
@@ -139,7 +139,8 @@ for node_def in ${virsh_vm_defs}; do
   # FIXME (trozet) install java on each disk image as required to upgrade ODL
   # should be added to Apex as part of the deployment. Remove this after that
   # is complete
-  sudo LIBGUESTFS_BACKEND=direct virt-customize --install java-1.8.0-openjdk -a /var/lib/libvirt/images/${node}.qcow2
+  sudo LIBGUESTFS_BACKEND=direct virt-customize --install java-1.8.0-openjdk \
+  --run-command "docker update --restart=always opendaylight_api" -a /var/lib/libvirt/images/${node}.qcow2
   sudo virsh start ${node}
   echo "Node: ${node} started"
 done
@@ -157,7 +158,7 @@ while [ "$counter" -le 10 ]; do
   echo "Checking if OpenStack is up"
   if nc -z ${admin_controller_ip} 9696 > /dev/null; then
     echo "Overcloud Neutron is up...Checking if OpenDaylight NetVirt is up..."
-    if curl --fail --silent -u admin:admin ${netvirt_url} > /dev/null; then
+    if curl --fail --silent -u admin:${SDN_CONTROLLER_PASSWORD} ${netvirt_url} > /dev/null; then
       echo "OpenDaylight is up.  Overcloud deployment complete"
       exit 0
     else