From b188630e87d63810fe6331692e82cc3863ed3249 Mon Sep 17 00:00:00 2001 From: John Fulton Date: Tue, 9 Feb 2021 16:37:37 -0500 Subject: [PATCH] Use Ceph cluster name when setting minimum client version If CephClusterName is set to it's non-default value, then I4c3d8fee6c7a0c25cca4d1e6b731060684cd28b3 will cause the deployment to fail as per the bug this patch closes. Change-Id: Ia5611d7cb64808ac247873023e5aa5afd07f6698 Closes-Bug: #1915197 (cherry picked from commit 8149df4c6e72184bd0e00c5fe9a5a0ff97f542d3) (cherry picked from commit 5e4d71b213d27481eaf8b0492b6e979b795ed465) --- deployment/ceph-ansible/ceph-mon.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/deployment/ceph-ansible/ceph-mon.yaml b/deployment/ceph-ansible/ceph-mon.yaml index 00fe98cbbe..83024b23c6 100644 --- a/deployment/ceph-ansible/ceph-mon.yaml +++ b/deployment/ceph-ansible/ceph-mon.yaml @@ -42,6 +42,15 @@ parameters: type: boolean default: false description: Parameter used to trigger the dashboard deployment. + 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. conditions: dashboard_enabled: {equals: [{get_param: CephEnableDashboard}, true]} @@ -123,7 +132,9 @@ outputs: register: ceph_mon_id delegate_to: "{{ groups['ceph_mon'][0] }}" - name: Enforce minimum Ceph clients version to Mimic - command: "{{ container_cli }} exec {{ ceph_mon_id.stdout_lines[0] }} ceph osd set-require-min-compat-client mimic" + command: "{{ container_cli }} exec {{ ceph_mon_id.stdout_lines[0] }} ceph --cluster {{ cluster }} osd set-require-min-compat-client mimic" delegate_to: "{{ groups['ceph_mon'][0] }}" + vars: + cluster: {get_param: CephClusterName} external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]} external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]}