diff options
author | James Slagle <jslagle@redhat.com> | 2017-02-15 13:13:36 -0500 |
---|---|---|
committer | James Slagle <jslagle@redhat.com> | 2017-04-05 18:53:42 +0000 |
commit | 77aa9a71020157f21b8898958a6d472b6297ac36 (patch) | |
tree | f24cdc149a1e3b38e29134fff3496e96d84ad19c | |
parent | bba584afc34cea119509c06c95d35bfd34eed7fc (diff) |
Generate Pre/Post Puppet Tasks for all roles
We need to generate the Pre and Post Puppet Tasks for all roles, not
just the Controller role. Otherwise, you have to have a role
specifically named Controller that is running your pacemaker services,
or pacemaker won't be properly handled on stack-updates.
When using deployed-server's it's actually not possible to have a role
called Controller, since we need to use all custom roles so that we can
set disable_contraints on each role. Further, it is not possible to
redefine the Controller role since puppet/controller-role.yaml is listed
in the excludes file.
Change-Id: I737b24db90932e292b50b122640f66385f2d1c23
Partial-Bug: #1665060
(cherry picked from commit 529768ae84f7713f2ae9447ff35ee2d63b4bdcd7)
-rw-r--r-- | overcloud-resource-registry-puppet.j2.yaml | 6 | ||||
-rw-r--r-- | puppet/puppet-steps.j2 | 18 |
2 files changed, 11 insertions, 13 deletions
diff --git a/overcloud-resource-registry-puppet.j2.yaml b/overcloud-resource-registry-puppet.j2.yaml index 8e86adf1..1360d0be 100644 --- a/overcloud-resource-registry-puppet.j2.yaml +++ b/overcloud-resource-registry-puppet.j2.yaml @@ -69,8 +69,10 @@ resource_registry: OS::TripleO::NodeExtraConfig: puppet/extraconfig/pre_deploy/default.yaml OS::TripleO::NodeExtraConfigPost: extraconfig/post_deploy/default.yaml - OS::TripleO::Tasks::ControllerPrePuppet: OS::Heat::None - OS::TripleO::Tasks::ControllerPostPuppet: OS::Heat::None +{% for role in roles %} + OS::TripleO::Tasks::{{role.name}}PrePuppet: OS::Heat::None + OS::TripleO::Tasks::{{role.name}}PostPuppet: OS::Heat::None +{% endfor %} # "AllNodes" Extra cluster config, runs on all nodes prior to the post_deploy # phase, e.g when puppet is applied, but after the pre_deploy phase. Useful when diff --git a/puppet/puppet-steps.j2 b/puppet/puppet-steps.j2 index cfa70f79..9d5623f0 100644 --- a/puppet/puppet-steps.j2 +++ b/puppet/puppet-steps.j2 @@ -23,14 +23,12 @@ properties: StepConfig: {get_param: [role_data, {{role.name}}, step_config]} - {% if role.name == 'Controller' %} - ControllerPrePuppet: - type: OS::TripleO::Tasks::ControllerPrePuppet + {{role.name}}PrePuppet: + type: OS::TripleO::Tasks::{{role.name}}PrePuppet properties: - servers: {get_param: [servers, Controller]} + servers: {get_param: [servers, {{role.name}}]} input_values: update_identifier: {get_param: DeployIdentifier} - {% endif %} {% if role.name in ['Controller', 'ObjectStorage'] %} {{role.name}}SwiftRingDeploy: @@ -84,16 +82,14 @@ properties: servers: {get_param: [servers, {{role.name}}]} - {% if role.name == 'Controller' %} - ControllerPostPuppet: + {{role.name}}PostPuppet: depends_on: - - ControllerExtraConfigPost - type: OS::TripleO::Tasks::ControllerPostPuppet + - {{role.name}}ExtraConfigPost + type: OS::TripleO::Tasks::{{role.name}}PostPuppet properties: - servers: {get_param: [servers, Controller]} + servers: {get_param: [servers, {{role.name}}]} input_values: update_identifier: {get_param: DeployIdentifier} - {% endif %} {% if role.name in ['Controller', 'ObjectStorage'] %} {{role.name}}SwiftRingUpdate: |