-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not force fail ceph-mgr after reconfiguring OSDs
Signed-off-by: Francesco Pantano <[email protected]>
- Loading branch information
Showing
2 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Get a client using -v /home/tripleo-admin/ceph_config:/etc/ceph:z as input | ||
- name: Refresh ceph_cli | ||
ansible.builtin.include_tasks: ceph_cli.yaml | ||
vars: | ||
ceph_config_home: "{{ ceph_config_tmp_client_home }}" | ||
ceph_fsid: "{{ mon_dump.fsid }}" | ||
ceph_cluster: ceph | ||
|
||
- name: Force fail ceph mgr | ||
become: true | ||
ansible.builtin.command: "{{ ceph_cli }} mgr fail" | ||
|
||
- name: Wait for cephadm to reconcile | ||
ansible.builtin.pause: | ||
seconds: "{{ ceph_wait_mon_timeout }}" | ||
|
||
- name: Get the ceph orchestrator status with | ||
become: true | ||
ansible.builtin.command: "{{ tripleo_cephadm_ceph_cli }} orch status --format json" | ||
register: ceph_orch_status | ||
async: 30 | ||
poll: 1 | ||
failed_when: false | ||
|
||
- name: Restart ceph active mgr if ceph orch is not responding | ||
become: true | ||
when: | ||
- ceph_orch_status.msg is defined | ||
- '"async task did not complete within the requested time" in ceph_orch_status.msg' | ||
block: | ||
- name: Restart the active mgr | ||
ansible.builtin.command: "{{ tripleo_cephadm_ceph_cli }} mgr fail" | ||
# This time we fail because something is wrong | ||
- name: Fail if ceph orchestrator is still not responding | ||
ansible.builtin.command: "{{ tripleo_cephadm_ceph_cli }} orch status --format json" | ||
become: true | ||
async: 30 | ||
poll: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters