Merge pull request #953 from jsaintrocc/hammerfix

Fixes for Hammer install and added numerical release checks
pull/1004/head
Leseb 2016-10-04 11:34:26 +02:00 committed by GitHub
commit 4bf7e8355a
21 changed files with 140 additions and 151 deletions

View File

@ -179,8 +179,6 @@ information about how to generate appropriate values for these variables.
By default, ceph-common installs from Ceph repository. However, you
can set `ceph_origin` to "distro" to install Ceph from your default repository.
Moreover for people looking to install any version of Ceph prior to the Jewel release on a Red Hat based system you would have to set `use_server_package_split: false`.
## Setup for Vagrant using libvirt provider
* Create vagrant_variables.yml

View File

@ -41,10 +41,6 @@ dummy:
# "state=latest".
#upgrade_ceph_packages: False
# If this is false then the 'ceph' package will be installed on rpm systems, which
# is not needed for versions after infernalis.
#use_server_package_split: true
# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_uca OR ceph_dev OR ceph_custom /!\
#debian_package_dependencies:
@ -113,17 +109,6 @@ dummy:
#ceph_stable_release: jewel # ceph stable release
#ceph_stable_repo: "http://download.ceph.com/debian-{{ ceph_stable_release }}"
###################
# Stable Releases #
###################
#ceph_stable_releases:
# - dumpling
# - emperor
# - firefly
# - giant
# - hammer
# - infernalis
# Use the option below to specify your applicable package tree, eg. when using non-LTS Ubuntu versions
# # for a list of available Debian distributions, visit http://download.ceph.com/debian-{{ ceph_stable_release }}/dists/
# for more info read: https://github.com/ceph/ceph-ansible/issues/305

View File

@ -86,7 +86,8 @@
ignore_errors: true
- name: wait for server to boot
local_action: wait_for port=22 host={{ inventory_hostname }} state=started delay=10 timeout=400
become: false
local_action: wait_for port=22 host={{ inventory_hostname }} state=started delay=10 timeout=500
- name: remove data
file:
@ -310,6 +311,7 @@
- name: is reboot needed
local_action: shell echo requesting reboot
become: false
notify:
- restart machine
- wait for server to boot

View File

@ -33,10 +33,6 @@ check_firewall: False
# "state=latest".
upgrade_ceph_packages: False
# If this is false then the 'ceph' package will be installed on rpm systems, which
# is not needed for versions after infernalis.
use_server_package_split: true
# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_uca OR ceph_dev OR ceph_custom /!\
debian_package_dependencies:
@ -105,16 +101,18 @@ ceph_stable_key: https://download.ceph.com/keys/release.asc
ceph_stable_release: jewel # ceph stable release
ceph_stable_repo: "http://download.ceph.com/debian-{{ ceph_stable_release }}"
###################
# Stable Releases #
###################
ceph_stable_releases:
- dumpling
- emperor
- firefly
- giant
- hammer
- infernalis
######################################
# Releases name to number dictionary #
######################################
ceph_release_num:
dumpling: 0.67
emperor: 0.72
firefly: 0.80
giant: 0.87
hammer: 0.94
infernalis: 9
jewel: 10
kraken: 11
# Use the option below to specify your applicable package tree, eg. when using non-LTS Ubuntu versions
# # for a list of available Debian distributions, visit http://download.ceph.com/debian-{{ ceph_stable_release }}/dists/

View File

@ -9,7 +9,7 @@
- socket.rc == 0
- ansible_distribution != 'Ubuntu'
- mon_group_name in group_names
- is_before_infernalis
- ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis
- name: restart ceph mons with systemd
service:
@ -19,7 +19,7 @@
- socket.rc == 0
- use_systemd
- mon_group_name in group_names
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- name: restart ceph mons on ubuntu
command: initctl restart ceph-mon cluster={{ cluster }} id={{ monitor_name }}
@ -35,7 +35,7 @@
- socket.rc == 0
- ansible_distribution != 'Ubuntu'
- osd_group_name in group_names
- is_before_infernalis
- ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis
# This does not just restart OSDs but everything else too. Unfortunately
# at this time the ansible role does not have an OSD id list to use
@ -48,7 +48,7 @@
- socket.rc == 0
- use_systemd
- osd_group_name in group_names
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- name: restart ceph osds on ubuntu
shell: |
@ -76,7 +76,7 @@
- ansible_distribution != 'Ubuntu'
- use_systemd
- mds_group_name in group_names
- is_before_infernalis
- ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis
- name: restart ceph mdss with systemd
service:
@ -86,7 +86,7 @@
- socket.rc == 0
- use_systemd
- mds_group_name in group_names
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- name: restart ceph rgws on ubuntu
command: initctl restart radosgw cluster={{ cluster }} id=rgw.{{ ansible_hostname }}
@ -102,7 +102,7 @@
- socketrgw.rc == 0
- ansible_distribution != 'Ubuntu'
- rgw_group_name in group_names
- is_before_infernalis
- ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis
- name: restart ceph rgws on red hat
command: /etc/init.d/ceph-radosgw restart
@ -110,7 +110,7 @@
- socketrgw.rc == 0
- ansible_os_family == 'RedHat'
- rgw_group_name in group_names
- is_before_infernalis
- ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis
- name: restart ceph rgws with systemd
service:
@ -120,7 +120,7 @@
- socketrgw.rc == 0
- use_systemd
- rgw_group_name in group_names
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- name: restart apache2
service:

View File

@ -21,48 +21,6 @@
- set_fact:
use_systemd={{ init_system.strip() == 'systemd' }}
# NOTE (leseb/jsaintrocc): You are supposed to quote variables
# that follow colons to avoid confusion with dicts but this
# causes issues with the boolean, so we keep this syntax styling...
# is_before facts
- set_fact:
is_before_hammer={{ ceph_version | version_compare('0.94.0', '<') }}
- set_fact:
is_before_infernalis={{ ceph_version | version_compare('9.0.0', '<') }}
- set_fact:
is_before_jewel={{ ceph_version | version_compare('10.0.0', '<') }}
- set_fact:
is_before_kraken={{ ceph_version | version_compare('11.0.0', '<') }}
# is_after facts
- set_fact:
is_after_hammer={{ ceph_version | version_compare('0.95.0', '>') }}
- set_fact:
is_after_infernalis={{ ceph_version | version_compare('9.4.0', '>') }}
- set_fact:
is_after_jewel={{ ceph_version | version_compare('10.4.0', '>') }}
- set_fact:
is_after_kraken={{ ceph_version | version_compare('11.4.0', '>') }}
# is_version facts
- set_fact:
is_hammer={{ ceph_version | version_compare('0.94.0', '>=') | version_compare('9.0.0', '<') }}
- set_fact:
is_infernalis={{ ceph_version | version_compare('9.0.0', '>=') and ceph_version | version_compare('10.0.0', '<') }}
- set_fact:
is_jewel={{ ceph_version | version_compare('10.0.0', '>=') and ceph_version | version_compare('11.0.0', '<') }}
- set_fact:
is_kraken={{ ceph_version | version_compare('11.0.0', '>=') and ceph_version | version_compare('12.0.0', '<') }}
- set_fact:
mds_name: "{{ ansible_hostname }}"
when: not mds_use_fqdn

View File

@ -3,7 +3,7 @@
yum:
name: "{{ item }}"
state: present
with_items: redhat_package_dependencies
with_items: "{{ redhat_package_dependencies }}"
when:
- ansible_distribution == "RedHat"
- ansible_pkg_mgr == "yum"
@ -12,7 +12,7 @@
dnf:
name: "{{ item }}"
state: present
with_items: redhat_package_dependencies
with_items: "{{ redhat_package_dependencies }}"
when:
- ansible_distribution == "RedHat"
- ansible_pkg_mgr == "dnf"
@ -21,7 +21,7 @@
yum:
name: "{{ item }}"
state: present
with_items: centos_package_dependencies
with_items: "{{ centos_package_dependencies }}"
when:
- ansible_distribution == "CentOS"
- ansible_pkg_mgr == "yum"
@ -30,7 +30,7 @@
dnf:
name: "{{ item }}"
state: present
with_items: centos_package_dependencies
with_items: "{{ centos_package_dependencies }}"
when:
- ansible_distribution == "CentOS"
- ansible_pkg_mgr == "dnf"
@ -58,7 +58,7 @@
copy:
src: "{{ansible_dir}}/rundep"
dest: "{{ item }}"
with_items: rundep_location.stdout_lines
with_items: "{{ rundep_location }}.stdout_lines"
when:
- ceph_origin == 'local'
- use_installer
@ -66,7 +66,7 @@
- name: install ceph dependencies
script: "{{ ansible_dir }}/rundep_installer.sh {{ item }}"
become: true
with_items: rundep_location.stdout_lines
with_items: "{{ rundep_location }}.stdout_lines"
when:
- ceph_origin == 'local'
- use_installer
@ -76,7 +76,7 @@
name: ceph
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
- not use_server_package_split
- ceph_release_num.{{ ceph_release }} <= ceph_release_num.infernalis
- ansible_pkg_mgr == "yum"
- ceph_origin != 'local'
@ -106,8 +106,7 @@
when:
- mon_group_name in group_names
- ansible_pkg_mgr == "yum"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
or ceph_dev
- ceph_release_num.{{ ceph_release }} > ceph_release_num.infernalis
or ceph_origin == "distro"
or ceph_custom
@ -118,9 +117,8 @@
when:
- mon_group_name in group_names
- ansible_pkg_mgr == "dnf"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
- ceph_release_num.{{ ceph_release }} > ceph_release_num.infernalis
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install distro or red hat storage ceph osd via yum
@ -130,9 +128,8 @@
when:
- osd_group_name in group_names
- ansible_pkg_mgr == "yum"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
- ceph_release_num.{{ ceph_release }} > ceph_release_num.infernalis
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install distro or red hat storage ceph osd via dnf
@ -142,9 +139,8 @@
when:
- osd_group_name in group_names
- ansible_pkg_mgr == "dnf"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
- ceph_release_num.{{ ceph_release }} > ceph_release_num.infernalis
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install distro or red hat storage ceph mds via yum
@ -154,9 +150,8 @@
when:
- mds_group_name in group_names
- ansible_pkg_mgr == "yum"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
- ceph_release_num.{{ ceph_release }} > ceph_release_num.infernalis
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install distro or red hat storage ceph mds via dnf
@ -166,9 +161,8 @@
when:
- mds_group_name in group_names
- ansible_pkg_mgr == "dnf"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
- ceph_release_num.{{ ceph_release }} > ceph_release_num.infernalis
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install distro or red hat storage ceph-fuse via yum
@ -178,7 +172,7 @@
when:
- client_group_name in group_names
- ansible_pkg_mgr == "yum"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
- ceph_release_num.{{ ceph_release }} > ceph_release_num.infernalis
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
@ -190,7 +184,7 @@
when:
- client_group_name in group_names
- ansible_pkg_mgr == "dnf"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
- ceph_release_num.{{ ceph_release }} > ceph_release_num.infernalis
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
@ -202,9 +196,8 @@
when:
- client_group_name in group_names
- ansible_pkg_mgr == "yum"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
- ceph_release_num.{{ ceph_release }} > ceph_release_num.infernalis
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install distro or red hat storage ceph base via dnf
@ -214,9 +207,8 @@
when:
- client_group_name in group_names
- ansible_pkg_mgr == "dnf"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
- ceph_release_num.{{ ceph_release }} > ceph_release_num.infernalis
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install ceph-test

View File

@ -3,11 +3,18 @@
- include: ./checks/check_mandatory_vars.yml
# Set ceph_release
- include: ./release.yml
- include: ./checks/check_firewall.yml
when: check_firewall
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- include: ./misc/system_tuning.yml
when: osd_group_name in group_names
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- include: ./pre_requisites/prerequisite_rh_storage_iso_install.yml
when:
@ -15,6 +22,8 @@
- ceph_rhcs_iso_install
tags:
- package-install
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- include: ./pre_requisites/prerequisite_rh_storage_cdn_install.yml
when:
@ -23,6 +32,8 @@
- ansible_os_family == "RedHat"
tags:
- package-install
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- include: ./installs/install_on_redhat.yml
when:
@ -30,6 +41,8 @@
not ceph_rhcs_iso_install
tags:
- package-install
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- include: ./installs/install_rh_storage_on_redhat.yml
when:
@ -37,6 +50,8 @@
- ceph_rhcs
tags:
- package-install
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- include: ./installs/install_on_debian.yml
when:
@ -44,6 +59,8 @@
- not ceph_rhcs
tags:
- package-install
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- include: ./installs/install_rh_storage_on_debian.yml
when:
@ -51,6 +68,8 @@
- ceph_rhcs
tags:
- package-install
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- include: ./installs/install_rgw_on_redhat.yml
when:
@ -59,6 +78,8 @@
- rgw_group_name in group_names
tags:
- package-install
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- include: ./installs/install_rgw_on_debian.yml
when:
@ -67,16 +88,22 @@
- rgw_group_name in group_names
tags:
- package-install
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- include: ./misc/ntp_redhat.yml
when:
- ansible_os_family == 'RedHat'
- ntp_service_enabled
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- include: ./misc/ntp_debian.yml
when:
- ansible_os_family == 'Debian'
- ntp_service_enabled
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- include: facts.yml
@ -84,77 +111,77 @@
dir_owner: ceph
dir_group: ceph
dir_mode: "0755"
when: is_after_hammer
when: ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- set_fact:
dir_owner: root
dir_group: root
dir_mode: "0755"
when: is_before_infernalis
when: ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis
- set_fact:
key_owner: root
key_group: root
key_mode: "0600"
when: is_before_infernalis
when: ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis
- set_fact:
key_owner: ceph
key_group: ceph
key_mode: "0600"
when: is_after_hammer
when: ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- set_fact:
activate_file_owner: ceph
activate_file_group: ceph
activate_file_mode: "0644"
when: is_after_hammer
when: ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- set_fact:
activate_file_owner: root
activate_file_group: root
activate_file_mode: "0644"
when: is_before_infernalis
when: ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis
- set_fact:
rbd_client_directory_owner: root
when:
- is_before_infernalis
- ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis
- rbd_client_directory_owner is not defined
or not rbd_client_directory_owner
- set_fact:
rbd_client_directory_owner: ceph
when:
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- rbd_client_directory_owner is not defined
or not rbd_client_directory_owner
- set_fact:
rbd_client_directory_group: root
when:
- is_before_infernalis
- ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis
- rbd_client_directory_group is not defined
or not rbd_client_directory_group
- set_fact:
rbd_client_directory_group: ceph
when:
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- rbd_client_directory_group is not defined
or not rbd_client_directory_group
- set_fact:
rbd_client_directory_mode: "1777"
when:
- is_before_infernalis
- ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis
- rbd_client_directory_mode is not defined
or not rbd_client_directory_mode
- set_fact:
rbd_client_directory_mode: "0770"
when:
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- rbd_client_directory_mode is not defined
or not rbd_client_directory_mode

View File

@ -0,0 +1,12 @@
---
# Set ceph_release to ceph_stable by default
- set_fact:
ceph_release: "{{ ceph_stable_release }}"
# Set ceph_release to latest known release (Which should match ceph_dev)
- set_fact:
ceph_release: "{{ item.key }}"
when:
- ceph_dev
- ({{ item.value }} > ceph_release_num.{{ ceph_release }})
with_dict: "{{ ceph_release_num }}"

View File

@ -76,7 +76,7 @@
failed_when: false
when:
- use_systemd
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- name: start and add that the metadata service to the init sequence (upstart)
command: initctl emit ceph-mds cluster={{ cluster }} id={{ mds_name }}
@ -93,7 +93,7 @@
changed_when: false
when:
- not use_systemd
- is_before_infernalis
- ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis
- name: start and add that the metadata service to the init sequence (systemd after hammer)
service:
@ -103,4 +103,4 @@
changed_when: false
when:
- use_systemd
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer

View File

@ -9,9 +9,9 @@
- cephfs_data
- cephfs_metadata
changed_when: false
when: not {{ ceph_version | version_compare('0.84.0', '<') }}
when: ceph_release_num.{{ ceph_release }} > ceph_release_num.firefly
- name: create ceph filesystem
command: ceph --cluster {{ cluster }} fs new {{ cephfs }} {{ cephfs_metadata }} {{ cephfs_data }}
changed_when: false
when: not {{ ceph_version | version_compare('0.84.0', '<') }}
when: ceph_release_num.{{ ceph_release }} > ceph_release_num.firefly

View File

@ -50,7 +50,7 @@
creates: /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring
when:
- cephx
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- name: ceph monitor mkfs without keyring (for or after infernalis release)
command: ceph-mon --cluster {{ cluster }} --setuser ceph --setgroup ceph --mkfs -i {{ monitor_name }} --fsid {{ fsid }}
@ -58,7 +58,7 @@
creates: /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/store.db
when:
- not cephx
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- name: ceph monitor mkfs with keyring (before infernalis release)
command: ceph-mon --mkfs -i {{ monitor_name }} --fsid {{ fsid }} --keyring /var/lib/ceph/tmp/keyring.mon.{{ monitor_name }}
@ -66,7 +66,7 @@
creates: /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring
when:
- cephx
- is_before_infernalis
- ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis
- name: ceph monitor mkfs without keyring (before infernalis release)
command: ceph-mon --mkfs -i {{ monitor_name }} --fsid {{ fsid }}
@ -74,4 +74,4 @@
creates: /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/store.db
when:
- not cephx
- is_before_infernalis
- ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis

View File

@ -9,4 +9,4 @@
with_nested:
- "{{ ceph_pools.stdout_lines|default([]) }}"
- secure_cluster_flags
when: "{{ ceph_version | version_compare('0.94.0', '>=') }}"
when: ceph_release_num.{{ ceph_release }} >= ceph_release_num.hammer

View File

@ -20,14 +20,28 @@
when:
- not use_systemd
# NOTE (leseb): somehow the service ansible module is messing things up
# as a safety measure we run the raw command
# legacy ceph system v init scripts require a mon section in order to work
# Not Ubuntu so we can catch old debian systems that don't use systemd or upstart
- name: add mon section into ceph.conf for systemv init scripts
ini_file:
dest: /etc/ceph/{{ cluster }}.conf
section: mon.{{ ansible_host }}
option: host
value: "{{ ansible_host }}"
state: present
when:
- ansible_os_family != "Ubuntu"
- ceph_release_num.{{ ceph_stable_release }} < ceph_release_num.infernalis
# NOTE (jsaintrocc): can't use service module because we need to use the
# legacy systemv init for older ceph releases. Even when the os supports systemd
# Not Ubuntu so we can catch old debian systems that don't use systemd or upstart
- name: start and add that the monitor service to the init sequence
command: service ceph start mon
changed_when: false
when:
- ansible_distribution != "Ubuntu"
- is_before_infernalis
- ansible_os_family != "Ubuntu"
- ceph_release_num.{{ ceph_stable_release }} < ceph_release_num.infernalis
- name: start and add that the monitor service to the init sequence (for or after infernalis)
command: systemctl enable ceph-mon@{{ monitor_name }}
@ -35,7 +49,7 @@
failed_when: false
when:
- use_systemd
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- name: start the monitor service (for or after infernalis)
service:
@ -45,7 +59,7 @@
changed_when: false
when:
- use_systemd
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- name: collect admin and bootstrap keys
command: ceph-create-keys --cluster {{ cluster }} --id {{ monitor_name }}

View File

@ -89,7 +89,7 @@
- ansible_selinux != false
- ansible_selinux['status'] == 'enabled'
- ansible_selinux['config_mode'] != 'disabled'
- is_before_infernalis
- ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis
- name: start and add that the osd service(s) to the init sequence (before infernalis)
service:
@ -98,7 +98,7 @@
enabled: yes
when:
- ansible_distribution != "Ubuntu"
- is_before_infernalis
- ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis
- name: get osd id (for or after infernalis)
shell: 'ls /var/lib/ceph/osd/ | grep -oP "\d+$"'
@ -107,7 +107,7 @@
register: osd_id
when:
- use_systemd
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- name: enable the osd service (for or after infernalis)
command: systemctl enable ceph-osd@{{ item }}
@ -116,7 +116,7 @@
with_items: "{{ osd_id.stdout_lines }}"
when:
- use_systemd
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- name: start and add that the osd service(s) to the init sequence (for or after infernalis)
service:
@ -127,4 +127,4 @@
changed_when: false
when:
- use_systemd
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer

View File

@ -12,7 +12,7 @@
changed_when: false
when:
- use_systemd
- is_before_infernalis
- ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis
- name: enable systemd unit file for the rbd mirror service (systemd after hammer)
command: systemctl enable ceph-rbd-mirror@{{ ceph_rbd_mirror_local_user }}
@ -20,7 +20,7 @@
failed_when: false
when:
- use_systemd
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- name: start and add that the rbd mirror service to the init sequence (systemd after hammer)
service:
@ -30,4 +30,4 @@
changed_when: false
when:
- use_systemd
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer

View File

@ -16,7 +16,10 @@
- name: include rgw multisite playbooks
include: multisite/main.yml
when: rgw_zone is defined and rgw_multisite and ( is_jewel or is_after_jewel )
when:
- rgw_zone is defined
- rgw_multisite
- ( ceph_release_num.{{ ceph_release }} >= ceph_release_num.jewel )
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False

View File

@ -47,7 +47,7 @@
creates: /var/run/systemd/generator.late/ceph-radosgw.service
when:
- ansible_os_family == "RedHat"
- is_before_infernalis
- ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis
- name: activate rados gateway with upstart
file:

View File

@ -26,7 +26,7 @@
enabled: yes
when:
- ansible_os_family == 'RedHat'
- is_before_infernalis
- ceph_release_num.{{ ceph_release }} < ceph_release_num.infernalis
- name: enable systemd unit file for rgw instance (for or after infernalis)
command: systemctl enable ceph-radosgw@rgw.{{ ansible_hostname }}
@ -34,7 +34,7 @@
failed_when: false
when:
- use_systemd
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer
- name: start rgw with systemd (for or after infernalis)
service:
@ -43,4 +43,4 @@
enabled: yes
when:
- use_systemd
- is_after_hammer
- ceph_release_num.{{ ceph_release }} > ceph_release_num.hammer