summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-02-29 10:03:15 +0000
committerGerrit Code Review <review@openstack.org>2016-02-29 10:03:15 +0000
commit9f343afa770de2ba4a59c8ca2348141363f35bc9 (patch)
tree68abd18e84f5edddd2aff046c63f6ccd62ab5639
parent27b58c81ce4e3141dac2f137fb9a2bca42ee88ef (diff)
parent55f603b7364387e8c7f9b6b67747a5fddf6e91d4 (diff)
Merge "Write the compute upgrade script for tripleo major upgrade workflow"
-rw-r--r--extraconfig/tasks/major_upgrade_compute.sh24
-rw-r--r--extraconfig/tasks/major_upgrade_pacemaker.yaml26
2 files changed, 50 insertions, 0 deletions
diff --git a/extraconfig/tasks/major_upgrade_compute.sh b/extraconfig/tasks/major_upgrade_compute.sh
new file mode 100644
index 00000000..2f19d573
--- /dev/null
+++ b/extraconfig/tasks/major_upgrade_compute.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+# This delivers the compute upgrade script to be invoked as part of the tripleo
+# major upgrade workflow.
+#
+set -eu
+
+UPGRADE_SCRIPT=/root/tripleo_upgrade_node.sh
+
+cat > $UPGRADE_SCRIPT << ENDOFCAT
+### DO NOT MODIFY THIS FILE
+### This file is automatically delivered to the compute nodes as part of the
+### tripleo upgrades workflow
+
+# pin nova to kilo (messaging +-1) for the nova-compute service
+
+crudini --set /etc/nova/nova.conf upgrade_levels compute $upgrade_level_nova_compute
+yum -y update
+
+ENDOFCAT
+
+# ensure the permissions are OK
+chmod 0755 $UPGRADE_SCRIPT
+
diff --git a/extraconfig/tasks/major_upgrade_pacemaker.yaml b/extraconfig/tasks/major_upgrade_pacemaker.yaml
index 1080fd18..5a11bae9 100644
--- a/extraconfig/tasks/major_upgrade_pacemaker.yaml
+++ b/extraconfig/tasks/major_upgrade_pacemaker.yaml
@@ -66,3 +66,29 @@ resources:
servers: {get_param: controller_servers}
config: {get_resource: ControllerPacemakerUpgradeConfig_Step2}
input_values: {get_param: input_values}
+
+ ComputeDeliverUpgradeConfig_Step3:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: script
+ config:
+ list_join:
+ - ''
+ - - str_replace:
+ template: |
+ #!/bin/bash
+ upgrade_level_nova_compute='UPGRADE_LEVEL_NOVA_COMPUTE'
+ params:
+ UPGRADE_LEVEL_NOVA_COMPUTE: {get_param: UpgradeLevelNovaCompute}
+ - get_file: pacemaker_common_functions.sh
+ - get_file: major_upgrade_compute.sh
+
+ ComputeDeliverUpgradeConfigDeployment_Step3:
+ type: OS::Heat::SoftwareDeploymentGroup
+ depends_on: ControllerPacemakerUpgradeDeployment_Step2
+ properties:
+ servers: {get_param: compute_servers}
+ config: {get_resource: ComputeDeliverUpgradeConfig_Step3}
+ input_values: {get_param: input_values}
+
+