Set ownership of Gravity state dir to galaxy_user:galaxy_group
when created by SupervisorProcessManager
#104
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.
SupervisorProcessManager invokes
os.makedirs(self.supervisord_conf_dir)
, whereself.supervisord_conf_dir = os.path.join(self.supervisor_state_dir, "supervisord.conf.d")
andself.supervisor_state_dir = os.path.join(state_dir, "supervisor")
andstate_dir
is the Gravity state directory. Ifstate_dir
does not exist beforehand andgalaxyctl
is invoked as root, thenstate_dir
is created and owned by root, breaking Celery, as it needs to create the file celery-beat-schedule instate_dir
, but runs asgalaxy_user
.This the cause of issue #187 in the ansible-galaxy repo and this PR attempts to fix it.