From 633e832cec8ebc10140dc2aa244a6f669b4bb16a Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Thu, 22 Dec 2022 18:04:09 +0100 Subject: [PATCH] scripts/ceph: Make sure osd_class_dir is an absolute path Some Ceph builds, as seen under fedora37, have their default osd_class_dir parameter set improperly to a relative path. As a result, Ceph is not able to open and load .so libs that are part of rados-classes. Example of an error seen in the ceph logs: could not stat class lib64/rados-classes/libcls_rbd.so: (2) No such file or directory To workaround it, always slap "/" at the beginning of the path. Signed-off-by: Michal Berger Change-Id: I08c2c94f7469748489ef4a9f0e65f3faccbecfb7 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16064 Tested-by: SPDK CI Jenkins Reviewed-by: Kamil Godzwon Reviewed-by: Tomasz Zawadzki Reviewed-by: Changpeng Liu --- scripts/ceph/start.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/ceph/start.sh b/scripts/ceph/start.sh index 0a5903d37..a4c089e00 100755 --- a/scripts/ceph/start.sh +++ b/scripts/ceph/start.sh @@ -136,6 +136,10 @@ ceph-osd -c ${ceph_conf} -i $i --mkfs --mkkey --osd-uuid ${uuid} ${ceph_osd_extr ceph -c ${ceph_conf} osd crush add osd.${i} 1.0 host=$(hostname) root=default ceph -c ${ceph_conf} -i ${mnt_dir}/osd-device-${i}-data/keyring auth add osd.${i} osd "allow *" mon "allow profile osd" mgr "allow *" +class_dir=/$(ceph -c "$ceph_conf" config get osd osd_class_dir) +[[ -e $class_dir ]] +ceph -c "$ceph_conf" config set osd osd_class_dir "$class_dir" + # start osd pkill -9 ceph-osd || true sleep 2