Install 'python3-' variants of packages in 'install_ceph_remote'

Previously, this command would simply install the 'ceph-common' package,
which includes a number of Python dependencies. Unfortunately, these
packages are the 'python-' variants [1] and there doesn't appear to be a
'ceph-common-python3' package or similar to install the 'python3-'
variants. As a result, we need to install the 'python3-' variants
manually to ensure consumers of the plugin (like nova) can switch to
Python 3 in their tests.

We don't bother hiding this behind the 'python3_enabled' function or
'USE_PYTHON3' variable since (a) these packages can happily coexist, (b)
projects should be switching to Python 3 now, and (c) using these would
require sourcing additional, otherwise unnecessary devstack libraries
just to use this simple function.

[1] https://packages.ubuntu.com/bionic/ceph-common

Change-Id: I43de36ab570af40bc837d859568f5428c167f083
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2019-11-14 15:21:53 +00:00
parent 1c9e3e772e
commit 3a36c1c6d2
1 changed files with 5 additions and 0 deletions

View File

@ -962,6 +962,11 @@ function init_ceph {
# install_ceph() - Collect source and prepare
function install_ceph_remote {
install_package ceph-common
# ceph-common in Bionic (18.04) installs only the python2 variants of
# required packages, meaning we need to install the python3 variants
# manually. Hopefully this won't be necessary in Focal (20.04)
# https://packages.ubuntu.com/bionic/ceph-common
install_package python3-cephfs python3-prettytable python3-rados python3-rbd python3-requests
}
# configure_repo_ceph() - Configure Ceph repositories