Merge pull request #270444 from NukaDuka/cephfs-mount-fix

ceph: use absolute binary paths instead of relative paths
This commit is contained in:
Linus Heckemann 2023-12-14 14:12:28 +01:00 committed by GitHub
commit 4f5aa65af5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 12 deletions

View File

@ -182,16 +182,19 @@ let
monA.wait_until_succeeds("ceph -s | grep 'mgr: ${cfg.monA.name}(active,'")
monA.wait_until_succeeds("ceph -s | grep 'HEALTH_OK'")
# This test has been commented out due to the upstream issue with pyo3
# that has broken this dashboard
# Reference: https://www.spinics.net/lists/ceph-users/msg77812.html
# Enable the dashboard and recheck health
monA.succeed(
"ceph mgr module enable dashboard",
"ceph config set mgr mgr/dashboard/ssl false",
# default is 8080 but it's better to be explicit
"ceph config set mgr mgr/dashboard/server_port 8080",
)
monA.wait_for_open_port(8080)
monA.wait_until_succeeds("curl -q --fail http://localhost:8080")
monA.wait_until_succeeds("ceph -s | grep 'HEALTH_OK'")
# monA.succeed(
# "ceph mgr module enable dashboard",
# "ceph config set mgr mgr/dashboard/ssl false",
# # default is 8080 but it's better to be explicit
# "ceph config set mgr mgr/dashboard/server_port 8080",
# )
# monA.wait_for_open_port(8080)
# monA.wait_until_succeeds("curl -q --fail http://localhost:8080")
# monA.wait_until_succeeds("ceph -s | grep 'HEALTH_OK'")
'';
in {
name = "basic-single-node-ceph-cluster";

View File

@ -28,8 +28,10 @@
, doxygen
, gperf
, graphviz
, gnugrep
, gtest
, icu
, kmod
, libcap
, libcap_ng
, libnl
@ -294,10 +296,14 @@ in rec {
pythonPath = [ ceph-python-env "${placeholder "out"}/${ceph-python-env.sitePackages}" ];
# replace /sbin and /bin based paths with direct nix store paths
# increase the `command` buffer size since 2 nix store paths cannot fit within 128 characters
preConfigure =''
substituteInPlace src/common/module.c --replace "/sbin/modinfo" "modinfo"
substituteInPlace src/common/module.c --replace "/sbin/modprobe" "modprobe"
substituteInPlace src/common/module.c --replace "/bin/grep" "grep"
substituteInPlace src/common/module.c \
--replace "char command[128];" "char command[256];" \
--replace "/sbin/modinfo" "${kmod}/bin/modinfo" \
--replace "/sbin/modprobe" "${kmod}/bin/modprobe" \
--replace "/bin/grep" "${gnugrep}/bin/grep"
# install target needs to be in PYTHONPATH for "*.pth support" check to succeed
# set PYTHONPATH, so the build system doesn't silently skip installing ceph-volume and others