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

graphite: make systemd create /run directory for us #44392

Merged
merged 1 commit into from Aug 4, 2018

Conversation

basvandijk
Copy link
Member

Motivation for this change

Part of #41092.

@peterhoeg I tested your commit and it seems to work fine. If you approve the PR I'll merge it in.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@xeji
Copy link
Contributor

xeji commented Aug 3, 2018

@GrahamcOfBorg eval

@jtojnar
Copy link
Contributor

jtojnar commented Aug 3, 2018

What about using systemd.tmpfiles.rules for more declarative approach?

@basvandijk
Copy link
Member Author

@jtojnar you mean something like:

systemd.tmpfiles.rules = [ "d /run/carbon-cache 0700 graphite graphite -" ];

how is that more declarative than using RuntimeDirectory = "carbon-cache"? Isn't RuntimeDirectory exactly made for this purpose?

@Mic92
Copy link
Member

Mic92 commented Aug 3, 2018

RuntimeDirectory is better.

@Mic92
Copy link
Member

Mic92 commented Aug 3, 2018

@GrahamcOfBorg test graphite

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: tests.graphite

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: tests.graphite

Partial log (click to expand)

building '/nix/store/7sg65y7y9s3f8j7rp1zwmi3gns2v5m2i-user-units.drv'...
building '/nix/store/j2v3pvndav247yz7apbmqaqyxsl68d1z-system-units.drv'...
cannot build derivation '/nix/store/figkr99ib6q6vjwn20jzik4wnkdr1afx-etc.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/fhnhdd6ksjxp20wf9y8b8f38mq98slhf-nixos-system-one-18.09.git.770c8cc.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/68bw19ar51nrv020w4m8yiycpfj3pv05-closure-info.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/m8sf08h7441bkn46mgigirq7cfd9zrpv-run-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/sdq1rbxi8yh95czpi29m142qwmn5sm4z-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/ksgh7q8hlnsghmm73vs0igqcmaj2z4sr-nixos-test-driver-graphite.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/n7fl2lpar2l9256ricbb21zhqbzbsja6-vm-test-run-graphite.drv': 1 dependencies couldn't be built
error: build of '/nix/store/n7fl2lpar2l9256ricbb21zhqbzbsja6-vm-test-run-graphite.drv' failed

@xeji
Copy link
Contributor

xeji commented Aug 3, 2018

@GrahamcOfBorg test graphite

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: tests.graphite

Partial log (click to expand)

while evaluating the attribute 'condition' at /var/lib/gc-of-borg/nix-test-rs-29/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-29/lib/modules.nix:478:14:
while evaluating the attribute 'condition' at /var/lib/gc-of-borg/nix-test-rs-29/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-29/lib/modules.nix:478:14:
while evaluating the attribute 'condition' at /var/lib/gc-of-borg/nix-test-rs-29/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-29/lib/modules.nix:478:14:
while evaluating the attribute 'services.nixosManual' at /var/lib/gc-of-borg/nix-test-rs-29/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-29/lib/attrsets.nix:200:46:
while evaluating anonymous function at /var/lib/gc-of-borg/nix-test-rs-29/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-29/lib/modules.nix:75:45, called from /var/lib/gc-of-borg/nix-test-rs-29/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-29/lib/attrsets.nix:200:54:
while evaluating 'yieldConfig' at /var/lib/gc-of-borg/nix-test-rs-29/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-29/lib/modules.nix:74:29, called from /var/lib/gc-of-borg/nix-test-rs-29/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-29/lib/modules.nix:77:16:
while evaluating anonymous function at /var/lib/gc-of-borg/nix-test-rs-29/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-29/lib/modules.nix:80:24, called from /var/lib/gc-of-borg/nix-test-rs-29/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-29/lib/modules.nix:80:11:
while evaluating anonymous function at /var/lib/gc-of-borg/nix-test-rs-29/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-29/lib/modules.nix:81:26, called from /var/lib/gc-of-borg/nix-test-rs-29/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-29/lib/modules.nix:81:13:
The option `services.dysnomia' defined in `/var/lib/gc-of-borg/nix-test-rs-29/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-29/nixos/modules/rename.nix' does not exist.

@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: tests.graphite

Partial log (click to expand)

while evaluating the attribute 'condition' at /var/lib/gc-of-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/globin-server/lib/modules.nix:478:14:
while evaluating the attribute 'condition' at /var/lib/gc-of-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/globin-server/lib/modules.nix:478:14:
while evaluating the attribute 'condition' at /var/lib/gc-of-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/globin-server/lib/modules.nix:478:14:
while evaluating the attribute 'services.nixosManual' at /var/lib/gc-of-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/globin-server/lib/attrsets.nix:200:46:
while evaluating anonymous function at /var/lib/gc-of-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/globin-server/lib/modules.nix:75:45, called from /var/lib/gc-of-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/globin-server/lib/attrsets.nix:200:54:
while evaluating 'yieldConfig' at /var/lib/gc-of-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/globin-server/lib/modules.nix:74:29, called from /var/lib/gc-of-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/globin-server/lib/modules.nix:77:16:
while evaluating anonymous function at /var/lib/gc-of-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/globin-server/lib/modules.nix:80:24, called from /var/lib/gc-of-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/globin-server/lib/modules.nix:80:11:
while evaluating anonymous function at /var/lib/gc-of-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/globin-server/lib/modules.nix:81:26, called from /var/lib/gc-of-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/globin-server/lib/modules.nix:81:13:
The option `services.dysnomia' defined in `/var/lib/gc-of-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/globin-server/nixos/modules/rename.nix' does not exist.

@Mic92
Copy link
Member

Mic92 commented Aug 3, 2018

@GrahamcOfBorg test graphite

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: tests.graphite

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: tests.graphite

Partial log (click to expand)

one: running command: systemctl --no-pager show "graphiteWeb.service"
one: exit status 0
error: unit ‘graphiteWeb.service’ reached state ‘failed’
unit ‘graphiteWeb.service’ reached state ‘failed’
cleaning up
killing one (pid 600)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
builder for '/nix/store/9ls32bvbzfhhrnzd8m04w1k99q6kfl4i-vm-test-run-graphite.drv' failed with exit code 255
error: build of '/nix/store/9ls32bvbzfhhrnzd8m04w1k99q6kfl4i-vm-test-run-graphite.drv' failed

@Mic92
Copy link
Member

Mic92 commented Aug 4, 2018

The test throw:

IOError: [Errno 2] No such file or directory: '/var/db/graphite/log/webapp/info.log'

this looks like something else is incorrect in the module.

@basvandijk
Copy link
Member Author

Strange, on my system the test completes successfully:

$ nix-build nixos/release.nix -A tests.graphite.x86_64-linux
/nix/store/pxc72magi4ym56w0m6cfdqkvgnilsg2d-vm-test-run-graphite

@xeji
Copy link
Contributor

xeji commented Aug 4, 2018

Test succeeds on my local machine as well (on this branch).

@Mic92
Copy link
Member

Mic92 commented Aug 4, 2018

@GrahamcOfBorg test graphite

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: tests.graphite

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: tests.graphite

Partial log (click to expand)

one: exit status 1
syncing
one: running command: sync
one: exit status 0
test script finished in 21.90s
cleaning up
killing one (pid 600)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/yx61z1w03kj23j3sb8z00xxwrjj0r749-vm-test-run-graphite

@xeji xeji merged commit 5a43f6f into NixOS:master Aug 4, 2018
@peterhoeg
Copy link
Member

I'm late to the party (we just had kids!), but this is great. Thanks for pushing this past the goal line!

@xeji
Copy link
Contributor

xeji commented Aug 5, 2018

@peterhoeg congrats on the kids!

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

6 participants