Bug 1732845 - Redis PID - non daemonized
Summary: Redis PID - non daemonized
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: redis
Version: epel7
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Nathan Scott
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-24 13:54 UTC by ssoto
Modified: 2019-07-25 12:53 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-25 12:53:41 UTC


Attachments (Terms of Use)

Description ssoto 2019-07-24 13:54:44 UTC
Description of problem:

In epel6 version the init script created a PID no matter if redis was configured as daemonized or not. In epel7 redis uses systemd unit file and PID will not be created. A solution floating around at the moment is to add the following: 

ExecStartPost=/bin/sh -c echo $MAINPID > /var/run/redis/redis.pid
https://github.com/antirez/redis/issues/3716

knowing the redis pid is important when multiple redis are running on the same box to set optimizations like defining affinity 

additionally the unit file is not set to noreplace so changes will be reverted on update

Version-Release number of selected component (if applicable):

3.2.12-2.el7

How reproducible:

run redis with deamon set to false, and no pid will be created. perform the same action with the el6 version of redis and pid will be recreated

Steps to Reproduce:
1. spin up el6 redis 
2. spin up el7 redis
3. set both to confs daemonize no 

Actual results:


Expected results:

have a pid file created for redis running

Additional info:

Comment 1 Remi Collet 2019-07-24 14:01:32 UTC
> additionally the unit file is not set to noreplace so changes will be reverted on update

Unit files are NOT configuration files.

If you need to change it, use "systemctl edit redis" 
This  will create a /etc/systemd/system/redis.service.d/override.conf

Comment 2 ssoto 2019-07-24 14:04:17 UTC
Remi, 

Thank you, that is cool. I was not aware. That would work for a solution. I guess this can be closed. 

Regards, 

S


Note You need to log in before you can comment on or make changes to this bug.