Coder Social home page Coder Social logo

Comments (3)

enjoy-binbin avatar enjoy-binbin commented on August 17, 2024

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
'sentinel monitor aaasentinel 192.168.x.x 6379 2'
sentinel directive while not in sentinel mode

This is because redis-sentinel causes it to not enter this if statement, so --sentinel needs to be passed explicitly. @madolson do wo need to worry about this?

/* 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;
}

from valkey.

madolson avatar madolson commented on August 17, 2024

@madolson do to need to worry about this?

I suppose we probably should care about it if we want to be a drop in replacement. We could change it to search for *-sentinel instead perhaps?

from valkey.

enjoy-binbin avatar enjoy-binbin commented on August 17, 2024

good idea, i see we already had these:

    /* valkey may install symlinks like
     * redis-server -> valkey-server, redis-check-rdb -> valkey-check-rdb,
     * redis-check-aof -> valkey-check-aof, etc. */
    if (strstr(exec_name, "redis-check-rdb") != NULL)
        redis_check_rdb_main(argc, argv, NULL);
    else if (strstr(exec_name, "redis-check-aof") != NULL)
        redis_check_aof_main(argc, argv);

so i think we can just add a new line:

if (strstr(exec_name, "redis-sentinel") != NULL) return 1;

from valkey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.