Fix Sentinel configuration rewrite. (#8480)

The `resolve-hostnames` and `announce-hostnames` parameters were not
specified correctly according to the new convention introduced by
1aad55b66.
This commit is contained in:
Yossi Gottlieb 2021-02-10 18:38:10 +02:00 committed by GitHub
parent b5ca1e9e53
commit 29ac9aea5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2077,13 +2077,13 @@ void rewriteConfigSentinelOption(struct rewriteConfigState *state) {
*/
line = sdscatprintf(sdsempty(), "sentinel resolve-hostnames %s",
sentinel.resolve_hostnames ? "yes" : "no");
rewriteConfigRewriteLine(state,"sentinel",line,
rewriteConfigRewriteLine(state,"sentinel resolve-hostnames",line,
sentinel.resolve_hostnames != SENTINEL_DEFAULT_RESOLVE_HOSTNAMES);
/* sentinel announce-hostnames. */
line = sdscatprintf(sdsempty(), "sentinel announce-hostnames %s",
sentinel.announce_hostnames ? "yes" : "no");
rewriteConfigRewriteLine(state,"sentinel",line,
rewriteConfigRewriteLine(state,"sentinel announce-hostnames",line,
sentinel.announce_hostnames != SENTINEL_DEFAULT_ANNOUNCE_HOSTNAMES);
/* For every master emit a "sentinel monitor" config entry. */