Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
systemd: Ensure services are started with Group pulp_group
Browse files Browse the repository at this point in the history
Currently the `pulpcore-api` and  `pulpcore-content` have no group
specified on their unit files. Leading them to create their file and
folders to a defaulted group (guid: 100).

This commit ensures files and folders are created as {{ pulp_user }}:{{
pulp_group }}

fixes #7035
  • Loading branch information
Spredzy committed Jul 1, 2020
1 parent 92f78a4 commit 22c9a83
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES/7035.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Ensure `pulpcore-api`, `pulpcore-content` and `pulpcore-resource-manager` are started with
group `{{ pulp_group }}`. Note: People will need to chgrp `{{ pulp_group }}` already existing
path that are not created/managed by systemd; `/var/lib/pulp`.
1 change: 1 addition & 0 deletions roles/pulp_api/templates/pulpcore-api.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Environment="PATH={{ pulp_install_dir }}/bin:{{ default_bin_path }}"
Environment="LD_LIBRARY_PATH={{ pulp_ld_library_path }}"
{% endif %}
User={{ pulp_user }}
Group={{ pulp_group }}
PIDFile=/run/pulpcore-api.pid
RuntimeDirectory=pulpcore-api
ExecStart={{ pulp_install_dir }}/bin/gunicorn pulpcore.app.wsgi:application \
Expand Down
1 change: 1 addition & 0 deletions roles/pulp_content/templates/pulpcore-content.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Environment="PATH={{ pulp_install_dir }}/bin:{{ default_bin_path }}"
Environment="LD_LIBRARY_PATH={{ pulp_ld_library_path }}"
{% endif %}
User={{ pulp_user }}
Group={{ pulp_group }}
WorkingDirectory=/var/run/pulpcore-content/
RuntimeDirectory=pulpcore-content
ExecStart={{ pulp_install_dir }}/bin/gunicorn pulpcore.content:server \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Environment="PATH={{ pulp_install_dir }}/bin:{{ default_bin_path }}"
Environment="LD_LIBRARY_PATH={{ pulp_ld_library_path }}"
{% endif %}
User={{ pulp_user }}
Group={{ pulp_group }}
WorkingDirectory=/var/run/pulpcore-resource-manager/
RuntimeDirectory=pulpcore-resource-manager
ExecStart={{ pulp_install_dir }}/bin/rq worker \
Expand Down

0 comments on commit 22c9a83

Please sign in to comment.