From f4d62212c6b09a35c57cea8236673c51cde2dfc7 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Thu, 9 Jul 2020 18:28:49 -0400 Subject: [PATCH] cephadm-adopt: run orch apply from monitors It looks like we can't run the ceph orch apply commands on nodes other than monitors even if it used to work in the past. Signed-off-by: Dimitri Savineau (cherry picked from commit b38019e3ca374419344b8a441c2a60e5053ddb31) --- infrastructure-playbooks/cephadm-adopt.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/infrastructure-playbooks/cephadm-adopt.yml b/infrastructure-playbooks/cephadm-adopt.yml index 98a1867af..6077cbb12 100644 --- a/infrastructure-playbooks/cephadm-adopt.yml +++ b/infrastructure-playbooks/cephadm-adopt.yml @@ -417,7 +417,7 @@ when: not containerized_deployment | bool - name: redeploy mds daemons - hosts: "{{ mds_group_name|default('mdss') }}" + hosts: "{{ mon_group_name|default('mons') }}" become: true gather_facts: false tasks: @@ -477,7 +477,7 @@ state: absent - name: rgw realm/zonegroup/zone requirements - hosts: "{{ rgw_group_name|default('rgws') }}" + hosts: "{{ mon_group_name|default('mons') }}" become: true gather_facts: false tasks: @@ -516,6 +516,13 @@ environment: CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}' + - name: update the placement of radosgw hosts + command: "cephadm shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} orch apply rgw {{ rgw_realm | default('default') }} {{ rgw_zone | default('default') }} '{{ groups.get(rgw_group_name, []) | length }} label:{{ rgw_group_name }}' --port {{ radosgw_frontend_port }} {{ '--ssl' if radosgw_frontend_ssl_certificate else '' }}" + run_once: true + changed_when: false + environment: + CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}' + - name: redeploy rgw daemons hosts: "{{ rgw_group_name|default('rgws') }}" serial: 1 @@ -529,13 +536,6 @@ name: ceph-facts tasks_from: set_radosgw_address.yml - - name: update the placement of radosgw hosts - command: "cephadm shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} orch apply rgw {{ item.rgw_realm | default('default') }} {{ item.rgw_zone | default('default') }} 1 {{ ansible_hostname }} --port {{ item.radosgw_frontend_port }} {{ '--ssl' if radosgw_frontend_ssl_certificate else '' }}" - changed_when: false - loop: '{{ rgw_instances }}' - environment: - CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}' - - name: stop and disable ceph-radosgw systemd service service: name: 'ceph-radosgw@rgw.{{ ansible_hostname }}.{{ item.instance_name }}' @@ -581,7 +581,7 @@ state: absent - name: redeploy rbd-mirror daemons - hosts: "{{ rbdmirror_group_name|default('rbdmirrors') }}" + hosts: "{{ mon_group_name|default('mons') }}" become: true gather_facts: false tasks: -- 2.39.5