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
Allow cloud-init to support creating btrfs partitions #50186
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
@@ -3,7 +3,16 @@ | |||
with lib; | |||
|
|||
let cfg = config.services.cloud-init; | |||
path = with pkgs; [ cloud-init nettools utillinux e2fsprogs shadow openssh iproute ]; | |||
path = with pkgs; [ | |||
btrfs-progs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btrfs-progs
adds like 3.5mb
. I think we can add an option called btrfs.enable
(default: false) and an option ext4.enable
(default: true).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mic92 Sure. Sounds like a good idea to me.
I will re-write this as a module in the coming commits of this PR.
74ef6f1
to
bd40d68
Compare
bd40d68
to
a965921
Compare
Makes the optional more self-describing and allows future extensions
@GrahamcOfBorg test cloud-init |
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)
|
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)
|
Looks like a bug in ofborg |
OfBorg hasn't changed, must be a change in Nixpkgs. |
Bisecting confirms it is, kind of unsurprisingly given it's where the stack trace appeared, 83b27f6. What is really weird is the following:
Which would appear to imply that the problem comes from the way So I don't really understand how & why the problem would arise from https://github.com/NixOS/nixpkgs/blob/master/nixos/release.nix#L21-L27 except on hydra. Especially given the fact that the import is the same than the one at https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/make-test.nix#L3, unless the passed Now, let's see if the problem arises with https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/all-packages.nix#L76-L80 too… it doesn't locally. To add to the confusion. @GrahamcOfBorg build nixosTests.cloud-init (cc @roberth given our ongoing discussion on #50301, in case you have an idea about where this could be going wrong) TL;DR:
|
Success on x86_64-linux (full log) Attempted: nixosTests.cloud-init Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: nixosTests.cloud-init Partial log (click to expand)
|
Not a smoking gun, but there's a covert reinvocation of Nixpkgs here, which might be part of the problem. That will be gone after implementing a solution for #50301. |
Correction: hydra builds do fail due to this. Hydra just doesn't report failed evaluations as failures. |
The current behavior, breaking restrict-eval=true, had been introduced in 209f8b1. See also [1]. This change uses a hack to identify whether we're evaluating in restrict-eval, keeping the optimization when not and reverting to the old behavior when evaluating in restrict-eval. This should fix the issues that appeared at [2] and [3], that followed the change making us actually use this `nixpkgs` argument for tests since 83b27f6 [4]. CC: @roberth [1] NixOS@209f8b1acd4c#commitcomment-28419462 [2] NixOS#50233 (comment) [3] NixOS#50186 [4] NixOS#50233
@Mic92 @grahamc @roberth The issue with ofborg building tests (and hopefully hydra too) should be fixed with #50342. It appears, if I understand correctly what I've been doing, to have stemmed from an IFD that had stayed unnoticed until now because we never actually used it for the tests: the |
Please have @edolstra review
…Sent from my iPhone
On Nov 14, 2018, at 00:37, Léo Gaspard ***@***.***> wrote:
@Mic92 @grahamc @roberth The issue with ofborg building tests (and hopefully hydra too) should be fixed with #50342. It appears, if I understand correctly what I've been doing, to have stemmed from an IFD that had stayed unnoticed until now because we never actually used it for the tests: the cleanSource at the top of release.nix
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
type = types.bool; | ||
default = false; | ||
description = '' | ||
Allow the cloud-init service to operate `btrfs` filesystem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, what does it mean to "operate" a filesystem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe provision
or create
?
Motivation for this change
cloud-init
does not know where isbtrfs
programmes. It makesbtrfs
partition creation fails sometimes. This PR includesbtrfs-progs
into thePATH
environment variable.Request for comment: should we: 1. survey the all possible configurations and add in other missing runtime dependencies of
cloud-init
; 2. or, we add one option to allow users to supply additional runtime dependencies?Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)