about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2023-12-14 14:12:28 +0100
committerGitHub <noreply@github.com>2023-12-14 14:12:28 +0100
commit4f5aa65af59607961d387a0a283c06d1161cbb99 (patch)
tree0028d08fd043caf72a1b1f79dc3846df25ca8dac
parent1f42f70866d86b767ff37782f7371f2ae2178361 (diff)
parent41b27d7f4b3d9609c5b80ca67925c5827322f00d (diff)
downloadnixlib-4f5aa65af59607961d387a0a283c06d1161cbb99.tar
nixlib-4f5aa65af59607961d387a0a283c06d1161cbb99.tar.gz
nixlib-4f5aa65af59607961d387a0a283c06d1161cbb99.tar.bz2
nixlib-4f5aa65af59607961d387a0a283c06d1161cbb99.tar.lz
nixlib-4f5aa65af59607961d387a0a283c06d1161cbb99.tar.xz
nixlib-4f5aa65af59607961d387a0a283c06d1161cbb99.tar.zst
nixlib-4f5aa65af59607961d387a0a283c06d1161cbb99.zip
Merge pull request #270444 from NukaDuka/cephfs-mount-fix
ceph: use absolute binary paths instead of relative paths
-rw-r--r--nixos/tests/ceph-single-node.nix21
-rw-r--r--pkgs/tools/filesystems/ceph/default.nix12
2 files changed, 21 insertions, 12 deletions
diff --git a/nixos/tests/ceph-single-node.nix b/nixos/tests/ceph-single-node.nix
index 4a5636fac156..a3a4072365af 100644
--- a/nixos/tests/ceph-single-node.nix
+++ b/nixos/tests/ceph-single-node.nix
@@ -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";
diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix
index 241bf71985a0..f38cd4be880c 100644
--- a/pkgs/tools/filesystems/ceph/default.nix
+++ b/pkgs/tools/filesystems/ceph/default.nix
@@ -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