From 811bf370be3b9a4bb29b7234a6f6c16b8290146b Mon Sep 17 00:00:00 2001 From: katarimanoj Date: Tue, 12 Dec 2023 22:04:44 +0530 Subject: [PATCH] Fix DCN system upgrade failure to set ceph noout In case of DCN setup with multiple stacks, the ceph task "Set noout flag" is delegated to incorrect host and the ceph command also fails to find the conf and keyring. This patch will ensure to - delegate the task to right host - run the ceph command for the specific cluster by using the correct conf and keyring files Change-Id: Ib79b6bf3fb61a782661beaaeec85a2610c0f3833 --- deployment/cephadm/ceph-osd.yaml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/deployment/cephadm/ceph-osd.yaml b/deployment/cephadm/ceph-osd.yaml index 9291571488..0cd7507e67 100644 --- a/deployment/cephadm/ceph-osd.yaml +++ b/deployment/cephadm/ceph-osd.yaml @@ -37,6 +37,15 @@ parameters: devices: [] osd_scenario: lvm osd_objectstore: bluestore + CephClusterName: + type: string + default: ceph + description: The Ceph cluster name. + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + description: > + The Ceph cluster name must be at least 1 character and contain only + letters and numbers. CephEnableDashboard: type: boolean default: false @@ -107,7 +116,7 @@ outputs: list_concat: - {get_attr: [CephBase, role_data, upgrade_tasks]} - - name: Set noout flag - shell: "cephadm shell -- ceph osd set {{ item }}" + shell: "cephadm shell -c /etc/ceph/{{ tripleo_cephadm_cluster }}.conf -k /etc/ceph/{{ tripleo_cephadm_cluster }}.client.admin.keyring -- ceph osd set {{ item }}" become: true with_items: - noout @@ -115,27 +124,31 @@ outputs: - nobackfill - norebalance - nodeep-scrub - delegate_to: "{{ ceph_mon_short_bootstrap_node_name }}" + delegate_to: "{{ groups['ceph_mon'][0] }}" tags: - never - system_upgrade - system_upgrade_prepare + vars: + tripleo_cephadm_cluster: {get_param: CephClusterName} when: - step|int == 1 - upgrade_leapp_enabled - - name: Unset noout flag - shell: "cephadm shell -- ceph osd unset {{ item }}" + shell: "cephadm shell -c /etc/ceph/{{ tripleo_cephadm_cluster }}.conf -k /etc/ceph/{{ tripleo_cephadm_cluster }}.client.admin.keyring -- ceph osd unset {{ item }}" with_items: - noout - norecover - nobackfill - norebalance - nodeep-scrub - delegate_to: "{{ ceph_mon_short_bootstrap_node_name }}" + delegate_to: "{{ groups['ceph_mon'][0] }}" tags: - never - system_upgrade - system_upgrade_prepare + vars: + tripleo_cephadm_cluster: {get_param: CephClusterName} when: - step|int == 5 - upgrade_leapp_enabled