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

--nix-option is not taken into account #188

Closed
datafoo opened this issue Jan 8, 2024 · 3 comments
Closed

--nix-option is not taken into account #188

datafoo opened this issue Jan 8, 2024 · 3 comments

Comments

@datafoo
Copy link

datafoo commented Jan 8, 2024

I tried to build a machine with Colmena but I could not because I did not manage to set 'sandbox' to 'relaxed' despite using --nix-option.

In fact --nix-option seems to have no effect at all:

[me@mymachine:~/dev/test-colmena/deployment1]$ colmena --version
Colmena 0.4.0

[me@mymachine:~/dev/test-colmena/deployment1]$ colmena build
warning: Git tree '/home/me/dev/test-colmena' is dirty
[INFO ] Using flake: git+file:///home/me/dev/test-colmena?dir=deployment1
[INFO ] Enumerating nodes...
[INFO ] Selected all 1 nodes.
      ❌ 11s Failed: Child process exited with error code: 1
  tst ✅ 11s Evaluated tst
  tst ❌ 1s Build failed: Child process exited with error code: 1                                                                                                                                                                                                                                                           
[ERROR] Failed to complete requested operation - Last 1 lines of logs:
[ERROR]  failure) Child process exited with error code: 1
[ERROR] Failed to build tst - Last 20 lines of logs:
[ERROR]   stderr)   /nix/store/qkjgvdmji4j813hl54h615scyzw89brh-unit-zpool-trim.timer.drv
[ERROR]   stderr)   /nix/store/ql2m8kgzsrciw3iyi9v29469xampc1qm-unit-zfs-zed.service.drv
[ERROR]   stderr)   /nix/store/l6fk7vfln2kqya4dfn4vcvhy4bi3n5i2-unit-script-myapplication-pre-start.drv
[ERROR]   stderr)   /nix/store/rh0i641ix6arb13bk9whzhqjpyir2m85-unit-myapplication.service.drv
[ERROR]   stderr)   /nix/store/mnh546x3k4cilz8n7pxd8zb33mg7cjc0-unit-script-post-resume-start.drv
[ERROR]   stderr)   /nix/store/s7z86rcafs1lgk3kd8yrfgj1s1rbj5pj-unit-post-resume.service.drv
[ERROR]   stderr)   /nix/store/cznp3lvcbf4gfrzi273m3j83fwpyxrr4-unit-script-zfs-sync-rpool-start.drv
[ERROR]   stderr)   /nix/store/vvp9gb56di13nila2gvqbp59h36k0w9y-unit-zfs-sync-rpool.service.drv
[ERROR]   stderr)   /nix/store/2dx5kpsc3fmp2awlgsyi48hapcwnzlkz-system-units.drv
[ERROR]   stderr)   /nix/store/d9gi42532cq553qwpz78gxq4d8wm4rf7-unit-dbus.service.drv
[ERROR]   stderr)   /nix/store/r5lkpx5sslgrp3irra0x8bq6k8q0ghy8-user-units.drv
[ERROR]   stderr)   /nix/store/r0vscvqvlmpgvvwy8alrf3j2ypnignrw-etc.drv
[ERROR]   stderr)   /nix/store/0a0v7hjs0lmi2fmb6qkrcsjbzj622ghw-nixos-system-tst-23.05pre-git.drv
[ERROR]   stderr) building '/nix/store/ql2m8kgzsrciw3iyi9v29469xampc1qm-unit-zfs-zed.service.drv'...
[ERROR]   stderr) building '/nix/store/pvrlrl9hr7cvb07amy4nanclkvniyqrp-unit-zfs.target.drv'...
[ERROR]   stderr) building '/nix/store/h3fjdj0k7ybzd128mnz1qb3f8j15scr6-unit-zpool-trim.service.drv'...
[ERROR]   stderr) building '/nix/store/qkjgvdmji4j813hl54h615scyzw89brh-unit-zpool-trim.timer.drv'...
[ERROR]   stderr) building '/nix/store/drbf0ypaq3bz3b1sfwnh96qa5cnj6zx1-X-Restart-Triggers.drv'...
[ERROR]   stderr) error: derivation '/nix/store/3rkv8gqdmqlix58vf8zwsz0sb01lp21s-myapplication-unstable-2023-07-21.drv' has '__noChroot' set, but that's not allowed when 'sandbox' is 'true'
[ERROR]  failure) Child process exited with error code: 1
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 1
Hint: Backtrace available - Use `RUST_BACKTRACE=1` environment variable to display a backtrace

[me@mymachine:~/dev/test-colmena/deployment1]$ colmena build --nix-option sandbox relaxed 
warning: Git tree '/home/me/dev/test-colmena' is dirty
[INFO ] Using flake: git+file:///home/me/dev/test-colmena?dir=deployment1
[INFO ] Enumerating nodes...
[INFO ] Selected all 1 nodes.
      ❌ 9s Failed: Child process exited with error code: 1
  tst ✅ 8s Evaluated tst
  tst ❌ 1s Build failed: Child process exited with error code: 1                                                                                                                                                                                                                                                           
[ERROR] Failed to build tst - Last 20 lines of logs:
[ERROR]   stderr)   /nix/store/qkjgvdmji4j813hl54h615scyzw89brh-unit-zpool-trim.timer.drv
[ERROR]   stderr)   /nix/store/ql2m8kgzsrciw3iyi9v29469xampc1qm-unit-zfs-zed.service.drv
[ERROR]   stderr)   /nix/store/l6fk7vfln2kqya4dfn4vcvhy4bi3n5i2-unit-script-myapplication-pre-start.drv
[ERROR]   stderr)   /nix/store/rh0i641ix6arb13bk9whzhqjpyir2m85-unit-myapplication.service.drv
[ERROR]   stderr)   /nix/store/mnh546x3k4cilz8n7pxd8zb33mg7cjc0-unit-script-post-resume-start.drv
[ERROR]   stderr)   /nix/store/s7z86rcafs1lgk3kd8yrfgj1s1rbj5pj-unit-post-resume.service.drv
[ERROR]   stderr)   /nix/store/cznp3lvcbf4gfrzi273m3j83fwpyxrr4-unit-script-zfs-sync-rpool-start.drv
[ERROR]   stderr)   /nix/store/vvp9gb56di13nila2gvqbp59h36k0w9y-unit-zfs-sync-rpool.service.drv
[ERROR]   stderr)   /nix/store/2dx5kpsc3fmp2awlgsyi48hapcwnzlkz-system-units.drv
[ERROR]   stderr)   /nix/store/d9gi42532cq553qwpz78gxq4d8wm4rf7-unit-dbus.service.drv
[ERROR]   stderr)   /nix/store/r5lkpx5sslgrp3irra0x8bq6k8q0ghy8-user-units.drv
[ERROR]   stderr)   /nix/store/r0vscvqvlmpgvvwy8alrf3j2ypnignrw-etc.drv
[ERROR]   stderr)   /nix/store/0a0v7hjs0lmi2fmb6qkrcsjbzj622ghw-nixos-system-tst-23.05pre-git.drv
[ERROR]   stderr) building '/nix/store/ql2m8kgzsrciw3iyi9v29469xampc1qm-unit-zfs-zed.service.drv'...
[ERROR]   stderr) building '/nix/store/pvrlrl9hr7cvb07amy4nanclkvniyqrp-unit-zfs.target.drv'...
[ERROR]   stderr) building '/nix/store/h3fjdj0k7ybzd128mnz1qb3f8j15scr6-unit-zpool-trim.service.drv'...
[ERROR]   stderr) building '/nix/store/qkjgvdmji4j813hl54h615scyzw89brh-unit-zpool-trim.timer.drv'...
[ERROR]   stderr) building '/nix/store/drbf0ypaq3bz3b1sfwnh96qa5cnj6zx1-X-Restart-Triggers.drv'...
[ERROR]   stderr) error: derivation '/nix/store/3rkv8gqdmqlix58vf8zwsz0sb01lp21s-myapplication-unstable-2023-07-21.drv' has '__noChroot' set, but that's not allowed when 'sandbox' is 'true'
[ERROR]  failure) Child process exited with error code: 1
[ERROR] Failed to complete requested operation - Last 1 lines of logs:
[ERROR]  failure) Child process exited with error code: 1
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 1
Hint: Backtrace available - Use `RUST_BACKTRACE=1` environment variable to display a backtrace

How can I build my machine with Colmena?

@NeverBehave
Copy link
Contributor

NeverBehave commented Apr 17, 2024

Per #126 , could you try the following?

colmena build --verbose -- --option sandbox relaxed

@datafoo
Copy link
Author

datafoo commented May 20, 2024

$ colmena build --verbose -- --option sandbox relaxed
error: unexpected argument 'sandbox' found

Usage: colmena build [OPTIONS]

For more information, try '--help'.

@datafoo
Copy link
Author

datafoo commented May 20, 2024

I cannot reproduce. My updated colmena test now allows me to run colmena build and colmena build --nix-option sandbox relaxed successfully.

I do not know why I assumed the compilation error was due to the sandbox.

@datafoo datafoo closed this as completed May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants