Commit 633e832c authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

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: default avatarMichal Berger <michal.berger@intel.com>
Change-Id: I08c2c94f7469748489ef4a9f0e65f3faccbecfb7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16064


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent c8a36b04
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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