Refactor upgrade checks.
[apex-tripleo-heat-templates.git] / extraconfig / tasks / major_upgrade_pacemaker.yaml
index c2e1488..13f8614 100644 (file)
@@ -26,6 +26,10 @@ parameters:
     constraints:
     - allowed_values: ['auto', 'yes', 'no']
     default: 'auto'
+  IgnoreCephUpgradeWarnings:
+    type: boolean
+    default: false
+    description: If enabled, Ceph upgrade will be forced even though cluster or PGs status is not clean
 
 resources:
   # TODO(jistr): for Mitaka->Newton upgrades and further we can use
@@ -36,7 +40,16 @@ resources:
     type: OS::Heat::SoftwareConfig
     properties:
       group: script
-      config: {get_file: major_upgrade_ceph_mon.sh}
+      config:
+        list_join:
+        - ''
+        - - str_replace:
+              template: |
+                #!/bin/bash
+                ignore_ceph_upgrade_warnings='IGNORE_CEPH_UPGRADE_WARNINGS'
+              params:
+                IGNORE_CEPH_UPGRADE_WARNINGS: {get_param: IgnoreCephUpgradeWarnings}
+          - get_file: major_upgrade_ceph_mon.sh
 
   CephMonUpgradeDeployment:
     type: OS::Heat::SoftwareDeploymentGroup
@@ -69,6 +82,7 @@ resources:
               params:
                 MYSQL_MAJOR_UPGRADE: {get_param: MySqlMajorUpgrade}
           - get_file: pacemaker_common_functions.sh
+          - get_file: major_upgrade_check.sh
           - get_file: major_upgrade_pacemaker_migrations.sh
           - get_file: major_upgrade_controller_pacemaker_1.sh