Add etcd composable upgrade steps
authorCarlos Camacho <ccamacho@redhat.com>
Sun, 26 Feb 2017 20:27:18 +0000 (21:27 +0100)
committerCarlos Camacho <ccamacho@redhat.com>
Tue, 28 Feb 2017 08:44:40 +0000 (09:44 +0100)
Adding etcd upgrade tasks

Change-Id: Ie891a1a03585b3aec1ed30c176b5fb6b67d7e4b7

puppet/services/etcd.yaml

index f96fa72..ec87a75 100644 (file)
@@ -56,3 +56,18 @@ outputs:
               - 2380
       step_config: |
         include ::tripleo::profile::base::etcd
+      upgrade_tasks:
+        - name: Check if etcd is deployed
+          command: systemctl is-enabled etcd
+          tags: step0,validation
+          ignore_errors: True
+          register: etcd_enabled
+        - name: "PreUpgrade step0,validation: Check if etcd is running"
+          shell: >
+            /usr/bin/systemctl show 'etcd' --property ActiveState |
+            grep '\bactive\b'
+          when: etcd_enabled.rc == 0
+          tags: step0,validation
+        - name: Stop etcd service
+          tags: step2
+          service: name=etcd state=stopped