ci/deploy.sh, states: bash debug, continue on err 09/40009/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Wed, 23 Aug 2017 14:28:04 +0000 (16:28 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Wed, 23 Aug 2017 14:28:04 +0000 (16:28 +0200)
Since we don't `set -e` in state files, applying each state will
always succeed unless the last instruction in the state fails.
Make this uniform by always succeeding in applying the state.

While at it, enable bash debugging logs, for better readability
of deploy log files.

Change-Id: I3cf4886f6d73c6fd1380df1a4e1413334bec1701
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
ci/deploy.sh
mcp/config/states/dpdk
mcp/config/states/maas
mcp/config/states/networks
mcp/config/states/neutron_compute
mcp/config/states/opendaylight
mcp/config/states/openstack
mcp/config/states/openstack_ha

index cf7b3b3..f51ba5f 100755 (executable)
@@ -336,7 +336,7 @@ for state in "${cluster_states[@]}"; do
     notify "STATE: ${state}\n" 2
     # shellcheck disable=SC2086,2029
     ssh ${SSH_OPTS} "ubuntu@${SALT_MASTER}" \
-        sudo "/root/fuel/mcp/config/states/${state}"
+        sudo "/root/fuel/mcp/config/states/${state} || true"
 done
 
 popd > /dev/null
index 8834d47..c6cd2a5 100755 (executable)
@@ -1,3 +1,6 @@
+#!/bin/bash
+set -x
+
 salt -I 'nova:compute' system.reboot
 while true; do salt -I 'nova:compute' test.ping | fgrep -q 'Not connected' || break; done
 salt -I 'nova:compute' state.sls linux.network.dpdk
index fecd991..01d247e 100755 (executable)
@@ -1,4 +1,6 @@
 #!/bin/bash
+set -x
+
 function wait_for() {
   local cmdstr=$@
   local total_attempts=360
index 6f294ce..505153a 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+set -x
 
 # Determine public network based on external IPs from compute node
 # NOTE: mask currently hardcoded to /24
index e2ffec6..d581621 100755 (executable)
@@ -1 +1,4 @@
+#!/bin/bash
+set -x
+
 salt -I 'neutron:compute' state.sls neutron
index 3b1cf75..bee4c85 100755 (executable)
@@ -1,3 +1,6 @@
+#!/bin/bash
+set -x
+
 salt -I 'opendaylight:server' state.sls opendaylight
 salt -I 'opendaylight:client' state.sls opendaylight.client
 salt -I 'neutron:server' state.sls opendaylight.client
index 57ca585..5ded58c 100755 (executable)
@@ -1,3 +1,6 @@
+#!/bin/bash
+set -x
+
 salt -I 'rabbitmq:server' state.sls rabbitmq
 salt -I 'rabbitmq:server' cmd.run "rabbitmqctl status"
 
index 4a39d51..2597e82 100755 (executable)
@@ -1,3 +1,6 @@
+#!/bin/bash
+set -x
+
 salt -I 'keepalived:cluster' state.sls keepalived -b 1
 salt -I 'keepalived:cluster' pillar.get keepalived:cluster:instance:VIP:address