I start the sentinel with a down-after-milliseconds of 5000 and then it rewrites its configuration file and do not put the old down-after-milliseconds of 5000. Am I missing something?

Edit: I was using version Redis 3.2.8 and looks like that updating to version Redis 3.2.9 doesn't solve the problem.

Strange thing is that I have 3 instances of the sentinel (in kubernetes), but 2 were able to hold the config and 1 wasn't.

Comment From: badboy

5000 is the default and Sentinel tends to remove values that are unchanged from the defaults. It is still correctly configured.

Comment From: renannprado

Could you please show me where it says the default is 5000? Because for me it's set to 30000 when the configuration is removed

Comment From: badboy

I am sorry, I wrote to fast (maybe I should not answer issues right after getting out of bed). You are right and the default is 30000 and therefore Sentinel should not remove your changed value from the config.

Therefore what you report indeed sounds like a bug. With the limited info it is hard to say what went wrong though.

Comment From: charsyam

@renannprado Did you modify sentinel source code? What kind of way do you install redis?

when did you send "sentinel masters", is it right "down-after-milliseconds" values?

Comment From: renannprado

I didn't modify the source. The version is 3.2.9-alpine (I guess that's the name of the docker image). I tried to use the command sentinel master <master name> and it showed the default value of 30000

Comment From: charsyam

@renannprado "sentinel master and it showed the default value of 30000" I think it means you don't change it other value?, it doesn't show default value, it just shows the value you set.

Comment From: renannprado

Yes, I did set the value to 5000. But when I look at the file after it's rewritten I don't see my config and when I query the sentinel I see the value of 30000, which is the default

Comment From: antirez

Hello, I tried to reproduce this without success. Could you please start with a clean setup and show step by step how to cause the problem, in case you find a way to reproduce it? Thanks.

Comment From: renannprado

@antirez so far I've only seen this behavior inside of kubernetes, but I'm pretty sure it will happen outside of kubernetes too. I'll see if I can prepare an easy way to reproduce the issue outside of kubernetes and will send it here

Comment From: sunflowerbofh

Annotation:

You must coercively put this config line sentinel down-after-milliseconds ... after sentinel monitor mymaster ... Otherwise the service won't start. No error in log file, console output is only "Job for redis-sentinel.service failed (...)".

Tested with Redis server v=6.0.9 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=d93f2ea556bbc8e1

Comment From: yossigo

Sentinel handles configuration directives in the order they're provided, so sentinel down-after-milliseconds... that refers to a master that was not defined yet will fail. This will be fixed in #8271.