Add os_release variable to get the right cephadm version

For releases older than reef (e.g., octopus, pacific), packages are not
always available under the el9 subdirectory.
This patch introduces a switch case to make sure we're able to match the
right version of cephadm.

Change-Id: I0ee37b832f1ea47961528f074f2d42492b0ac755
This commit is contained in:
Francesco Pantano 2023-12-08 23:11:09 +01:00
parent 7b209845d5
commit 4c22c3d090
No known key found for this signature in database
GPG Key ID: 0458D4D1F41BD75C
1 changed files with 8 additions and 3 deletions

View File

@ -131,9 +131,14 @@ function install_deps {
# Pre-install ceph: get cephadm binary
function get_cephadm {
# NOTE(gouthamr): cephadm binary here is a python executable, and the
# $os_PACKAGE ("rpm") or $os_release (el9) doesn't really matter. There is
# no ubuntu/debian equivalent being published by the ceph community.
curl -O https://download.ceph.com/rpm-${CEPH_RELEASE}/el9/noarch/cephadm
# $os_PACKAGE ("rpm") doesn't really matter. There is no ubuntu/debian
# equivalent being published by the ceph community.
os_release="el9"
case $CEPH_RELEASE in
pacific|octopus)
os_release="el8";;
esac
curl -O https://download.ceph.com/rpm-${CEPH_RELEASE}/${os_release}/noarch/cephadm
$SUDO mv cephadm $TARGET_BIN
$SUDO chmod +x $TARGET_BIN/cephadm
echo "[GET CEPHADM] cephadm is now available"