]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
cephadm-adopt: run orch apply from monitors
authorDimitri Savineau <dsavinea@redhat.com>
Thu, 9 Jul 2020 22:28:49 +0000 (18:28 -0400)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Fri, 10 Jul 2020 15:08:30 +0000 (11:08 -0400)
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 <dsavinea@redhat.com>
(cherry picked from commit b38019e3ca374419344b8a441c2a60e5053ddb31)

infrastructure-playbooks/cephadm-adopt.yml

index 98a1867af8de2c268d4f2ee9503737d4c0dc3fd7..6077cbb12d819559beda561d6a72e959319fdf8d 100644 (file)
       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:
         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:
           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
         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 }}'
         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: