-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace master-reboot-down-after-period with primary-reboot-down-after-period in sentinel.conf #647
Replace master-reboot-down-after-period with primary-reboot-down-after-period in sentinel.conf #647
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #647 +/- ##
============================================
+ Coverage 70.11% 70.27% +0.16%
============================================
Files 112 112
Lines 60587 60590 +3
============================================
+ Hits 42480 42581 +101
+ Misses 18107 18009 -98
|
307cca3
to
0b3d8a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There's still no primary alias for GET-MASTER-ADDR-BY-NAME? (#36)
There's some duplicated code in the test case. We could use a vaiable for primary/master, like this, if you want:
foreach role {primary master} {
# ...
S $id SENTINEL SET mymaster $role-reboot-down-after-period 5000
# ...
}
63ba675
to
3b2197d
Compare
3b2197d doesn't look right. Before this commit, the test case repeated the whole check for "master" and "primary". With the for loop it only repeats 3 commands for "primary" and "master". I think we need to put this foreach role {master primary} {
foreach_sentinel_id id {
S $id SENTINEL SET mymaster $role-reboot-down-after-period 5000
...
}
kill_instance valkey $master_id
reboot_instance valkey $master_id
foreach_sentinel_id id {
...
}
...
# Make sure the instance load all the dataset
while 1 {
...
}
}
} ; # <--- end of test case |
Signed-off-by: hwware <wen.hui.ware@gmail.com>
Signed-off-by: hwware <wen.hui.ware@gmail.com>
Signed-off-by: hwware <wen.hui.ware@gmail.com>
Signed-off-by: hwware <wen.hui.ware@gmail.com>
Signed-off-by: hwware <wen.hui.ware@gmail.com>
3b2197d
to
8cb77fe
Compare
Hi! Trying this on version 8.0, I see that it crashes with the default sentinel.conf values
To fix I need to replace myprimary with mymaster |
@javsalgar thanks for the report. I will take a look later |
Since in here the monitor value is mymaster, we need to make sure the primary name is the same, otherwise the default configuration cannot start sentinel. ``` sentinel monitor mymaster 127.0.0.1 6379 2 ``` The following error occurs when the default configuration is started: ``` *** FATAL CONFIG FILE ERROR (Version 255.255.255) *** Reading the configuration file, at line 358 >>> 'SENTINEL primary-reboot-down-after-period myprimary 0' No such master with specified name. ``` Introduced in valkey-io#647. Signed-off-by: Binbin <binloveplay1314@qq.com>
#1040) Since in here the monitor value is mymaster, we need to make sure the primary name is the same, otherwise the default configuration cannot start sentinel. ``` sentinel monitor mymaster 127.0.0.1 6379 2 ``` The following error occurs when the default configuration is started: ``` *** FATAL CONFIG FILE ERROR (Version 255.255.255) *** Reading the configuration file, at line 358 >>> 'SENTINEL primary-reboot-down-after-period myprimary 0' No such master with specified name. ``` Introduced in #647. Signed-off-by: Binbin <binloveplay1314@qq.com>
valkey-io#1040) Since in here the monitor value is mymaster, we need to make sure the primary name is the same, otherwise the default configuration cannot start sentinel. ``` sentinel monitor mymaster 127.0.0.1 6379 2 ``` The following error occurs when the default configuration is started: ``` *** FATAL CONFIG FILE ERROR (Version 255.255.255) *** Reading the configuration file, at line 358 >>> 'SENTINEL primary-reboot-down-after-period myprimary 0' No such master with specified name. ``` Introduced in valkey-io#647. Signed-off-by: Binbin <binloveplay1314@qq.com>
valkey-io#1040) Since in here the monitor value is mymaster, we need to make sure the primary name is the same, otherwise the default configuration cannot start sentinel. ``` sentinel monitor mymaster 127.0.0.1 6379 2 ``` The following error occurs when the default configuration is started: ``` *** FATAL CONFIG FILE ERROR (Version 255.255.255) *** Reading the configuration file, at line 358 >>> 'SENTINEL primary-reboot-down-after-period myprimary 0' No such master with specified name. ``` Introduced in valkey-io#647. Signed-off-by: Binbin <binloveplay1314@qq.com>
valkey-io#1040) Since in here the monitor value is mymaster, we need to make sure the primary name is the same, otherwise the default configuration cannot start sentinel. ``` sentinel monitor mymaster 127.0.0.1 6379 2 ``` The following error occurs when the default configuration is started: ``` *** FATAL CONFIG FILE ERROR (Version 255.255.255) *** Reading the configuration file, at line 358 >>> 'SENTINEL primary-reboot-down-after-period myprimary 0' No such master with specified name. ``` Introduced in valkey-io#647. Signed-off-by: Binbin <binloveplay1314@qq.com> Signed-off-by: naglera <anagler123@gmail.com>
Update sentinel.conf config parameter,
From:
SENTINEL master-reboot-down-after-period mymaster 0
To:
SENTINEL primary-reboot-down-after-period myprimary 0
But we still keep the backward compatibility, clients could use SENTINEL master-reboot-down-after-period mymaster 0 OR
SENTINEL primary-reboot-down-after-period myprimary 0