mirror of https://github.com/ceph/ceph-ansible.git
handler: fix call to container_exec_cmd in handler_osds
When unsetting the noup flag, we must call container_exec_cmd from the delegated node (first mon member) Also, adding a `run_once: true` because this task needs to be run only 1 time. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1792320 Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/4888/head
parent
2478a7b948
commit
22865cde9c
|
@ -6,6 +6,7 @@
|
||||||
- name: unset noup flag
|
- name: unset noup flag
|
||||||
command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd unset noup"
|
command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd unset noup"
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
|
run_once: true
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
|
||||||
# This does not just restart OSDs but everything else too. Unfortunately
|
# This does not just restart OSDs but everything else too. Unfortunately
|
||||||
|
|
|
@ -1,6 +1,14 @@
|
||||||
---
|
---
|
||||||
- name: keyring related tasks
|
- name: keyring related tasks
|
||||||
block:
|
block:
|
||||||
|
- name: set_fact container_exec_cmd
|
||||||
|
set_fact:
|
||||||
|
container_exec_cmd: "{{ container_binary }} exec ceph-mon-{{ hostvars[item]['ansible_hostname'] }}"
|
||||||
|
with_items: "{{ groups.get(mon_group_name, []) }}"
|
||||||
|
delegate_to: "{{ item }}"
|
||||||
|
delegate_facts: true
|
||||||
|
run_once: true
|
||||||
|
|
||||||
- name: get keys from monitors
|
- name: get keys from monitors
|
||||||
command: "{{ hostvars[groups.get(mon_group_name)[0]]['container_exec_cmd'] }} ceph --cluster {{ cluster }} auth get {{ item.name }}"
|
command: "{{ hostvars[groups.get(mon_group_name)[0]]['container_exec_cmd'] }} ceph --cluster {{ cluster }} auth get {{ item.name }}"
|
||||||
register: _rgw_keys
|
register: _rgw_keys
|
||||||
|
|
|
@ -3,6 +3,15 @@
|
||||||
set_fact:
|
set_fact:
|
||||||
add_osd: "{{ groups[osd_group_name] | length != ansible_play_hosts_all | length }}"
|
add_osd: "{{ groups[osd_group_name] | length != ansible_play_hosts_all | length }}"
|
||||||
|
|
||||||
|
- name: set_fact container_exec_cmd
|
||||||
|
set_fact:
|
||||||
|
container_exec_cmd: "{{ container_binary }} exec ceph-mon-{{ hostvars[item]['ansible_hostname'] }}"
|
||||||
|
with_items: "{{ groups.get(mon_group_name, []) }}"
|
||||||
|
delegate_to: "{{ item }}"
|
||||||
|
delegate_facts: true
|
||||||
|
run_once: true
|
||||||
|
when: containerized_deployment | bool
|
||||||
|
|
||||||
- name: include_tasks system_tuning.yml
|
- name: include_tasks system_tuning.yml
|
||||||
include_tasks: system_tuning.yml
|
include_tasks: system_tuning.yml
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue