You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
setuid and setgid cause the ENTIRE upstart job to run as that user. Since the default user is "redis" this means that user cannot create the appropriate pid directory. The upstart script will have to be modified to call out to sudo to run the redis process itself, this is an issue however as I don't believe you can use sudo to set the ulimit as limit is a shell builtin.
This is a known limitation of upstart and a real pain in the butt :)
The text was updated successfully, but these errors were encountered:
Oh, the joy i've felt working with upstart. The TL;DR is that when using upstart as a job control, i will have to tell redis not to daemonize itself, then i can run it via upstart. In order to allow the creation of the pid directory in the upstart script I can't use setuid as it is global to the script. That means I have to run the redis server binary like so
su -s /bin/sh -c exec "$0" "$@" redis /usr/local/bin/redis-server /etc/redis/6379.conf
As using sudo causes issues with upstart as it forks.
The bright side here is this actually seems to work, and work on reboot without any issue.
I also have started to depend on the "ulimit" cookbook to handle the setting of the file descriptor limit for redis. I had resisted this change in the past as I like keeping requirements thin, but i've buckled on this one.
setuid and setgid cause the ENTIRE upstart job to run as that user. Since the default user is "redis" this means that user cannot create the appropriate pid directory. The upstart script will have to be modified to call out to sudo to run the redis process itself, this is an issue however as I don't believe you can use sudo to set the ulimit as limit is a shell builtin.
This is a known limitation of upstart and a real pain in the butt :)
The text was updated successfully, but these errors were encountered: