aboutsummaryrefslogtreecommitdiffstats
path: root/extraconfig/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'extraconfig/tasks')
-rwxr-xr-xextraconfig/tasks/pacemaker_common_functions.sh12
-rw-r--r--extraconfig/tasks/post_puppet_pacemaker.j2.yaml1
-rw-r--r--extraconfig/tasks/post_puppet_pacemaker_restart.yaml1
-rw-r--r--extraconfig/tasks/ssh/host_public_key.yaml9
-rwxr-xr-xextraconfig/tasks/yum_update.sh7
5 files changed, 29 insertions, 1 deletions
diff --git a/extraconfig/tasks/pacemaker_common_functions.sh b/extraconfig/tasks/pacemaker_common_functions.sh
index d1dd5d1d..367f50d7 100755
--- a/extraconfig/tasks/pacemaker_common_functions.sh
+++ b/extraconfig/tasks/pacemaker_common_functions.sh
@@ -371,3 +371,15 @@ function fixup_wrong_ipv6_vip {
fi
)
}
+
+# https://bugs.launchpad.net/tripleo/+bug/1704131 guard against yum update
+# waiting for an existing process until the heat stack time out
+function check_for_yum_lock {
+ if [[ -f /var/run/yum.pid ]] ; then
+ ERR="ERROR existing yum.pid detected - can't continue! Please ensure
+there is no other package update process for the duration of the minor update
+worfklow. Exiting."
+ echo $ERR
+ exit 1
+ fi
+}
diff --git a/extraconfig/tasks/post_puppet_pacemaker.j2.yaml b/extraconfig/tasks/post_puppet_pacemaker.j2.yaml
index 6bf5afb0..4d34aedf 100644
--- a/extraconfig/tasks/post_puppet_pacemaker.j2.yaml
+++ b/extraconfig/tasks/post_puppet_pacemaker.j2.yaml
@@ -27,6 +27,7 @@ resources:
{{role.name}}PostPuppetMaintenanceModeDeployment:
type: OS::Heat::SoftwareDeployments
properties:
+ name: {{role.name}}PostPuppetMaintenanceModeDeployment
servers: {get_param: [servers, {{role.name}}]}
config: {get_resource: {{role.name}}PostPuppetMaintenanceModeConfig}
input_values: {get_param: input_values}
diff --git a/extraconfig/tasks/post_puppet_pacemaker_restart.yaml b/extraconfig/tasks/post_puppet_pacemaker_restart.yaml
index 203ca1f8..102be8a8 100644
--- a/extraconfig/tasks/post_puppet_pacemaker_restart.yaml
+++ b/extraconfig/tasks/post_puppet_pacemaker_restart.yaml
@@ -23,6 +23,7 @@ resources:
ControllerPostPuppetRestartDeployment:
type: OS::Heat::SoftwareDeployments
properties:
+ name: ControllerPostPuppetRestartDeployment
servers: {get_param: servers}
config: {get_resource: ControllerPostPuppetRestartConfig}
input_values: {get_param: input_values}
diff --git a/extraconfig/tasks/ssh/host_public_key.yaml b/extraconfig/tasks/ssh/host_public_key.yaml
index e4ba0cc4..ee06f0a9 100644
--- a/extraconfig/tasks/ssh/host_public_key.yaml
+++ b/extraconfig/tasks/ssh/host_public_key.yaml
@@ -7,6 +7,13 @@ parameters:
server:
description: ID of the node to apply this config to
type: string
+ deployment_actions:
+ default: ['CREATE', 'UPDATE']
+ type: comma_delimited_list
+ description: >
+ List of stack actions that will trigger any deployments in this
+ templates. The actions will be an empty list of the server is in the
+ toplevel DeploymentServerBlacklist parameter's value.
resources:
SshHostPubKeyConfig:
@@ -28,6 +35,8 @@ resources:
properties:
config: {get_resource: SshHostPubKeyConfig}
server: {get_param: server}
+ actions: {get_param: deployment_actions}
+ name: SshHostPubKeyDeployment
outputs:
diff --git a/extraconfig/tasks/yum_update.sh b/extraconfig/tasks/yum_update.sh
index 0c4a7928..a2a04e8e 100755
--- a/extraconfig/tasks/yum_update.sh
+++ b/extraconfig/tasks/yum_update.sh
@@ -64,6 +64,9 @@ fi
command_arguments=${command_arguments:-}
+# Always ensure yum has full cache
+yum makecache || echo "Yum makecache failed. This can cause failure later on."
+
# yum check-update exits 100 if updates are available
set +e
check_update=$(yum check-update 2>&1)
@@ -93,6 +96,7 @@ if [[ "$pacemaker_status" == "active" ]] ; then
fi
else
echo "Upgrading openstack-puppet-modules and its dependencies"
+ check_for_yum_lock
yum -q -y update openstack-puppet-modules
yum deplist openstack-puppet-modules | awk '/dependency/{print $2}' | xargs yum -q -y update
echo "Upgrading other packages is handled by config management tooling"
@@ -102,8 +106,9 @@ fi
command=${command:-update}
full_command="yum -q -y $command $command_arguments"
-echo "Running: $full_command"
+echo "Running: $full_command"
+check_for_yum_lock
result=$($full_command)
return_code=$?
echo "$result"