Skip to content

Commit

Permalink
fc.check-ceph: branch off luminous and nautilus variants
Browse files Browse the repository at this point in the history
reason: check_snapshot_restore_fill depends on python-librados/librbd
python3, which we only build for Nautilus+ releases.
  • Loading branch information
osnyx committed May 2, 2023
1 parent b1c7eba commit 60eb082
Show file tree
Hide file tree
Showing 12 changed files with 397 additions and 15 deletions.
2 changes: 2 additions & 0 deletions nixos/roles/ceph/mon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ let
# We do not have service data during bootstrapping.
first_mon = if mons == [ ] then "" else head (lib.splitString "." (head mons));

#TODO: once all ceph releases use the ceph-client attr name, ensure that the desired
# build is used here by explicitly overriding/ passing it here.
fc-check-ceph-withVersion = pkgs.fc.check-ceph.${role.cephRelease};
fc-ceph = pkgs.fc.cephWith fclib.ceph.releasePkgs.${role.cephRelease};

Expand Down
13 changes: 2 additions & 11 deletions pkgs/fc/check-ceph/luminous/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, libyaml, python3Packages, ceph-client, libceph }:
{ pkgs, libyaml, python3Packages, ceph }:

let
py = python3Packages;
Expand All @@ -11,15 +11,6 @@ in
dontStrip = true;
propagatedBuildInputs = [
py.nagiosplugin
(py.toPythonModule ceph-client)
py.toml
ceph
];
checkInputs = [
py.pytest
#py.mock
];

checkPhase = ''
pytest .
'';
}
1 change: 0 additions & 1 deletion pkgs/fc/check-ceph/luminous/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
entry_points={
"console_scripts": [
"check_ceph=fc.check_ceph.ceph:main",
"check_snapshot_restore_fill=fc.check_ceph.check_snapshot_restore:main",
],
},
)
25 changes: 25 additions & 0 deletions pkgs/fc/check-ceph/nautilus/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{ pkgs, libyaml, python3Packages, ceph-client, libceph }:

let
py = python3Packages;

in
py.buildPythonApplication rec {
name = "fc-check-ceph-luminous-${version}";
version = "1.0";
src = ./.;
dontStrip = true;
propagatedBuildInputs = [
py.nagiosplugin
(py.toPythonModule ceph-client)
py.toml
];
checkInputs = [
py.pytest
#py.mock
];

checkPhase = ''
pytest .
'';
}
Empty file.
Loading

0 comments on commit 60eb082

Please sign in to comment.