From 1daac1805f8b20d4f3f263985e0aad466b9677f6 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Thu, 7 Feb 2019 10:48:56 +0100 Subject: [PATCH] Install python rbd package on Ubuntu The glance::backend::rbd class when managing the ceph package would install the python-ceph package which after changing to python3 became python3-ceph. The python3-ceph package does not exist and the python-ceph package is only a meta package that points to all the python 2 libraries. This changes so that it installs python3-rbd on Ubuntu but leaves the python3-ceph package on Debian based packaging. Change-Id: I37baa79943063a66922a9f82a286583a091122c7 --- manifests/params.pp | 6 +++++- .../glance-rbd-ubuntu-package-b072d00a7e21b9af.yaml | 5 +++++ spec/classes/glance_backend_rbd_spec.rb | 12 ++++++------ 3 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 releasenotes/notes/glance-rbd-ubuntu-package-b072d00a7e21b9af.yaml diff --git a/manifests/params.pp b/manifests/params.pp index 65aec414..3478a03a 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -27,7 +27,11 @@ class glance::params { $registry_package_name = 'glance-registry' $api_service_name = 'glance-api' $registry_service_name = 'glance-registry' - $pyceph_package_name = "python${pyvers}-ceph" + if $::os_package_type == 'debian' { + $pyceph_package_name = "python${pyvers}-ceph" + } else { + $pyceph_package_name = "python${pyvers}-rbd" + } } default: { fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, \ diff --git a/releasenotes/notes/glance-rbd-ubuntu-package-b072d00a7e21b9af.yaml b/releasenotes/notes/glance-rbd-ubuntu-package-b072d00a7e21b9af.yaml new file mode 100644 index 00000000..688e7939 --- /dev/null +++ b/releasenotes/notes/glance-rbd-ubuntu-package-b072d00a7e21b9af.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + The glance::backend::rbd class now install python-rbd/python3-rbd package + instead of the python-ceph meta package on Ubuntu. diff --git a/spec/classes/glance_backend_rbd_spec.rb b/spec/classes/glance_backend_rbd_spec.rb index db09ea72..0f32a1a3 100644 --- a/spec/classes/glance_backend_rbd_spec.rb +++ b/spec/classes/glance_backend_rbd_spec.rb @@ -82,13 +82,13 @@ describe 'glance::backend::rbd' do let(:platform_params) do case facts[:osfamily] when 'Debian' - { - :pyceph_package_name => 'python3-ceph', - } + if facts[:os_package_type] == 'debian' + { :pyceph_package_name => 'python3-ceph' } + else + { :pyceph_package_name => 'python3-rbd' } + end when 'RedHat' - { - :pyceph_package_name => 'python-rbd', - } + { :pyceph_package_name => 'python-rbd' } end end