aboutsummaryrefslogtreecommitdiffstats
path: root/deployed-server/deployed-server.yaml
diff options
context:
space:
mode:
authorJames Slagle <jslagle@redhat.com>2017-01-08 11:07:13 -0500
committerJames Slagle <jslagle@redhat.com>2017-01-08 11:07:13 -0500
commit64eb5a1944332301900df1dc4fc2d226336d1bca (patch)
tree282491fb300502f38254370fa223b21ceddab6bd /deployed-server/deployed-server.yaml
parent10044ba2afe6e33ca22ef656ec298203a485b550 (diff)
Add UpgradeInitCommand to deployed-server
The commands specified by UpgradeInitCommand need to be run before InstanceIdDeployment in deployed-server.yaml, otherwise the upgrades hang with the resource in progress. This is because the new python-heat-agent-apply-config has not yet been installed on the deployed server. Adding the UpgradeInitCommand (and corresponding SoftwareConfig/SoftwareDeployment to apply it) will cause the new repos and python-heat-agent-* rpm's to be installed before InstanceIdDeployment. An open question is whether or not Heat should even be triggering the InstanceIdDepoyment to IN_PROGRESS on upgrade when only the group is changing from os-apply-config to apply-config. If that turns out to be a Heat bug, then this patch wouldn't be necessary. Change-Id: I9d87f995744415b110a7d0bca8d2309d7167148c
Diffstat (limited to 'deployed-server/deployed-server.yaml')
-rw-r--r--deployed-server/deployed-server.yaml26
1 files changed, 26 insertions, 0 deletions
diff --git a/deployed-server/deployed-server.yaml b/deployed-server/deployed-server.yaml
index 2929c5eb..3ff63613 100644
--- a/deployed-server/deployed-server.yaml
+++ b/deployed-server/deployed-server.yaml
@@ -38,6 +38,12 @@ parameters:
type: json
description: Optional scheduler hints to pass to nova
default: {}
+ UpgradeInitCommand:
+ type: string
+ description: |
+ Command or script snippet to run on all overcloud nodes to
+ initialize the upgrade process. E.g. a repository switch.
+ default: ''
resources:
deployed-server:
@@ -46,6 +52,25 @@ resources:
name: {get_param: name}
software_config_transport: {get_param: software_config_transport}
+ UpgradeInitConfig:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: script
+ config:
+ list_join:
+ - ''
+ - - "#!/bin/bash\n\n"
+ - "if [[ -f /etc/resolv.conf.save ]] ; then rm /etc/resolv.conf.save; fi\n\n"
+ - get_param: UpgradeInitCommand
+
+ UpgradeInitDeployment:
+ type: OS::Heat::SoftwareDeployment
+ properties:
+ name: UpgradeInitDeployment
+ server: {get_resource: deployed-server}
+ config: {get_resource: UpgradeInitConfig}
+
+
InstanceIdConfig:
type: OS::Heat::StructuredConfig
properties:
@@ -58,6 +83,7 @@ resources:
properties:
config: {get_resource: InstanceIdConfig}
server: {get_resource: deployed-server}
+ depends_on: UpgradeInitDeployment
HostsEntryConfig:
type: OS::Heat::SoftwareConfig