From 48bd80750834d6e5d594f174dd3008ffa9897c01 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Thu, 4 May 2017 11:14:58 +0200 Subject: [PATCH] Common: Do not install ceph-mgr packages on jewel ceph-mgr tasks has to be skipped on jewel. Fix: #1494 Signed-off-by: Guillaume Abrioux --- roles/ceph-common/tasks/installs/install_on_debian.yml | 4 +++- roles/ceph-common/tasks/installs/install_on_redhat.yml | 4 +++- .../tasks/installs/install_rh_storage_on_debian.yml | 4 +++- .../tasks/installs/install_rh_storage_on_redhat.yml | 4 +++- roles/ceph-mon/tasks/ceph_keys.yml | 1 + roles/ceph-mon/tasks/docker/main.yml | 1 + site-docker.yml.sample | 2 +- site.yml.sample | 2 +- 8 files changed, 16 insertions(+), 6 deletions(-) diff --git a/roles/ceph-common/tasks/installs/install_on_debian.yml b/roles/ceph-common/tasks/installs/install_on_debian.yml index ae6dfda92..54b1ef2f4 100644 --- a/roles/ceph-common/tasks/installs/install_on_debian.yml +++ b/roles/ceph-common/tasks/installs/install_on_debian.yml @@ -62,4 +62,6 @@ pkg: ceph-mgr state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}" - when: mgr_group_name in group_names + when: + - mgr_group_name in group_names + - ceph_release_num.{{ ceph_release }} > ceph_release_num.jewel diff --git a/roles/ceph-common/tasks/installs/install_on_redhat.yml b/roles/ceph-common/tasks/installs/install_on_redhat.yml index 8a8d82a77..e573a0b7c 100644 --- a/roles/ceph-common/tasks/installs/install_on_redhat.yml +++ b/roles/ceph-common/tasks/installs/install_on_redhat.yml @@ -147,4 +147,6 @@ package: name: ceph-mgr state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" - when: mgr_group_name in group_names + when: + - mgr_group_name in group_names + - ceph_release_num.{{ ceph_release }} > ceph_release_num.jewel diff --git a/roles/ceph-common/tasks/installs/install_rh_storage_on_debian.yml b/roles/ceph-common/tasks/installs/install_rh_storage_on_debian.yml index 9580c4c58..d90190e4b 100644 --- a/roles/ceph-common/tasks/installs/install_rh_storage_on_debian.yml +++ b/roles/ceph-common/tasks/installs/install_rh_storage_on_debian.yml @@ -95,4 +95,6 @@ apt: pkg: ceph-mgr state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" - when: mgr_group_name in group_names + when: + - mgr_group_name in group_names + - ceph_release_num.{{ ceph_release }} > ceph_release_num.jewel diff --git a/roles/ceph-common/tasks/installs/install_rh_storage_on_redhat.yml b/roles/ceph-common/tasks/installs/install_rh_storage_on_redhat.yml index b5a1984a6..136259363 100644 --- a/roles/ceph-common/tasks/installs/install_rh_storage_on_redhat.yml +++ b/roles/ceph-common/tasks/installs/install_rh_storage_on_redhat.yml @@ -75,4 +75,6 @@ package: name: ceph-mgr state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" - when: mgr_group_name in group_names + when: + - mgr_group_name in group_names + - ceph_release_num.{{ ceph_release }} > ceph_release_num.jewel diff --git a/roles/ceph-mon/tasks/ceph_keys.yml b/roles/ceph-mon/tasks/ceph_keys.yml index 4995cc100..e39f2b6d4 100644 --- a/roles/ceph-mon/tasks/ceph_keys.yml +++ b/roles/ceph-mon/tasks/ceph_keys.yml @@ -52,6 +52,7 @@ - cephx - groups.get(mgr_group_name, []) | length > 0 - inventory_hostname == groups[mon_group_name]|last + - ceph_release_num.{{ ceph_release }} > ceph_release_num.jewel with_items: "{{ groups.get(mgr_group_name, []) }}" - include: set_osd_pool_default_pg_num.yml diff --git a/roles/ceph-mon/tasks/docker/main.yml b/roles/ceph-mon/tasks/docker/main.yml index 0b0d9aae1..2c6658a36 100644 --- a/roles/ceph-mon/tasks/docker/main.yml +++ b/roles/ceph-mon/tasks/docker/main.yml @@ -125,3 +125,4 @@ - item.stat.exists == true when: - inventory_hostname == groups[mon_group_name]|last + - ceph_release_num.{{ ceph_stable_release }} > ceph_release_num.jewel diff --git a/site-docker.yml.sample b/site-docker.yml.sample index 4ba025fc7..3d8bfc64c 100644 --- a/site-docker.yml.sample +++ b/site-docker.yml.sample @@ -55,4 +55,4 @@ - hosts: mgrs become: True roles: - - ceph-mgr + - { role: ceph-mgr, when: "ceph_release_num.{{ ceph_stable_release }} > ceph_release_num.jewel" } diff --git a/site.yml.sample b/site.yml.sample index b1806418a..ae60d09a7 100644 --- a/site.yml.sample +++ b/site.yml.sample @@ -103,4 +103,4 @@ gather_facts: false become: True roles: - - ceph-mgr + - { role: ceph-mgr, when: "ceph_release_num.{{ ceph_stable_release }} > ceph_release_num.jewel" }