From d788d2ce88bafa110411fca16e0a4638d0a1c639 Mon Sep 17 00:00:00 2001 From: James Saint-Rossy Date: Tue, 29 Mar 2016 18:49:46 -0400 Subject: [PATCH 1/6] Add infernalis to list of stable releases comment --- group_vars/all.sample | 1 + 1 file changed, 1 insertion(+) diff --git a/group_vars/all.sample b/group_vars/all.sample index baa9a077d..7dbb66498 100644 --- a/group_vars/all.sample +++ b/group_vars/all.sample @@ -88,6 +88,7 @@ dummy: # - 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://ceph.com/debian-{{ ceph_stable_release }}/dists/ From ae96854cda1971992bb99d2944f1025e7c64ba49 Mon Sep 17 00:00:00 2001 From: James Saint-Rossy Date: Wed, 30 Mar 2016 15:55:51 -0400 Subject: [PATCH 2/6] Fixed missing release, infernalis, in list of stable releases --- roles/ceph-common/defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/ceph-common/defaults/main.yml b/roles/ceph-common/defaults/main.yml index 8ae6d686a..18158f537 100644 --- a/roles/ceph-common/defaults/main.yml +++ b/roles/ceph-common/defaults/main.yml @@ -80,6 +80,7 @@ ceph_stable_releases: - 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://ceph.com/debian-{{ ceph_stable_release }}/dists/ From b55df730610a77dd88bbfef1b1e4e6a76c708eb8 Mon Sep 17 00:00:00 2001 From: James Saint-Rossy Date: Mon, 4 Apr 2016 18:19:49 -0400 Subject: [PATCH 3/6] Cleanup is_ceph_infernalis logic --- roles/ceph-common/tasks/main.yml | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/roles/ceph-common/tasks/main.yml b/roles/ceph-common/tasks/main.yml index f40a3bdb8..9d4887bf8 100644 --- a/roles/ceph-common/tasks/main.yml +++ b/roles/ceph-common/tasks/main.yml @@ -64,24 +64,16 @@ tags: - package-install -- name: get ceph rhcs version - shell: rpm -q --qf "%{version}\n" ceph-common | cut -f1,2 -d '.' +- name: get ceph version + shell: ceph --version | cut -f3 -d ' ' changed_when: false - failed_when: false - register: rh_storage_version - when: ceph_stable_rh_storage + register: ceph_version -# NOTE (leseb): be careful with the following -# somehow the YAML syntax using "is_ceph_infernalis: {{" -# does NOT work, so we keep this syntax styling... +# NOTE (leseb/jsaintrocc): Your supposed to qoute variables +# that follow colons to avoid confusion with dicts but this +# causes issues with the boolean, so we keep this syntax styling... - set_fact: - is_ceph_infernalis={{ (ceph_stable and ceph_stable_release not in ceph_stable_releases) or (ceph_dev) or (ceph_stable_rh_storage and (rh_storage_version.stdout | version_compare('0.94', '>'))) }} - -- set_fact: - is_ceph_infernalis=True - when: - ansible_os_family == 'Debian' and - ceph_stable_rh_storage + is_ceph_infernalis={{ ceph_version.stdout | version_compare('9.2.0', '>=') }} - set_fact: dir_owner: ceph From 3f9bd5c1b74225b425858ae0c098fc01dae21004 Mon Sep 17 00:00:00 2001 From: James Saint-Rossy Date: Sat, 9 Apr 2016 17:21:36 -0400 Subject: [PATCH 4/6] Removed infernalis workaround because ceph_stable_releases now includes it by default --- .../tasks/installs/install_on_redhat.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/roles/ceph-common/tasks/installs/install_on_redhat.yml b/roles/ceph-common/tasks/installs/install_on_redhat.yml index f4541ebfd..b079a4dbe 100644 --- a/roles/ceph-common/tasks/installs/install_on_redhat.yml +++ b/roles/ceph-common/tasks/installs/install_on_redhat.yml @@ -36,13 +36,6 @@ state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" when: not ceph_stable_rh_storage -# include Infernalis in the set of releases that do not have -# a separate ceph-mon package or ceph-osd package -# Note: Red Hat Ceph Storage is different, DOES separate them even in hammer - -- set_fact: > - ceph_stable_rel_pkg="{{ ceph_stable_releases | union([ 'infernalis' ]) }}" - - name: install distro or red hat storage ceph mon yum: name: "{{ item }}" @@ -52,7 +45,7 @@ - ceph-mon when: (ceph_origin == "distro" or ceph_stable_rh_storage or - (ceph_stable and ceph_stable_release not in ceph_stable_rel_pkg)) and + (ceph_stable and ceph_stable_release not in ceph_stable_releases)) and mon_group_name in group_names and ansible_pkg_mgr == "yum" @@ -65,7 +58,7 @@ - ceph-mon when: (ceph_origin == "distro" or ceph_stable_rh_storage or - (ceph_stable and ceph_stable_release not in ceph_stable_rel_pkg)) and + (ceph_stable and ceph_stable_release not in ceph_stable_releases)) and mon_group_name in group_names and ansible_pkg_mgr == "dnf" @@ -78,7 +71,7 @@ - ceph-osd when: (ceph_origin == "distro" or ceph_stable_rh_storage or - (ceph_stable and ceph_stable_release not in ceph_stable_rel_pkg)) and + (ceph_stable and ceph_stable_release not in ceph_stable_releases)) and osd_group_name in group_names and ansible_pkg_mgr == "yum" @@ -91,7 +84,7 @@ - ceph-osd when: (ceph_origin == "distro" or ceph_stable_rh_storage or - (ceph_stable and ceph_stable_release not in ceph_stable_rel_pkg)) and + (ceph_stable and ceph_stable_release not in ceph_stable_releases)) and osd_group_name in group_names and ansible_pkg_mgr == "dnf" From ee1e4707575b838b7d2ed34279dbbe1f29307cd0 Mon Sep 17 00:00:00 2001 From: James Saint-Rossy Date: Tue, 12 Apr 2016 21:08:42 -0400 Subject: [PATCH 5/6] moved string parsing of ceph version into ansbile for better error handling --- roles/ceph-common/tasks/main.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/roles/ceph-common/tasks/main.yml b/roles/ceph-common/tasks/main.yml index 02d333920..8048bddb9 100644 --- a/roles/ceph-common/tasks/main.yml +++ b/roles/ceph-common/tasks/main.yml @@ -65,15 +65,18 @@ - package-install - name: get ceph version - shell: ceph --version | cut -f3 -d ' ' + command: ceph --version changed_when: false register: ceph_version +- set_fact: + ceph_version: "{{ ceph_version.stdout.split(' ')[2] }}" + # NOTE (leseb/jsaintrocc): Your supposed to qoute variables # that follow colons to avoid confusion with dicts but this # causes issues with the boolean, so we keep this syntax styling... - set_fact: - is_ceph_infernalis={{ ceph_version.stdout | version_compare('9.2.0', '>=') }} + is_ceph_infernalis={{ ceph_version | version_compare('9.2.0', '>=') }} - set_fact: dir_owner: ceph From 67a895159ee96ca0234c094103514efc86d28125 Mon Sep 17 00:00:00 2001 From: James Saint-Rossy Date: Mon, 18 Apr 2016 10:49:35 -0400 Subject: [PATCH 6/6] Updated version compare to 0.84.0 per laseb comment --- roles/ceph-mon/tasks/create_mds_filesystems.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/ceph-mon/tasks/create_mds_filesystems.yml b/roles/ceph-mon/tasks/create_mds_filesystems.yml index 1bc826cfe..fd34f6d05 100644 --- a/roles/ceph-mon/tasks/create_mds_filesystems.yml +++ b/roles/ceph-mon/tasks/create_mds_filesystems.yml @@ -9,9 +9,9 @@ - cephfs_data - cephfs_metadata changed_when: false - when: not {{ ceph_version | version_compare('0.80.0', '<') }} + when: not {{ ceph_version | version_compare('0.84.0', '<') }} - 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.80.0', '<') }} + when: not {{ ceph_version | version_compare('0.84.0', '<') }}