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

Add switch to manage File[/var/run/redis] #204

Merged
merged 1 commit into from
May 18, 2017

Conversation

petems
Copy link
Member

@petems petems commented May 18, 2017

The existence of /var/run/redis causes the startup of redis-server via
systemd to fail on debian systems with redis-server >= 3.2.8-2.

The default unit file for redis-server in debian jessie-backports
contains RuntimeDirectory=redis, see this commit.

This causes systemd to attempt to create /var/run/redis, which fails,
since puppet already created it:

May 18 14:12:12 po-redis-gitlab-qa-bs01 systemd[1]: Starting Advanced key-value store...
May 18 14:12:12 po-redis-gitlab-qa-bs01 systemd[24311]: Failed at step RUNTIME_DIRECTORY spawning /bin/run-parts: File exists
May 18 14:12:12 po-redis-gitlab-qa-bs01 systemd[24312]: Failed at step RUNTIME_DIRECTORY spawning /usr/bin/redis-server: File exists
May 18 14:12:12 po-redis-gitlab-qa-bs01 systemd[1]: redis-server.service: control process exited, code=exited status=233
May 18 14:12:12 po-redis-gitlab-qa-bs01 systemd[1]: Failed to start Advanced key-value store.
May 18 14:12:12 po-redis-gitlab-qa-bs01 systemd[1]: Unit redis-server.service entered failed state.
May 18 14:12:12 po-redis-gitlab-qa-bs01 systemd[1]: redis-server.service holdoff time over, scheduling restart.
May 18 14:12:12 po-redis-gitlab-qa-bs01 systemd[1]: Stopping Advanced key-value store...

Additionally the $var_run_redis_mode is wrong as well, since redis-server
sets it to 0755 and the module changes it back to 2755.

Also see issue #150, the same applies here - puppet changes the mode of
/var/run/dir and refreshes Service[redis-server], which then fails
to restart because systemd can't create the directory.

@petems petems force-pushed the ntnn-fix/debian-runtime-dir branch 3 times, most recently from 1827691 to 9ebf92d Compare May 18, 2017 20:20
* The existence of /var/run/redis causes the startup of redis-server via
systemd to fail on debian systems with redis-server >= 3.2.8-2:

```
May 18 19:17:54 debian-8 systemd[1]: Starting Advanced key-value store...
       May 18 19:17:54 debian-8 systemd[803]: Failed at step RUNTIME_DIRECTORY spawning /bin/run-parts: File exists
       May 18 19:17:54 debian-8 systemd[804]: Failed at step RUNTIME_DIRECTORY spawning /usr/bin/redis-server: File exists
       May 18 19:17:54 debian-8 systemd[1]: redis-server.service: control process exited, code=exited status=233
       May 18 19:17:54 debian-8 systemd[1]: Failed to start Advanced key-value store.
       May 18 19:17:54 debian-8 systemd[1]: Unit redis-server.service entered failed state.
       May 18 19:17:54 debian-8 systemd[1]: redis-server.service holdoff time over, scheduling restart.
```
* It will actually eventually start, but the first run will fail
* The default unit file for redis-server in debian jessie-backports
contains `RuntimeDirectory=redis`, see [this commit](https://github.com/lamby/pkg-redis/commit/1cecea5abcb2ce05beacd4347977634d06c59cef).
* Adds logic to not manage the /var/run/redis directory if systemd present
@petems petems force-pushed the ntnn-fix/debian-runtime-dir branch from 9ebf92d to 8ed64aa Compare May 18, 2017 20:26
@petems petems merged commit 63251bc into voxpupuli:master May 18, 2017
@petems petems deleted the ntnn-fix/debian-runtime-dir branch May 18, 2017 21:08
cegeka-jenkins pushed a commit to cegeka/puppet-redis that referenced this pull request Feb 16, 2021
* The existence of /var/run/redis causes the startup of redis-server via
systemd to fail on debian systems with redis-server >= 3.2.8-2:

```
May 18 19:17:54 debian-8 systemd[1]: Starting Advanced key-value store...
       May 18 19:17:54 debian-8 systemd[803]: Failed at step RUNTIME_DIRECTORY spawning /bin/run-parts: File exists
       May 18 19:17:54 debian-8 systemd[804]: Failed at step RUNTIME_DIRECTORY spawning /usr/bin/redis-server: File exists
       May 18 19:17:54 debian-8 systemd[1]: redis-server.service: control process exited, code=exited status=233
       May 18 19:17:54 debian-8 systemd[1]: Failed to start Advanced key-value store.
       May 18 19:17:54 debian-8 systemd[1]: Unit redis-server.service entered failed state.
       May 18 19:17:54 debian-8 systemd[1]: redis-server.service holdoff time over, scheduling restart.
```
* It will actually eventually start, but the first run will fail
* The default unit file for redis-server in debian jessie-backports
contains `RuntimeDirectory=redis`, see [this commit](https://github.com/lamby/pkg-redis/commit/1cecea5abcb2ce05beacd4347977634d06c59cef).
* Adds logic to not manage the /var/run/redis directory if systemd present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants