-
-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix webhook generate type functionailty for non-root user #512
Conversation
50eb42a
to
699bc9a
Compare
I think tests are failing due to this recent change in systemd https://access.redhat.com/solutions/4420581 I am not sure how to address it yet, open for suggestions |
3022da2
to
09d1fea
Compare
K, I fixed the systemd unit file, so tests don't fail on systems with new systemd |
looks good to me, but it would be nice if somebody else can review / test this locally. |
templates/webhook.service.erb
Outdated
EnvironmentFile=-/etc/sysconfig/webhook | ||
RuntimeDirectory=webhook | ||
User=<%= @user %> | ||
PIDFile=/var/run/webhook/webhook.pid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line was only a problem in CI in docker. On real systems it would be fine.
templates/webhook.service.erb
Outdated
@@ -3,19 +3,16 @@ Description=R10K Webhook Service | |||
After=syslog.target network.target | |||
|
|||
[Service] | |||
Type=forking | |||
Type=simple |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To change this, wouldn't you also have to change the process such that it doesn't daemonise and create the pidfile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, ignore that, you have. Still not convinced we should mess around too much just because docker has an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, not just docker, it affects regular installations as well
That RedHat article I linked above recommending not using Type=forking as a legacy method.
Same does systemd project itself - https://www.freedesktop.org/software/systemd/man/systemd.service.html
|
#511 is proposing the same fix, btw |
I've pulled out just the systemd change into its own PR. #513 |
if webhook is running under unprivileged account it creates .resource_types in it's home directory, instead of code directory explicitly pass parameters to point to configured code location modified ordering of service components to restart service when service scripts have been updated
09d1fea
to
15570a6
Compare
Rebased |
Pull Request (PR) description
if webhook is running under unprivileged account it creates
.resource_types in it's home directory, instead of code directory
explicitly pass parameters to point to configured code location
This Pull Request (PR) fixes the following issues
Fixes #412