mirror of
https://github.com/fluencelabs/redis
synced 2025-05-03 14:32:14 +00:00
Sentinel: better specify startup errors due to config file.
Now it logs the file name if it is not accessible. Also there is a different error for the missing config file case, and for the non writable file case.
This commit is contained in:
parent
3c1672da7d
commit
c36a5dce54
@ -417,8 +417,13 @@ void initSentinel(void) {
|
|||||||
void sentinelIsRunning(void) {
|
void sentinelIsRunning(void) {
|
||||||
redisLog(REDIS_WARNING,"Sentinel runid is %s", server.runid);
|
redisLog(REDIS_WARNING,"Sentinel runid is %s", server.runid);
|
||||||
|
|
||||||
if (server.configfile == NULL || access(server.configfile,W_OK) == -1) {
|
if (server.configfile == NULL) {
|
||||||
redisLog(REDIS_WARNING,"Sentinel started without a config file, or config file not writable. Exiting...");
|
redisLog(REDIS_WARNING,
|
||||||
|
"Sentinel started without a config file. Exiting...");
|
||||||
|
} else if (access(server.configfile,W_OK) == -1) {
|
||||||
|
redisLog(REDIS_WARNING,
|
||||||
|
"Sentinel config file %s is not writable: %s. Exiting...",
|
||||||
|
server.configfile,strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user