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
|
||||
```
|
||||
|
||||
### Note
|
||||
* 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
|
||||
**Note:** 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.
|
||||
|
||||
## Special notes
|
||||
|
|
|
@ -330,7 +330,6 @@ dummy:
|
|||
#handler_health_mon_check_delay: 10
|
||||
#handler_health_osd_check_retries: 40
|
||||
#handler_health_osd_check_delay: 30
|
||||
#handler_health_osd_check: true
|
||||
|
||||
###################
|
||||
# CONFIG OVERRIDE #
|
||||
|
|
|
@ -322,7 +322,6 @@ handler_health_mon_check_retries: 5
|
|||
handler_health_mon_check_delay: 10
|
||||
handler_health_osd_check_retries: 40
|
||||
handler_health_osd_check_delay: 30
|
||||
handler_health_osd_check: true
|
||||
|
||||
###################
|
||||
# CONFIG OVERRIDE #
|
||||
|
|
|
@ -17,4 +17,3 @@
|
|||
retries: "{{ handler_health_osd_check_retries }}"
|
||||
delay: "{{ handler_health_osd_check_delay }}"
|
||||
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"
|
||||
group: "root"
|
||||
mode: "0644"
|
||||
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: link systemd unit file for mds instance
|
||||
file:
|
||||
src: /var/lib/ceph/ceph-mds@.service
|
||||
dest: /etc/systemd/system/multi-user.target.wants/ceph-mds@{{ ansible_hostname }}.service
|
||||
state: link
|
||||
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: enable systemd unit file for mds instance
|
||||
command: systemctl enable /etc/systemd/system/multi-user.target.wants/ceph-mds@{{ ansible_hostname }}.service
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: reload systemd unit files
|
||||
command: systemctl daemon-reload
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: systemd start mds container
|
||||
service:
|
||||
|
|
|
@ -62,29 +62,21 @@
|
|||
|
||||
- include: start_docker_monitor.yml
|
||||
|
||||
- name: wait for monitor socket to exist
|
||||
command: docker exec {{ ansible_hostname }} stat /var/run/ceph/{{ cluster }}-mon.{{ ansible_hostname }}.asok
|
||||
register: monitor_socket
|
||||
retries: 5
|
||||
delay: 10
|
||||
until: monitor_socket.rc == 0
|
||||
|
||||
- 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
|
||||
# NOTE: if we don't wait we will attempt to copy config to ansible host
|
||||
# before admin key is ready, preventing future daemons e.g. ceph-mds from
|
||||
# properly retrieving key
|
||||
- name: "wait for {{ cluster }}.client.admin.keyring exists"
|
||||
wait_for:
|
||||
path: /etc/ceph/{{ cluster }}.client.admin.keyring
|
||||
when: cephx
|
||||
|
||||
- include: copy_configs.yml
|
||||
when: not mon_containerized_deployment_with_kv
|
||||
|
||||
- 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:
|
||||
creates: /etc/ceph/{{ cluster }}.client.restapi.keyring
|
||||
creates: /etc/ceph/ceph.client.restapi.keyring
|
||||
changed_when: false
|
||||
when:
|
||||
- cephx
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
image: "{{ ceph_mon_docker_username }}/{{ ceph_mon_docker_imagename }}:{{ ceph_mon_docker_image_tag }}"
|
||||
when: mon_containerized_deployment_with_kv
|
||||
|
||||
# Use systemd to manage container on Atomic host and CoreOS
|
||||
- name: generate systemd unit file
|
||||
become: true
|
||||
template:
|
||||
|
@ -48,16 +49,19 @@
|
|||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0644"
|
||||
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: enable systemd unit file for mon instance
|
||||
shell: systemctl enable ceph-mon@{{ ansible_hostname }}.service
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: reload systemd unit files
|
||||
shell: systemctl daemon-reload
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: systemd start mon container
|
||||
service:
|
||||
|
|
|
@ -5,7 +5,7 @@ After=docker.service
|
|||
[Service]
|
||||
EnvironmentFile=-/etc/environment
|
||||
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 \
|
||||
{% if not mon_containerized_deployment_with_kv -%}
|
||||
-v /var/lib/ceph:/var/lib/ceph \
|
||||
|
|
|
@ -8,22 +8,34 @@
|
|||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0644"
|
||||
when:
|
||||
is_atomic or
|
||||
ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: link systemd unit file for NFS instance
|
||||
file:
|
||||
src: /var/lib/nfs/ganesha/ceph-nfs@.service
|
||||
dest: /etc/systemd/system/multi-user.target.wants/ceph-nfs@{{ ansible_hostname }}.service
|
||||
state: link
|
||||
when:
|
||||
is_atomic or
|
||||
ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: enable systemd unit file for NFS instance
|
||||
shell: systemctl enable /etc/systemd/system/multi-user.target.wants/ceph-nfs@{{ ansible_hostname }}.service
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
when:
|
||||
is_atomic or
|
||||
ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: reload systemd unit files
|
||||
shell: systemctl daemon-reload
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
when:
|
||||
is_atomic or
|
||||
ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: systemd start NFS container
|
||||
service:
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
- ceph_osd_docker_prepare_env is defined
|
||||
- osd_containerized_deployment_with_kv
|
||||
|
||||
# Use systemd to manage container on appropriate host
|
||||
- name: generate systemd unit file
|
||||
become: true
|
||||
template:
|
||||
|
@ -76,17 +77,20 @@
|
|||
group: "root"
|
||||
mode: "0644"
|
||||
failed_when: false
|
||||
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: enable systemd unit file for osd instance
|
||||
shell: systemctl enable ceph-osd@{{ item | basename }}.service
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
with_items: "{{ ceph_osd_docker_devices }}"
|
||||
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: reload systemd unit files
|
||||
shell: systemctl daemon-reload
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: systemd start osd container
|
||||
service:
|
||||
|
|
|
@ -8,16 +8,19 @@
|
|||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0644"
|
||||
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: enable systemd unit file for rbd mirror instance
|
||||
command: systemctl enable ceph-rbd-mirror@{{ ansible_hostname }}.service
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: reload systemd unit files
|
||||
command: systemctl daemon-reload
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: systemd start rbd mirror container
|
||||
service:
|
||||
|
|
|
@ -8,22 +8,26 @@
|
|||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0644"
|
||||
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: link systemd unit file for rgw instance
|
||||
file:
|
||||
src: /var/lib/ceph/ceph-rgw@.service
|
||||
dest: /etc/systemd/system/multi-user.target.wants/ceph-rgw@{{ ansible_hostname }}.service
|
||||
state: link
|
||||
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: enable systemd unit file for rgw instance
|
||||
shell: systemctl enable /etc/systemd/system/multi-user.target.wants/ceph-rgw@{{ ansible_hostname }}.service
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: reload systemd unit files
|
||||
shell: systemctl daemon-reload
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: systemd start rgw container
|
||||
service:
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
|
||||
# Continue with common tasks
|
||||
- name: add zone to rgw stanza in ceph.conf
|
||||
ini_file:
|
||||
lineinfile:
|
||||
dest: "/etc/ceph/{{ cluster }}.conf"
|
||||
section: "client.rgw.{{ ansible_hostname }}"
|
||||
option: "rgw_zone"
|
||||
value: "{{ rgw_zone }}"
|
||||
regexp: "{{ ansible_host }}"
|
||||
insertafter: "^[client.rgw.{{ ansible_host }}]"
|
||||
line: "rgw_zone = {{ rgw_zone }}"
|
||||
state: present
|
||||
notify:
|
||||
- restart rgw
|
||||
|
|
Loading…
Reference in New Issue