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 'mgr: ${cfg.monA.name}(active,'")
monA.wait_until_succeeds("ceph -s | grep 'HEALTH_OK'") 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 # Enable the dashboard and recheck health
monA.succeed( # monA.succeed(
"ceph mgr module enable dashboard", # "ceph mgr module enable dashboard",
"ceph config set mgr mgr/dashboard/ssl false", # "ceph config set mgr mgr/dashboard/ssl false",
# default is 8080 but it's better to be explicit # # default is 8080 but it's better to be explicit
"ceph config set mgr mgr/dashboard/server_port 8080", # "ceph config set mgr mgr/dashboard/server_port 8080",
) # )
monA.wait_for_open_port(8080) # monA.wait_for_open_port(8080)
monA.wait_until_succeeds("curl -q --fail http://localhost:8080") # monA.wait_until_succeeds("curl -q --fail http://localhost:8080")
monA.wait_until_succeeds("ceph -s | grep 'HEALTH_OK'") # monA.wait_until_succeeds("ceph -s | grep 'HEALTH_OK'")
''; '';
in { in {
name = "basic-single-node-ceph-cluster"; name = "basic-single-node-ceph-cluster";

View file

@ -28,8 +28,10 @@
, doxygen , doxygen
, gperf , gperf
, graphviz , graphviz
, gnugrep
, gtest , gtest
, icu , icu
, kmod
, libcap , libcap
, libcap_ng , libcap_ng
, libnl , libnl
@ -294,10 +296,14 @@ in rec {
pythonPath = [ ceph-python-env "${placeholder "out"}/${ceph-python-env.sitePackages}" ]; 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 ='' preConfigure =''
substituteInPlace src/common/module.c --replace "/sbin/modinfo" "modinfo" substituteInPlace src/common/module.c \
substituteInPlace src/common/module.c --replace "/sbin/modprobe" "modprobe" --replace "char command[128];" "char command[256];" \
substituteInPlace src/common/module.c --replace "/bin/grep" "grep" --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 # 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 # set PYTHONPATH, so the build system doesn't silently skip installing ceph-volume and others