From 706f3b62458f852b05f017c061f7e3e1ccf3eff7 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Fri, 19 Apr 2019 09:53:12 +0100 Subject: [PATCH] Remove the uca option for ceph_pkg_source Having 'uca' as a valid value for ceph_pkg_source means that we have to maintain the UCA parameters in another repo other than the openstack_hosts role, and it has not been maintained well. This is evidenced by the fact that the current value is set to 'pike', which is very old. To reduce this maintenance burden, we simply remove this option. Change-Id: I78bfd1585804c0261645a8e008a7acef66b5795a --- defaults/main.yml | 7 ------- .../notes/ceph-pkg-src-remove-uca-4ef147673821ed9b.yaml | 7 +++++++ tasks/ceph_preinstall_apt.yml | 8 -------- tasks/main.yml | 6 ++++++ vars/debian.yml | 7 +------ 5 files changed, 14 insertions(+), 21 deletions(-) create mode 100644 releasenotes/notes/ceph-pkg-src-remove-uca-4ef147673821ed9b.yaml diff --git a/defaults/main.yml b/defaults/main.yml index 0eec06e..3fd10d1 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -35,9 +35,6 @@ ceph_client_package_state: "latest" # adjust items such as Ceph release and regional download mirror can be found # in vars/*.yml # -# * uca This option installs Ceph from the Ubuntu Cloud Archive. Additional variables -# to adjust items such as the OpenStack/Ceph release can be found in vars/*.yml. -# # * distro This options installs Ceph from the operating system's default repository and # unlike the other options does not attempt to manage package keys or add additional # package repositories. @@ -45,10 +42,6 @@ ceph_pkg_source: ceph ceph_stable_release: luminous ceph_apt_pinned_packages: [{ package: "*", release: "ceph.com", priority: 1001 }] -# Ubuntu Cloud Archive mirror URL -# This is only used if 'uca' is the selected option for ceph_pkg_source -uca_apt_repo_url: "http://ubuntu-cloud.archive.canonical.com/ubuntu" - # Ceph Authentication cephx: true diff --git a/releasenotes/notes/ceph-pkg-src-remove-uca-4ef147673821ed9b.yaml b/releasenotes/notes/ceph-pkg-src-remove-uca-4ef147673821ed9b.yaml new file mode 100644 index 0000000..66a6b65 --- /dev/null +++ b/releasenotes/notes/ceph-pkg-src-remove-uca-4ef147673821ed9b.yaml @@ -0,0 +1,7 @@ +--- +deprecations: + - | + In the ``ceph_client`` role, the only valid values for ``ceph_pkg_source`` + are now ``ceph`` and ``distro``. For Ubuntu, the Ubuntu Cloud Archive apt + source is already setup by the ``openstack_hosts`` role, so there is no + need for it to also be setup by the ``ceph_client`` role. diff --git a/tasks/ceph_preinstall_apt.yml b/tasks/ceph_preinstall_apt.yml index 10589ff..ce75438 100644 --- a/tasks/ceph_preinstall_apt.yml +++ b/tasks/ceph_preinstall_apt.yml @@ -41,14 +41,6 @@ when: - ceph_pkg_source == 'ceph' -- name: add ubuntu cloud archive key package - apt: - pkg: ubuntu-cloud-keyring - state: "{{ ceph_client_package_state }}" - register: add_keys - when: - - ceph_pkg_source == 'uca' - # When updating the cache in the apt_repository # task, and the update fails, a retry does not # detect a change the second attempt and therefore diff --git a/tasks/main.yml b/tasks/main.yml index 6ff4b15..8859ba3 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -31,6 +31,12 @@ tags: - always +- name: Fail if ceph_pkg_source uses an incorrect parameter + fail: + msg: "Invalid value for ceph_pkg_source. Valid parameters are ceph, distro." + when: + - ceph_pkg_source not in ['ceph', 'distro'] + - include_tasks: "ceph_preinstall_{{ ansible_pkg_mgr }}.yml" when: - ceph_pkg_source != 'distro' diff --git a/vars/debian.yml b/vars/debian.yml index 1d6437b..5a921d8 100644 --- a/vars/debian.yml +++ b/vars/debian.yml @@ -34,9 +34,7 @@ ceph_revoked_gpg_keys: ceph_apt_repo_url_region: "download" # or "eu" for Netherlands based mirror ceph_apt_repo_url: "http://{{ ceph_apt_repo_url_region }}.ceph.com/debian-{{ ceph_stable_release }}/" -# Ubuntu Cloud Archive variables -uca_openstack_release: pike -uca_repo_dist: "{{ ansible_lsb.codename }}-updates/{{ uca_openstack_release }}" +# LibVirt differentials between Debian and Ubuntu libvirt_package: "{{ (ansible_distribution == 'Debian') | ternary('libvirt-daemon-system', 'libvirt-bin') }}" libvirt_service_name: libvirtd @@ -48,6 +46,3 @@ ceph_apt_repos: ceph: repo: "deb {{ ceph_apt_repo_url }} {{ ansible_lsb.codename }} main" state: "present" - uca: - repo: "deb {{ uca_apt_repo_url }} {{ uca_repo_dist }} main" - state: "present"