Set redis file descriptor limit when run via pacemaker
authorMichele Baldessari <michele@acksyn.org>
Fri, 21 Oct 2016 08:02:39 +0000 (10:02 +0200)
committerMichele Baldessari <michele@acksyn.org>
Tue, 25 Oct 2016 13:46:10 +0000 (15:46 +0200)
commit03a68a5c8cdbabcf6e152b9aca62f1007c713b5c
treea9df9eb63bde3832daffb104a6c568a3a68473c5
parent0b9c8fb56ae508aafca7219bfaff6e75afdfa9c2
Set redis file descriptor limit when run via pacemaker

The current redis file descriptor limit is 4096 because of two reasons:
- It is run via the redis user
- It is not started via systemd which has explicit LimitNOFILE set to
  10240 (which matches the default configuration of maximum 10000
  clients)

Create an /etc/security/limits.d/redis.conf file in order to increase
the fd limit value  With this change we correctly get the following
limits:
[root@overcloud-controller-0 ~]# pcs status |grep -A2 redis
 Master/Slave Set: redis-master [redis]
     Masters: [ overcloud-controller-2 ]
     Slaves: [ overcloud-controller-0 overcloud-controller-1 ]

[root@overcloud-controller-0 ~]# cat /proc/`pgrep redis`/limits | grep open
Max open files            10240                10240   files

Previously this limit was set to 4096.

Change-Id: I7691581bad92ad9442cecd82cf44f5ac78ed169f
Closes-Bug: #1635334
manifests/profile/pacemaker/database/redis.pp