-
Notifications
You must be signed in to change notification settings - Fork 632
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
[BUG] redis-sentinel command does not operate in sentinel mode #719
Comments
This is because /* Returns 1 if there is --sentinel among the arguments or if
* executable name contains "valkey-sentinel". */
int checkForSentinelMode(int argc, char **argv, char *exec_name) {
if (strstr(exec_name, "valkey-sentinel") != NULL) return 1;
for (int j = 1; j < argc; j++)
if (!strcmp(argv[j], "--sentinel")) return 1;
return 0;
} |
I suppose we probably should care about it if we want to be a drop in replacement. We could change it to search for |
good idea, i see we already had these:
so i think we can just add a new line:
|
We already have similar changes to check-rdb / check-aof, apply this change to sentinel. Fixes valkey-io#719. Signed-off-by: Binbin <binloveplay1314@qq.com>
…io#731) We already have similar changes to check-rdb / check-aof, apply this change to sentinel. Fixes valkey-io#719. Signed-off-by: Binbin <binloveplay1314@qq.com>
…io#731) We already have similar changes to check-rdb / check-aof, apply this change to sentinel. Fixes valkey-io#719. Signed-off-by: Binbin <binloveplay1314@qq.com>
…io#731) We already have similar changes to check-rdb / check-aof, apply this change to sentinel. Fixes valkey-io#719. Signed-off-by: Binbin <binloveplay1314@qq.com> Signed-off-by: Ping Xie <pingxie@google.com>
…io#731) We already have similar changes to check-rdb / check-aof, apply this change to sentinel. Fixes valkey-io#719. Signed-off-by: Binbin <binloveplay1314@qq.com> Signed-off-by: Ping Xie <pingxie@google.com>
We already have similar changes to check-rdb / check-aof, apply this change to sentinel. Fixes #719. Signed-off-by: Binbin <binloveplay1314@qq.com> Signed-off-by: Ping Xie <pingxie@google.com>
Describe the bug
The redis-sentinel command does not operate in sentinel mode when sentinel starts.
I have to explicitly pass "--sentine" as a parameter for it to work properly.
To reproduce
Test Version : valkey-7.2.5
[root@test bin]# ls -al
total 38480
drwxr-xr-x. 2 root root 4096 Jun 12 09:25 .
drwxr-xr-x. 13 root root 146 Jun 10 09:44 ..
lrwxrwxrwx 1 root root 37 Jun 10 09:44 aws -> /usr/local/aws-cli/v2/current/bin/aws
lrwxrwxrwx 1 root root 47 Jun 10 09:44 aws_completer -> /usr/local/aws-cli/v2/current/bin/aws_completer
lrwxrwxrwx 1 root root 16 Jun 12 09:25 redis-benchmark -> valkey-benchmark
lrwxrwxrwx 1 root root 16 Jun 12 09:25 redis-check-aof -> valkey-check-aof
lrwxrwxrwx 1 root root 16 Jun 12 09:25 redis-check-rdb -> valkey-check-rdb
lrwxrwxrwx 1 root root 10 Jun 12 09:25 redis-cli -> valkey-cli
lrwxrwxrwx 1 root root 15 Jun 12 09:25 redis-sentinel -> valkey-sentinel
lrwxrwxrwx 1 root root 13 Jun 12 09:25 redis-server -> valkey-server
-rwxr-xr-x 1 root root 9455248 Jun 12 09:25 valkey-benchmark
lrwxrwxrwx 1 root root 13 Jun 12 09:25 valkey-check-aof -> valkey-server
lrwxrwxrwx 1 root root 13 Jun 12 09:25 valkey-check-rdb -> valkey-server
-rwxr-xr-x 1 root root 10185376 Jun 12 09:25 valkey-cli
lrwxrwxrwx 1 root root 13 Jun 12 09:25 valkey-sentinel -> valkey-server
-rwxr-xr-x 1 root root 19754120 Jun 12 09:25 valkey-server
Fail
[root@test ~]# /usr/local/bin/redis-sentinel /etc/redis/sentinel.conf
*** FATAL CONFIG FILE ERROR (Version 7.2.5) ***
Reading the configuration file, at line 14
Success
[root@test ~]# /usr/local/bin/redis-sentinel /etc/redis/sentinel.conf --sentinel
Success
[root@test ~]# /usr/local/bin/valkey-sentinel /etc/redis/sentinel.conf
The text was updated successfully, but these errors were encountered: