Revert "Make sure configured user is properly set by Salt" (bsc#1216284) #614
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.
This reverts commit 5ea4add which turned out to be problematic, as it caused some regressions (bsc#1216284), while not being really needed to fix the initial issue that motivated that patch (bsc#1210994).
The patch this PR is reverting is not really needed to fix (bsc#1210994), as that bug was actually fixed by 40a57af.
Introducing the conflictive patch was just to align with upstream PR saltstack/salt#64510, after it was reviewed (which contains the initial working fix + extra changes after the review)
The reason to revert this patch instead of fixing upstream PR is that, it seems we cannot really change the "user" that earlier in the stack as proposed in upstream PR, because this causes problems for "salt-master", while creating user keys (as "chmod" cannot be executed properly if not running as root). So the extra changes done in the upstream PR don't really make sense.
In a nutshell, "salt-master" needs to run as "root" during startup, and then it will switch to the configured user at some point during the startup. We cannot set "salt-master" systemd unit with
User=salt
and neither switching to the configured user at the begining of the initialization stack, as this is too early and will cause problems.I will adapt upstream PR to refllect this findings.
Tracks: https://github.com/SUSE/spacewalk/issues/22827