From: Ken Dreyer Date: Wed, 8 Aug 2018 17:07:14 +0000 (-0600) Subject: common: upgrade/install ceph-test deb first X-Git-Tag: v3.1.0rc15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1a2c6a357241e46481ca5de1bd649808586270ad;p=ceph-ansible.git common: upgrade/install ceph-test deb first When we deploy a Jewel cluster on Ubuntu with ceph_test: True, we're unable to upgrade that cluster to Luminous. "apt-get install ceph-common" fails to upgrade to luminous if a jewel ceph-test package is installed: Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: ceph-base : Breaks: ceph-test (< 12.2.2-14) but 10.2.11-1xenial is to be installed ceph-mon : Breaks: ceph-test (< 12.2.2-14) but 10.2.11-1xenial is to be installed In ceph-ansible master, we resolve this whole class of problem by installing all the packages in one operation (see b338fafd90bbe489726b92d703bf4bc29d1caf6d). For the stable-3.1 branch, take a less-invasive approach, and upgrade ceph-test prior to any other package. This matches the approach I took for RPMs in 3752cc6f38dbf476845e975e6448225c0e103ad6, before we had the better solution in b338fafd90bbe489726b92d703bf4bc29d1caf6d. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1610997 Signed-off-by: Ken Dreyer --- diff --git a/roles/ceph-common/tasks/installs/install_debian_packages.yml b/roles/ceph-common/tasks/installs/install_debian_packages.yml index 46d65b665..76af495e3 100644 --- a/roles/ceph-common/tasks/installs/install_debian_packages.yml +++ b/roles/ceph-common/tasks/installs/install_debian_packages.yml @@ -6,12 +6,6 @@ state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" default_release: "{{ ceph_stable_release_uca | default(omit) }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}" -- name: install ceph-common for debian - apt: - name: ceph-common - state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" - default_release: "{{ ceph_stable_release_uca | default(omit) }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}" - - name: install ceph-test for debian apt: name: ceph-test @@ -20,6 +14,12 @@ when: - ceph_test +- name: install ceph-common for debian + apt: + name: ceph-common + state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" + default_release: "{{ ceph_stable_release_uca | default(omit) }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}" + - name: install rados gateway for debian apt: name: radosgw diff --git a/roles/ceph-common/tasks/installs/install_debian_rhcs_packages.yml b/roles/ceph-common/tasks/installs/install_debian_rhcs_packages.yml index 410eeb6aa..62451b5fa 100644 --- a/roles/ceph-common/tasks/installs/install_debian_rhcs_packages.yml +++ b/roles/ceph-common/tasks/installs/install_debian_rhcs_packages.yml @@ -1,4 +1,11 @@ --- +- name: install ceph-test for debian + apt: + name: ceph-test + state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" + when: + - ceph_test + - name: install red hat storage ceph-common for debian apt: pkg: ceph-common @@ -18,13 +25,6 @@ when: - osd_group_name in group_names -- name: install ceph-test for debian - apt: - name: ceph-test - state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" - when: - - ceph_test - - name: install red hat storage radosgw for debian apt: name: radosgw