-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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/mattermost: squash systemd-tmpfiles warning #376838
base: master
Are you sure you want to change the base?
Conversation
32e542e
to
8c8385a
Compare
8c8385a
to
d5eca8b
Compare
There was a systemd-tmpfiles warning about not being able to remove the 'plugins' directory. Squash this warning through removal of unnecessary systemd-tmpfiles options, and write a test for it. Add the {option}`services.mattermost.pluginsBundle` option to allow overriding the plugin directory and also using it for tests. Update wording in option documentation so it is more clear. Make the tests go faster by pipelining shutdowns of nodes.
d5eca8b
to
4bd073f
Compare
@@ -756,7 +767,7 @@ in | |||
"d= ${tempDir} 0750 ${cfg.user} ${cfg.group} - -" | |||
|
|||
# Ensure that pluginDir is a directory, as it could be a symlink on prior versions. | |||
"r- ${pluginDir} - - - - -" |
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.
These r-
caused the warning ("unable to remove..."). d=
will make sure they're a directory instead of a symlink to one.
with pkgs; | ||
map ( | ||
plugin: | ||
stdenv.mkDerivation { |
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.
No CC needed in these, and we can symlink prior to repacking.
mostlyMutableToplevel: str, mostlyMutable, | ||
def switch_to_specialisation(node, toplevel: str, specialisation: str): | ||
print(f"switch_to_specialisation({node.name!r}, {toplevel!r}, {specialisation!r})", file=sys.stderr) | ||
node.succeed(f"{toplevel}/specialisation/{specialisation}/bin/switch-to-configuration switch || 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.
For a variety of reasons, the config switch can fail for unrelated reasons to Mattermost if we're on unstable, but Mattermost may still restart. We should just wait for it to come up.
There was a systemd-tmpfiles warning about not being able to remove the 'plugins' directory. Squash this warning through removal of unnecessary systemd-tmpfiles options, and write a test for it.
Add the {option}
services.mattermost.pluginsBundle
option to allow overriding the plugin directory and also using it for tests. Update wording in option documentation so it is more clear.Make the tests go faster by pipelining shutdowns of nodes.
Followup to #208181 which introduced these minor nits.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.