Moving *postconfig where it was *postpuppet
authorCarlos Camacho <ccamacho@redhat.com>
Thu, 8 Jun 2017 21:18:44 +0000 (23:18 +0200)
committerCarlos Camacho <ccamacho@redhat.com>
Tue, 13 Jun 2017 09:09:19 +0000 (11:09 +0200)
We need to ensure that the pacemaker cluster restarts
in the end of the deployment.

Due to the resources renaming we added the
postconfig resource not in the end of the
deployment as it was *postpuppet.

Closes-bug: 1695904

Change-Id: Ic6978fcff591635223b354831cd6cbe0802316cf

docker/post.j2.yaml
extraconfig/tasks/post_puppet_pacemaker.j2.yaml
puppet/puppet-steps.j2

index dfa8ac2..1aa9e18 100644 (file)
@@ -122,27 +122,31 @@ resources:
         step: 5
         update_identifier: {get_param: DeployIdentifier}
 
-  {{role.name}}PostConfig:
-    type: OS::TripleO::Tasks::{{role.name}}PostConfig
+  # Note, this should be the last step to execute configuration changes.
+  # Ensure that all {{role.name}}ExtraConfigPost steps are executed
+  # after all the previous deployment steps.
+  {{role.name}}ExtraConfigPost:
     depends_on:
   {% for dep in roles %}
       - {{dep.name}}Deployment_Step5
   {% endfor %}
+    type: OS::TripleO::NodeExtraConfigPost
     properties:
-      servers:  {get_param: servers}
-      input_values:
-        update_identifier: {get_param: DeployIdentifier}
+        servers: {get_param: [servers, {{role.name}}]}
 
-  # Note, this should come last, so use depends_on to ensure
-  # this is created after any other resources.
-  {{role.name}}ExtraConfigPost:
+  # The {{role.name}}PostConfig steps are in charge of
+  # quiescing all services, i.e. in the Controller case,
+  # we should run a full service reload.
+  {{role.name}}PostConfig:
+    type: OS::TripleO::Tasks::{{role.name}}PostConfig
     depends_on:
   {% for dep in roles %}
-      - {{dep.name}}PostConfig
+      - {{dep.name}}ExtraConfigPost
   {% endfor %}
-    type: OS::TripleO::NodeExtraConfigPost
     properties:
-        servers: {get_param: [servers, {{role.name}}]}
+      servers:  {get_param: servers}
+      input_values:
+        update_identifier: {get_param: DeployIdentifier}
 
   {% if role.name.lower() == 'compute' %}
   CopyEtcConfig:
index 0db0bc1..6704b35 100644 (file)
@@ -10,8 +10,8 @@ parameters:
 
 resources:
 
-{%- for role in roles -%}
-{% if "controller" in role.tags %}
+{%- for role in roles %}
+  {%- if role.name.lower() == 'controller' %}
   {{role.name}}PostPuppetMaintenanceModeConfig:
     type: OS::Heat::SoftwareConfig
     properties:
@@ -37,6 +37,6 @@ resources:
     properties:
       servers: {get_param: [servers, {{role.name}}]}
       input_values: {get_param: input_values}
-{%- endif -%}
-{% endfor %}
+  {%- endif %}
+{%- endfor %}
 
index 53ffe7a..92685d7 100644 (file)
         update_identifier: {get_param: DeployIdentifier}
 {% endfor %}
 
-  {{role.name}}PostConfig:
-    type: OS::TripleO::Tasks::{{role.name}}PostConfig
+  # Note, this should be the last step to execute configuration changes.
+  # Ensure that all {{role.name}}ExtraConfigPost steps are executed
+  # after all the previous deployment steps.
+  {{role.name}}ExtraConfigPost:
     depends_on:
   {% for dep in roles %}
       - {{dep.name}}Deployment_Step5
   {% endfor %}
+    type: OS::TripleO::NodeExtraConfigPost
     properties:
-      servers: {get_param: servers}
-      input_values:
-        update_identifier: {get_param: DeployIdentifier}
+        servers: {get_param: [servers, {{role.name}}]}
 
-  # Note, this should come last, so use depends_on to ensure
-  # this is created after any other resources.
-  {{role.name}}ExtraConfigPost:
+  # The {{role.name}}PostConfig steps are in charge of
+  # quiescing all services, i.e. in the Controller case,
+  # we should run a full service reload.
+  {{role.name}}PostConfig:
+    type: OS::TripleO::Tasks::{{role.name}}PostConfig
     depends_on:
   {% for dep in roles %}
-      - {{dep.name}}PostConfig
+      - {{dep.name}}ExtraConfigPost
   {% endfor %}
-    type: OS::TripleO::NodeExtraConfigPost
     properties:
-        servers: {get_param: [servers, {{role.name}}]}
+      servers: {get_param: servers}
+      input_values:
+        update_identifier: {get_param: DeployIdentifier}
+
 
 {% endfor %}