Skip to content

systemd timeout arguments to use infinity instead of 0 - #50934

Merged
zimbatm merged 1 commit into
NixOS:masterfrom
cyounkins:timeoutstartsec
Nov 25, 2018
Merged

zimbatm merged 1 commit into
NixOS:masterfrom
cyounkins:timeoutstartsec

Conversation

@cyounkins

Copy link
Copy Markdown
Contributor

Fixes #49700

Motivation for this change

systemd changed the behavior for TimeoutStartSec in 229. infinity is now the preferred argument to disable timeouts.

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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@cyounkins
cyounkins requested a review from infinisil as a code owner November 23, 2018 04:08
@GrahamcOfBorg GrahamcOfBorg added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Nov 23, 2018
@c0bw3b

c0bw3b commented Nov 23, 2018

Copy link
Copy Markdown
Contributor

Oh, nice catch.

While we're at it, it should also be fixed for:

  • TimeoutStopSec : in module google-compute-image
  • TimeoutSec : in modules cloud-init and apcupsd

@cyounkins

Copy link
Copy Markdown
Contributor Author

@c0bw3b Could you take another look? Unfortunately I was unable to verify the google cloud environment image creation.

@c0bw3b

c0bw3b commented Nov 24, 2018

Copy link
Copy Markdown
Contributor

LGTM.

@rbvermaa @zimbatm @AmineChikhaoui to review the change on google-compute-image

@c0bw3b

c0bw3b commented Nov 24, 2018

Copy link
Copy Markdown
Contributor

@GrahamcOfBorg test cloud-init

@GrahamcOfBorg

Copy link
Copy Markdown

No attempt on aarch64-linux (full log)

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

Partial log (click to expand)

Cannot nix-instantiate `tests.cloud-init' because:
error: while evaluating 'recursiveUpdate' at /var/lib/gc-of-borg/nix-test-rs-20/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-20/lib/attrsets.nix:415:26, called from /var/lib/gc-of-borg/nix-test-rs-20/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-20/lib/attrsets.nix:148:28:
while evaluating 'recursiveUpdateUntil' at /var/lib/gc-of-borg/nix-test-rs-20/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-20/lib/attrsets.nix:384:37, called from /var/lib/gc-of-borg/nix-test-rs-20/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-20/lib/attrsets.nix:416:5:
while evaluating 'zipAttrsWith' at /var/lib/gc-of-borg/nix-test-rs-20/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-20/lib/attrsets.nix:347:21, called from /var/lib/gc-of-borg/nix-test-rs-20/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-20/lib/attrsets.nix:394:8:
while evaluating 'zipAttrsWithNames' at /var/lib/gc-of-borg/nix-test-rs-20/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-20/lib/attrsets.nix:332:33, called from /var/lib/gc-of-borg/nix-test-rs-20/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-20/lib/attrsets.nix:347:27:
while evaluating the attribute 'cloud-init' at /var/lib/gc-of-borg/nix-test-rs-20/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-20/nixos/tests/all-tests.nix:42:3:
while evaluating 'handleTest' at /var/lib/gc-of-borg/nix-test-rs-20/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-20/nixos/tests/all-tests.nix:17:22, called from /var/lib/gc-of-borg/nix-test-rs-20/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-20/nixos/tests/all-tests.nix:42:16:
while evaluating 'discoverTests' at /var/lib/gc-of-borg/nix-test-rs-20/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-20/nixos/tests/all-tests.nix:13:19, called from /var/lib/gc-of-borg/nix-test-rs-20/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-20/nixos/tests/all-tests.nix:18:5:
access to path '/nix/store/42zy9qhrwyhjrmjpd9hbzjad366ddikb-grahamc-aarch64-community-20' is forbidden in restricted mode

@GrahamcOfBorg

Copy link
Copy Markdown

No attempt on x86_64-linux (full log)

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

Partial log (click to expand)

Cannot nix-instantiate `tests.cloud-init' because:
error: while evaluating 'recursiveUpdate' at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-0-gustav.ewr1.nix.ci/lib/attrsets.nix:415:26, called from /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-0-gustav.ewr1.nix.ci/lib/attrsets.nix:148:28:
while evaluating 'recursiveUpdateUntil' at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-0-gustav.ewr1.nix.ci/lib/attrsets.nix:384:37, called from /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-0-gustav.ewr1.nix.ci/lib/attrsets.nix:416:5:
while evaluating 'zipAttrsWith' at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-0-gustav.ewr1.nix.ci/lib/attrsets.nix:347:21, called from /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-0-gustav.ewr1.nix.ci/lib/attrsets.nix:394:8:
while evaluating 'zipAttrsWithNames' at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-0-gustav.ewr1.nix.ci/lib/attrsets.nix:332:33, called from /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-0-gustav.ewr1.nix.ci/lib/attrsets.nix:347:27:
while evaluating the attribute 'cloud-init' at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-0-gustav.ewr1.nix.ci/nixos/tests/all-tests.nix:42:3:
while evaluating 'handleTest' at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-0-gustav.ewr1.nix.ci/nixos/tests/all-tests.nix:17:22, called from /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-0-gustav.ewr1.nix.ci/nixos/tests/all-tests.nix:42:16:
while evaluating 'discoverTests' at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-0-gustav.ewr1.nix.ci/nixos/tests/all-tests.nix:13:19, called from /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-0-gustav.ewr1.nix.ci/nixos/tests/all-tests.nix:18:5:
access to path '/nix/store/2ms9wnjbi4r6lb9jsinf9z6p6girn485-builder-0-gustav.ewr1.nix.ci' is forbidden in restricted mode

@c0bw3b

c0bw3b commented Nov 24, 2018

Copy link
Copy Markdown
Contributor

@GrahamcOfBorg build nixosTests.cloud-init

@GrahamcOfBorg

Copy link
Copy Markdown

Success on x86_64-linux (full log)

Attempted: nixosTests.cloud-init

Partial log (click to expand)

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

@GrahamcOfBorg

Copy link
Copy Markdown

Success on aarch64-linux (full log)

Attempted: nixosTests.cloud-init

Partial log (click to expand)

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

@cyounkins cyounkins changed the title systemd TimeoutStartSec=0 is now =infinity systemd timeout arguments to use infinity instead of 0 Nov 24, 2018
@cyounkins

Copy link
Copy Markdown
Contributor Author

@c0bw3b thank you for the review. Should this target master or staging? It's not clear to me what constitutes a 'mass' rebuild.

@c0bw3b

c0bw3b commented Nov 24, 2018

Copy link
Copy Markdown
Contributor

This is good as-is targeting the master branch since your PR does not change any packages.

A "mass-rebuild" is when hundreds of packages need to be rebuilt after a shared component is changed.
See #50978 for an example and notice the deep red labels. :)

@zimbatm
zimbatm merged commit eff461c into NixOS:master Nov 25, 2018
@zimbatm

zimbatm commented Nov 25, 2018

Copy link
Copy Markdown
Member

thanks @cyounkins ! I double-checked and didn't find any more instances

@cyounkins
cyounkins deleted the timeoutstartsec branch November 26, 2018 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants