Skip to content
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

Ensure webhook run folder exists on redhat systemd environments #283

Merged
merged 1 commit into from
Mar 3, 2017

Conversation

luisfdez
Copy link
Contributor

On RHEL7, the /run directory is now used as a temporary file storage system (tmpfs), meaning that files there are lost after reboots.

This parameter ensures that the folder is properly created when the service starts.

This implementation relies on systemd functionality that looks appropriate in the context of this module. An alternative, as proposed here:, is to define a new configuration file in /etc/tmpfiles.d/webhook.conf with contents like:

D /var/run/webhook 0755 root root -

(Where root can be replace via template with the proper user configured in the module).

@rnelson0
Copy link
Member

@luisfdez We have fixed the existing issues with tests that caused this to fail originally. Can you rebase this change and fix any failing tests? Thanks.

@elconas
Copy link

elconas commented Feb 23, 2017

This will always create the directory, even if the service is never started.

You can add this to /etc/systemd/system/multi-user.target.wants/webhook.service to only create the directories once the service is started.

ExecStartPre=/bin/mkdir -p /var/run/webhook
ExecStartPre=/bin/chown r10k /var/run/webhook
PermissionsStartOnly=true

@elconas
Copy link

elconas commented Feb 23, 2017

I think this one solves #339

On RHEL7, the /run directory is now used as a temporary file storage system
(tmpfs), meaning that files there are lost after reboots.

This parameter ensures that the folder is properly created when the
service starts.
@luisfdez
Copy link
Contributor Author

@rnelson0 sorry for have missed your comment, I just rebased it. It should be fine now.

@elconas
Copy link

elconas commented Feb 23, 2017

This solves the issue a little different #340

Copy link
Member

@dhollinger dhollinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good after the rebase.

@dhollinger dhollinger merged commit 345adaf into voxpupuli:master Mar 3, 2017
@dhollinger
Copy link
Member

@elconas there is an expectation that if the webhook configuration has been placed but the module, then it should be running. If not, I'd be curious to know why WebBrick isn't properly starting and why I'm not seeing the issue in the puppet log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants