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

nixos: run parted with --script option #30270

Closed
wants to merge 1 commit into from

Conversation

bjornfor
Copy link
Contributor

-s, --script: never prompts for user intervention

Sometimes the NixOS installer tests fail when they invoke parted, e.g.
https://hydra.nixos.org/build/62513826/nixlog/1. But instead of exiting
right there, the tests hang until the Nix builder times out (and kills
the build). With this change the tests would instead fail immediately,
which is preferred.

While at it, use "parted --script" treewide, so nobody gets build
timeout due to parted error (or misuse). (Only nixos/ use it.)

A few instances already use the short option "-s", convert them to long
option "--short".

Motivation for this change
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.

-s, --script: never prompts for user intervention

Sometimes the NixOS installer tests fail when they invoke parted, e.g.
https://hydra.nixos.org/build/62513826/nixlog/1. But instead of exiting
right there, the tests hang until the Nix builder times out (and kills
the build). With this change the tests would instead fail immediately,
which is preferred.

While at it, use "parted --script" treewide, so nobody gets build
timeout due to parted error (or misuse). (Only nixos/ use it.)

A few instances already use the short option "-s", convert them to long
option "--short".
@bjornfor
Copy link
Contributor Author

When parted hangs, it has prompted the user for input and is waiting for a reply. Why isn't the prompt seen in the log? Doesn't the NixOS testing framework log stdout?

@bjornfor
Copy link
Contributor Author

Doesn't the NixOS testing framework log stdout?

Confirmed. Only stderr is logged.

Is that intentional/desired?

@bjornfor
Copy link
Contributor Author

Applied to master (0ff4bb5). Waiting a bit with backporting.

@bjornfor bjornfor closed this Oct 14, 2017
@bjornfor bjornfor deleted the nixos-parted-script branch October 14, 2017 16: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

1 participant