Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ceph: Add makeWrapper to dependencies and nativeBuildInputs #37597

Merged
merged 2 commits into from Mar 27, 2018
Merged

ceph: Add makeWrapper to dependencies and nativeBuildInputs #37597

merged 2 commits into from Mar 27, 2018

Conversation

lejonet
Copy link
Contributor

@lejonet lejonet commented Mar 21, 2018

Motivation for this change

The ceph-mgr daemon needs to know the location of cephs own-made python modules for some of the modules that you can enable for it.
With wrapProgram, a wrapper is added that sets the proper pythonpath environment variable for the ceph-mgr daemon so its modules can find the ceph python modules.

It also adds cherrypy to the python env used by the python scripts, as its needed for the dashboard module for ceph-mgr.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • [] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

The ceph-mgr daemon needs to know the location of cephs own-made python modules for some of the modules
that you can enable for it.
With wrapProgram, a wrapper is added that sets the proper pythonpath environment variable for the ceph-mgr
daemon so its modules can find the ceph python modules
@Mic92
Copy link
Member

Mic92 commented Mar 22, 2018

@GrahamcOfBorg test ceph

@GrahamcOfBorg
Copy link

Success on aarch64-linux

Attempted: tests.ceph

No partial log is available.

@@ -159,6 +160,7 @@ stdenv.mkDerivation {

postFixup = ''
wrapPythonPrograms
wrapProgram $out/bin/ceph-mgr --set PYTHONPATH $out/lib/python2.7/site-packages
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-    wrapProgram $out/bin/ceph-mgr --set PYTHONPATH $out/lib/python2.7/site-packages 
+    wrapProgram $out/bin/ceph-mgr --set PYTHONPATH $out/${python2Packages.python.sitePackages}

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: tests.ceph

Partial log (click to expand)

cannot build derivation '/nix/store/s9z7alj8wxn37aipp82pbz060s1p22b7-system-units.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/6snhkbqnrlxs9x3391gmlxv181w5jyq3-user-units.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/x9bm00jd5kwfkgwyrclhxmxvgv3snr3j-etc.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/s6x3w4y6mhw5q2a3mvs3cqd5pn4n3p28-nixos-system-aio-18.09.git.94b980a.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/lq266nxk7jlps77wijwz41ml13b2kw3n-closure-info.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/6xg2w874wmw69xn4kfsvgl6wr924h3nh-run-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/3wjslcjizms8rks9h4hpq366aqpy0kd5-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/qlmwl2a2mzbmhlv3dh50rgdxqmmysqj3-nixos-test-driver-All-in-one-basic-ceph-cluster.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/kd73iqbyzh1hv9ani8zmf9wmi82bak0z-vm-test-run-All-in-one-basic-ceph-cluster.drv': 1 dependencies couldn't be built
error: build of '/nix/store/kd73iqbyzh1hv9ani8zmf9wmi82bak0z-vm-test-run-All-in-one-basic-ceph-cluster.drv' failed

@fpletz
Copy link
Member

fpletz commented Mar 23, 2018

@GrahamcOfBorg test ceph

@GrahamcOfBorg
Copy link

Success on aarch64-linux

Attempted: tests.ceph

No partial log is available.

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: tests.ceph

Partial log (click to expand)

cannot build derivation '/nix/store/c40njizl8g98d0n2mkx7rf0jdbhixr3h-system-units.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/r9cpi7ilyyr5zy6zw8h77xw0jn16dz50-user-units.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/m29nr8n2g2kan6bxg8275ygjqpz0is2k-etc.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/phnlm97rjnbb6acqpz27q1y8qh69m2qn-nixos-system-aio-18.09.git.d6a08b2.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/rq4vvcchywks2syk10cavdgczdw2i0f3-closure-info.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/da9yadq81ydna7yg6kj3mmv17yx4q47m-run-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/z1z511hxd96hmajjidhzv90j39ml2hfb-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/zv5b52k2hk90p8h3mipr1qkqpv6nl8mx-nixos-test-driver-All-in-one-basic-ceph-cluster.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/sjdvv5i5blxnywlsrrhz16h7ldk2n0jc-vm-test-run-All-in-one-basic-ceph-cluster.drv': 1 dependencies couldn't be built
error: build of '/nix/store/sjdvv5i5blxnywlsrrhz16h7ldk2n0jc-vm-test-run-All-in-one-basic-ceph-cluster.drv' failed

@Mic92
Copy link
Member

Mic92 commented Mar 23, 2018

@fpletz borg will always run into timeouts when compiling ceph.

@srhb
Copy link
Contributor

srhb commented Mar 24, 2018

LGTM and fixes #36622

Similar fixes will be needed for several other programs as well, but that can be handled separately. :)

@lejonet
Copy link
Contributor Author

lejonet commented Mar 26, 2018

@srhb Yeah, seeing as I don't have all types of hardware and permutations of config, it will have to be handled on a case-by-case basis whenever someone finds something is missing for a ceph component, like how you found #36622

@Mic92 Mic92 merged commit 1a44de8 into NixOS:master Mar 27, 2018
@Mic92
Copy link
Member

Mic92 commented Mar 27, 2018

backport:
[detached HEAD 3830232] ceph: Add makeWrapper to dependencies and nativeBuildInputs
Author: Daniel Kuehn daniel@kuehn.se
Date: Wed Mar 21 21:53:02 2018 +0100
1 file changed, 4 insertions(+), 2 deletions(-)
[detached HEAD 40212de] ceph: Change hardcoded site-packages path to utilizing the python2Packages.python.sitePackages attribute instead
Author: Daniel Kuehn daniel@kuehn.se
Date: Thu Mar 22 21:08:28 2018 +0100
1 file changed, 1 insertion(+), 1 deletion(-)

@lejonet lejonet deleted the ceph-#36622 branch March 30, 2018 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants