From 5a0dbe2406a76710cc9844fdfb8188e6d2338607 Mon Sep 17 00:00:00 2001 From: Francesco Pantano Date: Mon, 9 Nov 2020 14:39:40 +0100 Subject: [PATCH] Properly compute hostname when looking for the ceph-mon container There are some cases when the return value of the ${HOSTNAME) variable is different from {{ ansible_hostname }}, especially when tls-everywhere framework is involved. This purpose of this review is to fix the FFU section that needs to know the hostname to find the running container on the delegated host. Change-Id: Ib269a25fcf0db66ad3144c3e20031a4da6e2e2fb Closes-Bug: #1903537 (cherry picked from commit 4e0f61d9e2affd107b0ac9a195e23f2a71083383) --- deployment/ceph-ansible/ceph-osd.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/ceph-ansible/ceph-osd.yaml b/deployment/ceph-ansible/ceph-osd.yaml index c8d3af66ae..aa22c57315 100644 --- a/deployment/ceph-ansible/ceph-osd.yaml +++ b/deployment/ceph-ansible/ceph-osd.yaml @@ -84,7 +84,7 @@ outputs: register: check_docker_cli check_mode: false - name: Set noout flag - shell: "{{ container_client }} exec -u root ceph-mon-${HOSTNAME} ceph osd set {{ item }}" + shell: "{{ container_client }} exec -u root ceph-mon-{{ ansible_hostname }} ceph osd set {{ item }}" become: true with_items: - noout @@ -111,7 +111,7 @@ outputs: list_concat: - {get_attr: [CephBase, role_data, post_upgrade_tasks]} - - name: Unset noout flag - shell: "{{ container_cli }} exec -u root ceph-mon-${HOSTNAME} ceph osd unset {{ item }}" + shell: "{{ container_cli }} exec -u root ceph-mon-{{ ansible_hostname }} ceph osd unset {{ item }}" with_items: - noout - norecover