|
25 | 25 | - "mgr fail"
|
26 | 26 | when: '"Cannot stop active Mgr daemon" in cephadm_commands_result.results[0].stderr'
|
27 | 27 |
|
| 28 | +# RADOS Gateway services prevent a host from entering maintenance. |
| 29 | +# Remove the rgw label from the host and wait for Ceph orchestrator to remove |
| 30 | +# the service from the host. |
| 31 | +- name: Stop RADOS Gateway service |
| 32 | + when: "'rgws' in group_names" |
| 33 | + block: |
| 34 | + - name: Ensure rgw label has been removed from node |
| 35 | + ansible.builtin.include_role: |
| 36 | + name: stackhpc.cephadm.commands |
| 37 | + vars: |
| 38 | + cephadm_commands: |
| 39 | + - "orch host label rm {{ cephadm_hostname }} rgw" |
| 40 | + |
| 41 | + - name: Wait for RADOS Gateway service to stop |
| 42 | + ansible.builtin.include_role: |
| 43 | + name: stackhpc.cephadm.commands |
| 44 | + vars: |
| 45 | + cephadm_commands: |
| 46 | + - "orch ls rgw --format json-pretty" |
| 47 | + cephadm_commands_until: >- |
| 48 | + {{ (cephadm_commands_result.stdout | from_json)[0].status.running == |
| 49 | + (cephadm_commands_result.stdout | from_json)[0].status.size }} |
| 50 | + cephadm_commands_retries: 30 |
| 51 | + cephadm_commands_delay: 10 |
| 52 | + |
28 | 53 | - name: Ensure host is in maintenance mode
|
29 |
| - ansible.builtin.include_role: |
30 |
| - name: stackhpc.cephadm.commands |
31 |
| - vars: |
32 |
| - cephadm_commands: |
33 |
| - - "orch host maintenance enter {{ cephadm_hostname }}" |
| 54 | + block: |
| 55 | + - name: Ensure host is in maintenance mode |
| 56 | + ansible.builtin.include_role: |
| 57 | + name: stackhpc.cephadm.commands |
| 58 | + vars: |
| 59 | + cephadm_commands: |
| 60 | + - "orch host maintenance enter {{ cephadm_hostname }}" |
| 61 | + always: |
| 62 | + - name: Ensure rgw label has been added to node |
| 63 | + ansible.builtin.include_role: |
| 64 | + name: stackhpc.cephadm.commands |
| 65 | + vars: |
| 66 | + cephadm_commands: |
| 67 | + - "orch host label add {{ cephadm_hostname }} rgw" |
| 68 | + when: "'rgws' in group_names" |
0 commit comments