From 2305b99a715d2ac8db7c4b1ebaca23952a1243ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Thu, 9 Aug 2018 11:32:53 +0200 Subject: [PATCH] rolling_update: fix upgrade when using fqdn MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit 44d0da0dd497bfab040c1e64fb406e4c13150028) --- infrastructure-playbooks/rolling_update.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index aefdab775..00cad82b2 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -107,11 +107,21 @@ - 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 @@ -125,7 +135,7 @@ post_tasks: - name: start ceph mon systemd: - name: ceph-mon@{{ ansible_hostname }} + name: ceph-mon@{{ monitor_name }} state: started enabled: yes when: @@ -133,7 +143,7 @@ - name: restart containerized ceph mon systemd: - name: ceph-mon@{{ ansible_hostname }} + name: ceph-mon@{{ monitor_name }} state: restarted enabled: yes daemon_reload: yes -- 2.39.5