mirror of https://github.com/ceph/ceph-ansible.git
Revert to v2.1.6 (631e6d0fbb
)
parent
fe324025aa
commit
834ddabf56
|
@ -48,10 +48,7 @@ ceph_conf_overrides:
|
||||||
osd mkfs type: ext4
|
osd mkfs type: ext4
|
||||||
```
|
```
|
||||||
|
|
||||||
### Note
|
**Note:** we will no longer accept pull requests that modify the ceph.conf template unless it helps the deployment. For simple configuration tweaks
|
||||||
* It is not recommended to use underscores when defining options in the `ceph_conf_overrides` variable (ex. osd_mkfs_type) as this may cause issues with
|
|
||||||
incorrect configuration options appearing in ceph.conf.
|
|
||||||
* We will no longer accept pull requests that modify the ceph.conf template unless it helps the deployment. For simple configuration tweaks
|
|
||||||
please use the `ceph_conf_overrides` variable.
|
please use the `ceph_conf_overrides` variable.
|
||||||
|
|
||||||
## Special notes
|
## Special notes
|
||||||
|
|
|
@ -330,7 +330,6 @@ dummy:
|
||||||
#handler_health_mon_check_delay: 10
|
#handler_health_mon_check_delay: 10
|
||||||
#handler_health_osd_check_retries: 40
|
#handler_health_osd_check_retries: 40
|
||||||
#handler_health_osd_check_delay: 30
|
#handler_health_osd_check_delay: 30
|
||||||
#handler_health_osd_check: true
|
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# CONFIG OVERRIDE #
|
# CONFIG OVERRIDE #
|
||||||
|
|
|
@ -322,7 +322,6 @@ handler_health_mon_check_retries: 5
|
||||||
handler_health_mon_check_delay: 10
|
handler_health_mon_check_delay: 10
|
||||||
handler_health_osd_check_retries: 40
|
handler_health_osd_check_retries: 40
|
||||||
handler_health_osd_check_delay: 30
|
handler_health_osd_check_delay: 30
|
||||||
handler_health_osd_check: true
|
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# CONFIG OVERRIDE #
|
# CONFIG OVERRIDE #
|
||||||
|
|
|
@ -17,4 +17,3 @@
|
||||||
retries: "{{ handler_health_osd_check_retries }}"
|
retries: "{{ handler_health_osd_check_retries }}"
|
||||||
delay: "{{ handler_health_osd_check_delay }}"
|
delay: "{{ handler_health_osd_check_delay }}"
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
when: handler_health_osd_check
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
---
|
|
||||||
- include: system_checks.yml
|
|
|
@ -1,5 +0,0 @@
|
||||||
---
|
|
||||||
- name: fail if systemd is not present
|
|
||||||
fail:
|
|
||||||
msg: "Systemd must be present"
|
|
||||||
when: ansible_service_mgr != 'systemd'
|
|
|
@ -8,22 +8,26 @@
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: link systemd unit file for mds instance
|
- name: link systemd unit file for mds instance
|
||||||
file:
|
file:
|
||||||
src: /var/lib/ceph/ceph-mds@.service
|
src: /var/lib/ceph/ceph-mds@.service
|
||||||
dest: /etc/systemd/system/multi-user.target.wants/ceph-mds@{{ ansible_hostname }}.service
|
dest: /etc/systemd/system/multi-user.target.wants/ceph-mds@{{ ansible_hostname }}.service
|
||||||
state: link
|
state: link
|
||||||
|
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: enable systemd unit file for mds instance
|
- name: enable systemd unit file for mds instance
|
||||||
command: systemctl enable /etc/systemd/system/multi-user.target.wants/ceph-mds@{{ ansible_hostname }}.service
|
command: systemctl enable /etc/systemd/system/multi-user.target.wants/ceph-mds@{{ ansible_hostname }}.service
|
||||||
failed_when: false
|
failed_when: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: reload systemd unit files
|
- name: reload systemd unit files
|
||||||
command: systemctl daemon-reload
|
command: systemctl daemon-reload
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: systemd start mds container
|
- name: systemd start mds container
|
||||||
service:
|
service:
|
||||||
|
|
|
@ -62,29 +62,21 @@
|
||||||
|
|
||||||
- include: start_docker_monitor.yml
|
- include: start_docker_monitor.yml
|
||||||
|
|
||||||
- name: wait for monitor socket to exist
|
# NOTE: if we don't wait we will attempt to copy config to ansible host
|
||||||
command: docker exec {{ ansible_hostname }} stat /var/run/ceph/{{ cluster }}-mon.{{ ansible_hostname }}.asok
|
# before admin key is ready, preventing future daemons e.g. ceph-mds from
|
||||||
register: monitor_socket
|
# properly retrieving key
|
||||||
retries: 5
|
- name: "wait for {{ cluster }}.client.admin.keyring exists"
|
||||||
delay: 10
|
wait_for:
|
||||||
until: monitor_socket.rc == 0
|
path: /etc/ceph/{{ cluster }}.client.admin.keyring
|
||||||
|
when: cephx
|
||||||
- name: force peer addition as potential bootstrap peer for cluster bringup
|
|
||||||
command: docker exec {{ ansible_hostname }} ceph --admin-daemon /var/run/ceph/{{ cluster }}-mon.{{ ansible_hostname }}.asok add_bootstrap_peer_hint {{ hostvars[item]['ansible_' + ceph_mon_docker_interface].ipv4.address }}
|
|
||||||
with_items: "{{ groups.mons }}"
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
when:
|
|
||||||
- inventory_hostname == groups.mons[0]
|
|
||||||
- not mon_containerized_deployment_with_kv
|
|
||||||
|
|
||||||
- include: copy_configs.yml
|
- include: copy_configs.yml
|
||||||
when: not mon_containerized_deployment_with_kv
|
when: not mon_containerized_deployment_with_kv
|
||||||
|
|
||||||
- name: create ceph rest api keyring when mon is containerized
|
- name: create ceph rest api keyring when mon is containerized
|
||||||
command: docker exec {{ ansible_hostname }} ceph --cluster {{ cluster }} auth get-or-create client.restapi osd 'allow *' mon 'allow *' -o /etc/ceph/{{ cluster }}.client.restapi.keyring
|
command: docker exec {{ ansible_hostname }} ceph auth get-or-create client.restapi osd 'allow *' mon 'allow *' -o /etc/ceph/ceph.client.restapi.keyring
|
||||||
args:
|
args:
|
||||||
creates: /etc/ceph/{{ cluster }}.client.restapi.keyring
|
creates: /etc/ceph/ceph.client.restapi.keyring
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- cephx
|
- cephx
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
image: "{{ ceph_mon_docker_username }}/{{ ceph_mon_docker_imagename }}:{{ ceph_mon_docker_image_tag }}"
|
image: "{{ ceph_mon_docker_username }}/{{ ceph_mon_docker_imagename }}:{{ ceph_mon_docker_image_tag }}"
|
||||||
when: mon_containerized_deployment_with_kv
|
when: mon_containerized_deployment_with_kv
|
||||||
|
|
||||||
|
# Use systemd to manage container on Atomic host and CoreOS
|
||||||
- name: generate systemd unit file
|
- name: generate systemd unit file
|
||||||
become: true
|
become: true
|
||||||
template:
|
template:
|
||||||
|
@ -48,16 +49,19 @@
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: enable systemd unit file for mon instance
|
- name: enable systemd unit file for mon instance
|
||||||
shell: systemctl enable ceph-mon@{{ ansible_hostname }}.service
|
shell: systemctl enable ceph-mon@{{ ansible_hostname }}.service
|
||||||
failed_when: false
|
failed_when: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: reload systemd unit files
|
- name: reload systemd unit files
|
||||||
shell: systemctl daemon-reload
|
shell: systemctl daemon-reload
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: systemd start mon container
|
- name: systemd start mon container
|
||||||
service:
|
service:
|
||||||
|
|
|
@ -5,7 +5,7 @@ After=docker.service
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=-/etc/environment
|
EnvironmentFile=-/etc/environment
|
||||||
ExecStartPre=-/usr/bin/docker rm %i
|
ExecStartPre=-/usr/bin/docker rm %i
|
||||||
ExecStartPre=$(command -v mkdir) -p /etc/ceph /var/lib/ceph/mon
|
ExecStartPre=/usr/bin/mkdir -p /etc/ceph /var/lib/ceph/mon
|
||||||
ExecStart=/usr/bin/docker run --rm --name %i --net=host \
|
ExecStart=/usr/bin/docker run --rm --name %i --net=host \
|
||||||
{% if not mon_containerized_deployment_with_kv -%}
|
{% if not mon_containerized_deployment_with_kv -%}
|
||||||
-v /var/lib/ceph:/var/lib/ceph \
|
-v /var/lib/ceph:/var/lib/ceph \
|
||||||
|
|
|
@ -8,22 +8,34 @@
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
when:
|
||||||
|
is_atomic or
|
||||||
|
ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: link systemd unit file for NFS instance
|
- name: link systemd unit file for NFS instance
|
||||||
file:
|
file:
|
||||||
src: /var/lib/nfs/ganesha/ceph-nfs@.service
|
src: /var/lib/nfs/ganesha/ceph-nfs@.service
|
||||||
dest: /etc/systemd/system/multi-user.target.wants/ceph-nfs@{{ ansible_hostname }}.service
|
dest: /etc/systemd/system/multi-user.target.wants/ceph-nfs@{{ ansible_hostname }}.service
|
||||||
state: link
|
state: link
|
||||||
|
when:
|
||||||
|
is_atomic or
|
||||||
|
ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: enable systemd unit file for NFS instance
|
- name: enable systemd unit file for NFS instance
|
||||||
shell: systemctl enable /etc/systemd/system/multi-user.target.wants/ceph-nfs@{{ ansible_hostname }}.service
|
shell: systemctl enable /etc/systemd/system/multi-user.target.wants/ceph-nfs@{{ ansible_hostname }}.service
|
||||||
failed_when: false
|
failed_when: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
when:
|
||||||
|
is_atomic or
|
||||||
|
ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: reload systemd unit files
|
- name: reload systemd unit files
|
||||||
shell: systemctl daemon-reload
|
shell: systemctl daemon-reload
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
when:
|
||||||
|
is_atomic or
|
||||||
|
ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: systemd start NFS container
|
- name: systemd start NFS container
|
||||||
service:
|
service:
|
||||||
|
|
|
@ -67,6 +67,7 @@
|
||||||
- ceph_osd_docker_prepare_env is defined
|
- ceph_osd_docker_prepare_env is defined
|
||||||
- osd_containerized_deployment_with_kv
|
- osd_containerized_deployment_with_kv
|
||||||
|
|
||||||
|
# Use systemd to manage container on appropriate host
|
||||||
- name: generate systemd unit file
|
- name: generate systemd unit file
|
||||||
become: true
|
become: true
|
||||||
template:
|
template:
|
||||||
|
@ -76,17 +77,20 @@
|
||||||
group: "root"
|
group: "root"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: enable systemd unit file for osd instance
|
- name: enable systemd unit file for osd instance
|
||||||
shell: systemctl enable ceph-osd@{{ item | basename }}.service
|
shell: systemctl enable ceph-osd@{{ item | basename }}.service
|
||||||
failed_when: false
|
failed_when: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
with_items: "{{ ceph_osd_docker_devices }}"
|
with_items: "{{ ceph_osd_docker_devices }}"
|
||||||
|
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: reload systemd unit files
|
- name: reload systemd unit files
|
||||||
shell: systemctl daemon-reload
|
shell: systemctl daemon-reload
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: systemd start osd container
|
- name: systemd start osd container
|
||||||
service:
|
service:
|
||||||
|
|
|
@ -8,16 +8,19 @@
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: enable systemd unit file for rbd mirror instance
|
- name: enable systemd unit file for rbd mirror instance
|
||||||
command: systemctl enable ceph-rbd-mirror@{{ ansible_hostname }}.service
|
command: systemctl enable ceph-rbd-mirror@{{ ansible_hostname }}.service
|
||||||
failed_when: false
|
failed_when: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: reload systemd unit files
|
- name: reload systemd unit files
|
||||||
command: systemctl daemon-reload
|
command: systemctl daemon-reload
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: systemd start rbd mirror container
|
- name: systemd start rbd mirror container
|
||||||
service:
|
service:
|
||||||
|
|
|
@ -8,22 +8,26 @@
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: link systemd unit file for rgw instance
|
- name: link systemd unit file for rgw instance
|
||||||
file:
|
file:
|
||||||
src: /var/lib/ceph/ceph-rgw@.service
|
src: /var/lib/ceph/ceph-rgw@.service
|
||||||
dest: /etc/systemd/system/multi-user.target.wants/ceph-rgw@{{ ansible_hostname }}.service
|
dest: /etc/systemd/system/multi-user.target.wants/ceph-rgw@{{ ansible_hostname }}.service
|
||||||
state: link
|
state: link
|
||||||
|
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: enable systemd unit file for rgw instance
|
- name: enable systemd unit file for rgw instance
|
||||||
shell: systemctl enable /etc/systemd/system/multi-user.target.wants/ceph-rgw@{{ ansible_hostname }}.service
|
shell: systemctl enable /etc/systemd/system/multi-user.target.wants/ceph-rgw@{{ ansible_hostname }}.service
|
||||||
failed_when: false
|
failed_when: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: reload systemd unit files
|
- name: reload systemd unit files
|
||||||
shell: systemctl daemon-reload
|
shell: systemctl daemon-reload
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: systemd start rgw container
|
- name: systemd start rgw container
|
||||||
service:
|
service:
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
|
|
||||||
# Continue with common tasks
|
# Continue with common tasks
|
||||||
- name: add zone to rgw stanza in ceph.conf
|
- name: add zone to rgw stanza in ceph.conf
|
||||||
ini_file:
|
lineinfile:
|
||||||
dest: "/etc/ceph/{{ cluster }}.conf"
|
dest: "/etc/ceph/{{ cluster }}.conf"
|
||||||
section: "client.rgw.{{ ansible_hostname }}"
|
regexp: "{{ ansible_host }}"
|
||||||
option: "rgw_zone"
|
insertafter: "^[client.rgw.{{ ansible_host }}]"
|
||||||
value: "{{ rgw_zone }}"
|
line: "rgw_zone = {{ rgw_zone }}"
|
||||||
|
state: present
|
||||||
notify:
|
notify:
|
||||||
- restart rgw
|
- restart rgw
|
||||||
|
|
Loading…
Reference in New Issue