rabbitmq: fix unit file generation #1251
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes changes made in #1242
optionalString generates an empty string if the condition is not met. This resulted in an overides.conf for rabbitmq.service which just contains some auto-generated env vars in [service].
For the "frozen" rabbitmq 3.6 service/role, the new PATH replaced the PATH set by the original unit, leading to a "command not found" for rabbitmqctl in
postStart
.Setting feature flags isn't possible for rabbitmq 3.6, the rabbitmqctl command must only run for current rabbitmq versions.
For other machines without rabbitmq, this also generated an empty unit file because there was no condition to check if rabbitmq is actually enabled on this machine.
We need to limit this to the current Rabbitmq role and use mkIf here to prevent setting the option at all when conditions are not met.
PL-133374
@flyingcircusio/release-managers
Release process
./changelog.sh
PR release workflow (internal)
Design notes
on
oroff
. Example: rate limiting.Security implications
rabbitmq
role that rabbitmq starts and no overrides.conf is present