From 4c22c3d0905589d676bf4865ca5cf57994eb426d Mon Sep 17 00:00:00 2001 From: Francesco Pantano Date: Fri, 8 Dec 2023 23:11:09 +0100 Subject: [PATCH] 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 --- devstack/lib/cephadm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/devstack/lib/cephadm b/devstack/lib/cephadm index 960d8c5..8f7943c 100755 --- a/devstack/lib/cephadm +++ b/devstack/lib/cephadm @@ -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"