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-containers: add TimeoutStartSec option #65661
Conversation
To test this, i created an Installer live image with 100 containers configured and bootet it. All containers start now. The start fails without this fix. |
@infinisil can you review it again? |
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.
Ah sorry, can you fix the merge conflict? Looks good to me. Feel free to ping me again when done (or somebody else that is actively merging PR's)
Oh actually, while running
You should probably make the dummy be valid too |
Default is now 1m instead of global default of 15sec. It is also configurable. Fixes issue where start of many containers (40+) fail NixOS#65001
@infinisil thanks for mentioning the tests. They run sucessfull now! I set the dummy to the current default (systemd default) of 15s. |
Hello @davidak, I am slightly confused by this PR. You say the current default set by systemd is 15s. But I don‘t think this is the case. I am curious where you got this number. At least on my systems (using nixos for two years) the timeout is and has been since the introduction of systemd in arch years ago 90s. I mean it doesn‘t really matter, but this PR actually lowered the default TimeoutStartSec for my containers and subsequently my containers now fail more often. So I am wondering: What do you think about raising the timeout to 90s or making this option null-able and just not setting it by default to make sure we use the systemd default (even if they change it)? |
@maralorn i got the information from this stackexchange answer :D
That was not my intention. Do you use NixOS stable or unstable? They might have different systemd versions.
When it's actually 90s, we might be fine with a null-able option. But since we depend on it, it might be more stable to set 90s as default. Would you create a PR for that? I can review it then. |
Motivation for this change
Fixes #65001
Default is now 1m instead of global default of 15sec. It is also
configurable.
This is not a very elegant solution since the system load is still very high at boot, but it fixes the issue for now.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @arianvp @edolstra @kampfschlaefer