From d0ecd1252c3703bcdcae4453f648c935b62ed957 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 28 May 2020 12:10:23 +0200 Subject: add comment for TimeoutStartSec and TimeoutStopSec in limit.conf fix missing notification to systemd for sentinel patch from https://github.com/antirez/redis/pull/7168 --- 0003-Notify-systemd-on-sentinel-startup.patch | 24 ++++++++++++++++++++++++ redis-limit-systemd | 11 +++++++++-- redis.spec | 12 ++++++++++-- 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 0003-Notify-systemd-on-sentinel-startup.patch diff --git a/0003-Notify-systemd-on-sentinel-startup.patch b/0003-Notify-systemd-on-sentinel-startup.patch new file mode 100644 index 0000000..ee58b56 --- /dev/null +++ b/0003-Notify-systemd-on-sentinel-startup.patch @@ -0,0 +1,24 @@ +From 16dbe5168224b9f8a2b193f014f3dbf7e9604516 Mon Sep 17 00:00:00 2001 +From: Daniel Murnane +Date: Fri, 1 May 2020 08:19:28 -0400 +Subject: [PATCH] Notify systemd on sentinel startup + +--- + src/server.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/server.c b/src/server.c +index 659604ef363..7ab7c39fd0a 100644 +--- a/src/server.c ++++ b/src/server.c +@@ -5111,6 +5111,10 @@ int main(int argc, char **argv) { + } else { + InitServerLast(); + sentinelIsRunning(); ++ if (server.supervised_mode == SUPERVISED_SYSTEMD) { ++ redisCommunicateSystemd("STATUS=Ready to accept connections\n"); ++ redisCommunicateSystemd("READY=1\n"); ++ } + } + + /* Warning the user about suspicious maxmemory setting. */ diff --git a/redis-limit-systemd b/redis-limit-systemd index 8003c2f..a792937 100644 --- a/redis-limit-systemd +++ b/redis-limit-systemd @@ -1,7 +1,14 @@ # If you need to change max open file limit # for example, when you change maxclient in configuration -# you can change the LimitNOFILE value below -# see "man systemd.exec" for information +# you can change the LimitNOFILE value below. +# See "man systemd.exec" for more information. + +# Slave nodes on large system may take lot of time to start. +# You may need to uncomment TimeoutStartSec and TimeoutStopSec +# directives below and raise their value. +# See "man systemd.service" for more information. [Service] LimitNOFILE=10240 +#TimeoutStartSec=90s +#TimeoutStopSec=90s diff --git a/redis.spec b/redis.spec index d7445b6..fbd9e80 100644 --- a/redis.spec +++ b/redis.spec @@ -39,7 +39,7 @@ # Pre-version are only available in github %global upstream_ver 6.0.3 #global upstream_pre RC4 -%global gh_commit 7cf0a77d59840fe3b1cdc5a98c91ce99c61fd3e3 +%global gh_commit f092dd3227cc74978853e379c0a7731bdaa324af %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner antirez %global gh_project redis @@ -55,7 +55,7 @@ Name: redis Version: %{upstream_ver}%{?upstream_pre:~%{upstream_pre}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A persistent key-value database Group: Applications/Databases License: BSD @@ -86,6 +86,8 @@ Source10: https://github.com/antirez/%{name}-doc/archive/%{doc_commit}/ Patch0001: 0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch # https://github.com/antirez/redis/pull/3494 - symlink Patch0002: 0002-install-redis-check-rdb-as-a-symlink-instead-of-dupl.patch +# https://github.com/antirez/redis/pull/7168 - notify systemd +Patch0003: 0003-Notify-systemd-on-sentinel-startup.patch BuildRequires: gcc %if 0%{?rhel} == 6 @@ -206,6 +208,7 @@ and removal, status checks, resharding, rebalancing, and other operations. mv ../%{name}-doc-%{doc_commit} doc %patch0001 -p1 %patch0002 -p1 +%patch0003 -p1 %if %{?with_jemalloc} rm -frv deps/jemalloc @@ -452,6 +455,11 @@ fi %changelog +* Thu May 28 2020 Remi Collet - 6.0.3-3 +- add comment for TimeoutStartSec and TimeoutStopSec in limit.conf +- fix missing notification to systemd for sentinel + patch from https://github.com/antirez/redis/pull/7168 + * Mon May 18 2020 Pablo Greco - 6.0.3-2 - Fix build on armhfp/el7 -- cgit