Bug 1732845

Summary: Redis PID - non daemonized
Product: [Fedora] Fedora EPEL Reporter: ssoto
Component: redisAssignee: Nathan Scott <nathans>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: fabian.deutsch, fedora, fpercoco, jal233, lberk, mgoodwin, nathans
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-25 12:53:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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