]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
rbd: enable ceph-rbd-mirror.target for releases <= luminous 2188/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 16 Nov 2017 09:50:30 +0000 (10:50 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 16 Nov 2017 20:36:25 +0000 (21:36 +0100)
when `ceph-rbd-mirror.target` is not enabled, the service won't start
after a reboot because there is a dependency between these two units.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit ccad0ebf26c60e5856530aab1f6f7c2b1e6eae84)
Signed-off-by: Sébastien Han <seb@redhat.com>
roles/ceph-rbd-mirror/tasks/start_rbd_mirror.yml

index 3b5da3e343f4183f1a459eb9038609f9bc9476cf..b4b9eb2c7f1908483cc554878937fe5e2c2c6c37 100644 (file)
@@ -24,7 +24,7 @@
     enabled: yes
   changed_when: false
   when:
-    - ceph_release_num.{{ ceph_release }} < ceph_release_num.luminous
+    - ceph_release_num[ceph_release] < ceph_release_num.luminous
 
 - name: stop and remove the generic rbd-mirror service instance
   service:
 # The upstream fix is: https://github.com/ceph/ceph/pull/17969
 # It's affecting, ceph version 12.2.0 (32ce2a3ae5239ee33d6150705cdb24d43bab910c) luminous (rc) and before
 - name: enable ceph-rbd-mirror.target
-  service:
+  systemd:
     name: "ceph-rbd-mirror.target"
+    state: started
     enabled: yes
   changed_when: false
   when:
-    - ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous
+    - ceph_release_num[ceph_release] <= ceph_release_num.luminous
 
 - name: start and add the rbd-mirror service instance
   service: