Use the active user when cleaning the NGINX environment - #5817
Open
GlazerMann wants to merge 4 commits into
Open
GlazerMann wants to merge 4 commits into
GlazerMann wants to merge 4 commits into
Conversation
This was referenced Sep 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix
nginx_cleanso NGINX environment cleanup is performed for the user currently being processed.NginxCleanGeneratoriterates over the active users asu, but the cleanup call currently uses the generator's outeruseroption:The following NGINX stop operation correctly uses the loop variable:
That means the environment being cleaned and the PUN being stopped can refer to different users. When
nginx_cleanis invoked without restricting cleanup to a single user,usercan also benil, so the cleanup is not scoped to the active user being processed.Change the cleanup call to:
so all operations in that iteration consistently target the same user.
Relationship to other open PRs
#5809 currently contains the same incorrect
clean_nginx_env(user: user)call in its modifiedNginxCleanGeneratorlifecycle-lock path. #5817 should therefore be merged before #5809 and #5809 rebased onto it, or the equivalent correction must be made in #5809 before merge.This is especially relevant to #5809 because that PR deliberately serializes PUN cleanup per user with:
Using the outer
uservalue for environment cleanup inside that lock would undermine the per-user consistency that #5809 is intended to provide.For the current related PR sequence, this fits naturally as:
After #5817 lands, #5809 should be rebased so its
nginx_cleanpath inherits this correction.