From 2c09adcfaec481509e68d0e89e37930795a8df32 Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Wed, 17 Oct 2018 18:29:21 +0100 Subject: [PATCH] Ensure ceph server apt pinning is well defined The ceph_client role applies apt pins but the ceph server components were not pinned. This patch pins the ceph community repo with appropriate priority relative to UCA/distro sources to ensure the desired source is used for installation Change-Id: I69b0e8c0666eb4b629c5eeed5deb686fee222206 --- playbooks/ceph-install.yml | 22 ++++++++++++++++++++++ playbooks/ceph-rgw-install.yml | 12 ++++++++++++ 2 files changed, 34 insertions(+) diff --git a/playbooks/ceph-install.yml b/playbooks/ceph-install.yml index cfced5b147..5bfeb2dbe1 100644 --- a/playbooks/ceph-install.yml +++ b/playbooks/ceph-install.yml @@ -92,6 +92,17 @@ when: - ansible_pkg_mgr in ['yum', 'dnf'] + # Set the priority of the ceph community apt repo either above or below that of UCA or distro sources + - name: Set apt package pins + include_role: + name: apt_package_pinning + vars: + apt_package_pinning_file_name: "ceph_community_pin.pref" + apt_package_pinning_priority: "{{ (ceph_repository == 'community') | ternary(1000, 100) }}" + apt_pinned_packages: [{ package: '*', release: 'ceph.com' }] + when: + - ansible_pkg_mgr == 'apt' + roles: - role: ceph-defaults tags: @@ -188,6 +199,17 @@ - ceph-osd - ceph-mon-facts + # Set the priority of the ceph community apt repo either above or below that of UCA or distro sources + - name: Set apt package pins + include_role: + name: apt_package_pinning + vars: + apt_package_pinning_file_name: "ceph_community_pin.pref" + apt_package_pinning_priority: "{{ (ceph_repository == 'community') | ternary(1000, 100) }}" + apt_pinned_packages: [{ package: '*', release: 'ceph.com' }] + when: + - ansible_pkg_mgr == 'apt' + roles: - role: ceph-defaults tags: diff --git a/playbooks/ceph-rgw-install.yml b/playbooks/ceph-rgw-install.yml index 21f83ec175..4fb3cf9e07 100644 --- a/playbooks/ceph-rgw-install.yml +++ b/playbooks/ceph-rgw-install.yml @@ -41,6 +41,18 @@ - inventory_hostname == ansible_play_hosts[0] tags: - ceph-mon-facts + + # Set the priority of the ceph community apt repo either above or below that of UCA or distro sources + - name: Set apt package pins + include_role: + name: apt_package_pinning + vars: + apt_package_pinning_file_name: "ceph_community_pin.pref" + apt_package_pinning_priority: "{{ (ceph_repository == 'community') | ternary(1000, 100) }}" + apt_pinned_packages: [{ package: '*', release: 'ceph.com' }] + when: + - ansible_pkg_mgr == 'apt' + roles: - role: ceph-defaults tags: