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

Ownership problem with Ubuntu redis-server #150

Closed
jerith opened this issue Jan 11, 2017 · 5 comments · Fixed by #157
Closed

Ownership problem with Ubuntu redis-server #150

jerith opened this issue Jan 11, 2017 · 5 comments · Fixed by #157
Labels
bug Something isn't working

Comments

@jerith
Copy link

jerith commented Jan 11, 2017

On Ubuntu 14.04, redis-server has an init script that does chown redis:redis $RUNDIR $PIDFILE (where RUNDIR=/var/run/redis and PIDFILE=$RUNDIR/redis-server.pid) at startup. This causes puppet to "fix" the ownership of /var/run/redis (to redis:root unless config_owner and config_group have been set differently), which triggers a restart of redis-server, which changes the ownership of /var/run/redis, etc. forever.

Is it possible to tell puppet not to care about the owner or group of /var/run/redis beyond the initial creation?

@petems
Copy link
Member

petems commented Jan 11, 2017

I think we can fix that easier by just changing the $config_group default on Ubuntu to Redis.

Can you try changing that in the code in your Ubuntu 14.04 machine and see if it changes anything else? So add a section in the params to change config_group in Ubuntu 👍

@jerith
Copy link
Author

jerith commented Jan 11, 2017

My workaround was to set redis::config_group to redis in hiera, which seems to have sorted out the problem.

@jerith
Copy link
Author

jerith commented Jan 11, 2017

On debian jessie (which we also run), a stock install of redis-server (from jessie-backports, although I don't think that makes a difference) has both /var/run/redis and /etc/redis/redis.conf owned by redis:redis. /etc/redis and everything else inside it is owned by root:root with world-readable permissions.

@nvtkaszpir
Copy link

The same happens on debian wheezy.

LarsErikP added a commit to ntnusky/profile that referenced this issue Mar 15, 2017
@dominics
Copy link

dominics commented Mar 23, 2017

Can you try changing that in the code in your Ubuntu 14.04 machine and see if it changes anything else?

Can confirm (albeit with 16.04) that it changes the group of /etc/redis, /etc/redis/redis.conf and /etc/default/redis-server, not just /var/run/redis. Fine for me (I want to CONFIG REWRITE anyway) - but, in general, it still doesn't quite match the package permissions.

petems added a commit to petems/puppet-redis that referenced this issue Apr 12, 2017
* "On Ubuntu 14.04, redis has an init script 
that does chown redis:redis $RUNDIR $PIDFILE 
(where RUNDIR=/var/run/redis and 
PIDFILE=$RUNDIR/redis-server.pid) at startup. 
This causes puppet to "fix" the ownership of 
/var/run/redis (to redis:root unless config_owner 
and config_group have been set differently), 
which triggers a restart of redis-server, 
which changes the ownership of /var/run/redis, 
etc. forever.
* Closes voxpupuli#150
petems added a commit that referenced this issue Apr 12, 2017
* "On Ubuntu 14.04, redis has an init script 
that does chown redis:redis $RUNDIR $PIDFILE 
(where RUNDIR=/var/run/redis and 
PIDFILE=$RUNDIR/redis-server.pid) at startup. 
This causes puppet to "fix" the ownership of 
/var/run/redis (to redis:root unless config_owner 
and config_group have been set differently), 
which triggers a restart of redis-server, 
which changes the ownership of /var/run/redis, 
etc. forever.
* Closes #150
petems added a commit that referenced this issue Apr 12, 2017
* "On Ubuntu 14.04, redis has an init script 
that does chown redis:redis $RUNDIR $PIDFILE 
(where RUNDIR=/var/run/redis and 
PIDFILE=$RUNDIR/redis-server.pid) at startup. 
This causes puppet to "fix" the ownership of 
/var/run/redis (to redis:root unless config_owner 
and config_group have been set differently), 
which triggers a restart of redis-server, 
which changes the ownership of /var/run/redis, 
etc. forever.
* Closes #150
@petems petems added the bug Something isn't working label May 3, 2017
cegeka-jenkins pushed a commit to cegeka/puppet-redis that referenced this issue Feb 16, 2021
* "On Ubuntu 14.04, redis has an init script 
that does chown redis:redis $RUNDIR $PIDFILE 
(where RUNDIR=/var/run/redis and 
PIDFILE=$RUNDIR/redis-server.pid) at startup. 
This causes puppet to "fix" the ownership of 
/var/run/redis (to redis:root unless config_owner 
and config_group have been set differently), 
which triggers a restart of redis-server, 
which changes the ownership of /var/run/redis, 
etc. forever.
* Closes voxpupuli#150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants