aboutsummaryrefslogtreecommitdiffstats
path: root/extraconfig/tasks/tripleo_upgrade_node.sh
diff options
context:
space:
mode:
authorSofer Athlan-Guyot <sathlang@redhat.com>2017-02-14 14:20:23 +0100
committerSofer Athlan-Guyot <sathlang@redhat.com>2017-02-15 16:41:39 +0100
commit237cd2004a2c0869d60d0e11e9dccd59e809ff90 (patch)
treefecd91f1bd6d1b5032a0219b212929e0a68eae8e /extraconfig/tasks/tripleo_upgrade_node.sh
parent093949dc5d102d13d857e18427ce671861dc6352 (diff)
Apply puppet in non-controller script in step.
We want to apply a puppet manifest for the non-controller role, but we need to apply it in stages. By loading the proper hieradata we get the needed step configuration. Change-Id: I07bfeee7b7d9a9b8c2c20e5d5c9ed735d0bfc842 Closes-Bug: #1664304
Diffstat (limited to 'extraconfig/tasks/tripleo_upgrade_node.sh')
-rw-r--r--extraconfig/tasks/tripleo_upgrade_node.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/extraconfig/tasks/tripleo_upgrade_node.sh b/extraconfig/tasks/tripleo_upgrade_node.sh
index 27ba33a8..16584254 100644
--- a/extraconfig/tasks/tripleo_upgrade_node.sh
+++ b/extraconfig/tasks/tripleo_upgrade_node.sh
@@ -44,9 +44,14 @@ if [[ -n \$NOVA_COMPUTE ]]; then
systemctl restart openstack-ceilometer-compute
fi
-# Apply puppet manifest to converge just right after the \$ROLE upgrade
-puppet apply /root/${ROLE}_puppet_config.pp
-
+# Apply puppet manifest to converge just right after the ${ROLE} upgrade
+$(declare -f run_puppet)
+for step in 1 2 3 4 5 6; do
+ if ! run_puppet /root/${ROLE}_puppet_config.pp ${ROLE} \${step}; then
+ echo "Puppet failure at step \${step}"
+ exit 1
+ fi
+done
ENDOFCAT
# ensure the permissions are OK