Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cephadm: use cephadm to distribute ceph.conf #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 4 additions & 25 deletions cephadm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@
- name: disable stderr logging of cluster log
shell: ceph config set global mon_cluster_log_to_stderr false

- name: distribute ceph.conf by default
shell: ceph config set mgr mgr/cephadm/manage_etc_ceph_ceph_conf true
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sebastian-philipp this doesn't seem to work. I tried this with master and pacific. Nothing gets distributed to the clients. Clients are labeled with "_no_schedule" and "clients".


- hosts: mons mgrs osds mdss grafana-servers
- hosts: mons mgrs osds mdss grafana-servers clients
become: yes
tasks:
- name: fetch ceph.pub
Expand All @@ -104,11 +106,7 @@
register: myhostname

- name: add hostname to cephadm
shell: ceph orch host add "{{ myhostname.stdout }}" "{{ ansible_ssh_host }}"
delegate_to: mon-000

- name: label host
shell: ceph orch host label add "{{ myhostname.stdout }}" "{{ ceph_group }}"
shell: ceph orch host add "{{ myhostname.stdout }}" "{{ ansible_ssh_host }}" --labels {{ ceph_group }}{{ ',_no_schedule' if 'clients' in group_names else '' }}{{ ',_admin' if 'mons' in group_names else '' }}
delegate_to: mon-000

- hosts: mon-000
Expand Down Expand Up @@ -137,25 +135,6 @@
shell: ceph orch apply mds all --placement=label:mdss
when: groups['mdss'] | default([]) | length > 0

- hosts: all
become: yes
tasks:
- name: generate min config
shell: ceph config generate-minimal-conf
delegate_to: mon-000
register: minimal_config
run_once: true

- name: setup config
copy:
# yay ansible bug: https://github.com/ansible/ansible/issues/6077
content: "{{ minimal_config.stdout }}\n"
dest: /etc/ceph/ceph.conf
owner: root
group: root
mode: 0644


- hosts: clients
become: yes
tasks:
Expand Down