@mattsta @badboy
by using config set masterauth in redis, we can change the masterauth password
however it seems that the slave connection does not try to auth master with the new masterauth password, then master/slave ping/pong timeout, and master disconnects the slave
then it runs master/slave sync again
[28389] 26 Aug 14:50:02.157 * Background saving terminated with success
[28389] 26 Aug 14:50:02.157 * Synchronization with slave succeeded
[28389] 26 Aug 14:52:24.312 # Disconnecting timedout slave: xxx.xxx.xxx.xxx:1234
[28389] 26 Aug 14:52:24.312 # Connection with slave xxx.xxx.xxx.xxx:1234 lost.
[28389] 26 Aug 14:52:25.309 * Slave asks for synchronization
[28389] 26 Aug 14:52:25.309 * Unable to partial resync with the slave for lack of backlog (Slave request was: 2286).
[28389] 26 Aug 14:52:25.309 # Warning: slave tried to PSYNC with an offset that is greater than the master replication offset.
[28389] 26 Aug 14:52:25.309 * Starting BGSAVE for SYNC
[28389] 26 Aug 14:52:25.309 * Background saving started by pid 28688
[28688] 26 Aug 14:52:25.413 * DB saved on disk
[28688] 26 Aug 14:52:25.414 * RDB: 0 MB of memory used by copy-on-write
[28389] 26 Aug 14:52:25.415 * Background saving terminated with success
[28389] 26 Aug 14:52:25.415 * Synchronization with slave succeeded
check the redis source code, it just update the data in the server
} else if (!strcasecmp(c->argv[2]->ptr,"masterauth")) {
zfree(server.masterauth);
server.masterauth = ((char*)o->ptr)[0] ? zstrdup(o->ptr) : NULL;
} else if (!strcasecmp(c->argv[2]->ptr,"maxmemory")) {
Comment From: mattsta
it just update the data in the server
Correct!
however it seems that the slave connection does not try to auth master with the new masterauth password,
New connections or old connections?
Redis only has one place to store the masterauth value, so it will be used for all new connections when changed. Any existing connections should keep working because they are already connected.