]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
rolling_update: fix upgrade when using fqdn v3.0.47
authorSébastien Han <seb@redhat.com>
Thu, 9 Aug 2018 09:32:53 +0000 (11:32 +0200)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Wed, 24 Oct 2018 12:39:51 +0000 (12:39 +0000)
CLusters that were deployed using 'mon_use_fqdn' have a different unit
name, so during the upgrade this must be used otherwise the upgrade will
fail, looking for a unit that does not exist.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1597516
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 44d0da0dd497bfab040c1e64fb406e4c13150028)

infrastructure-playbooks/rolling_update.yml

index aefdab775acfcfc64a283d104d4c7a23fcd53299..00cad82b220f61bf8f6a39b7bc5cdd1e6fa9db9d 100644 (file)
         - containerized_deployment
         - mon_host_count | int == 1
 
-    - name: stop ceph mon
+    - name: stop ceph mon - shortname
       systemd:
         name: ceph-mon@{{ ansible_hostname }}
         state: stopped
         enabled: yes
+      ignore_errors: True
+      when:
+        - not containerized_deployment
+
+    - name: stop ceph mon - fqdn
+      systemd:
+        name: ceph-mon@{{ ansible_fqdn }}
+        state: stopped
+        enabled: yes
+      ignore_errors: True
       when:
         - not containerized_deployment
 
   post_tasks:
     - name: start ceph mon
       systemd:
-        name: ceph-mon@{{ ansible_hostname }}
+        name: ceph-mon@{{ monitor_name }}
         state: started
         enabled: yes
       when:
 
     - name: restart containerized ceph mon
       systemd:
-        name: ceph-mon@{{ ansible_hostname }}
+        name: ceph-mon@{{ monitor_name }}
         state: restarted
         enabled: yes
         daemon_reload: yes