Articles in this section

How to change XDR passwords dynamically

Context

It is common requirement to change passwords periodically within an organization. Is it possible to change the XDR credentials dynamically without performing a rolling restart?


Method

Yes, here is an example on how to this:

 

asadm -e 'asinfo -v "set-config:context=xdr;dc=aerospike-dcn4;namespace=test;action=remove"'

# set new XDR user/password remotely on the destination

asadm -e 'asinfo -v "set-config:context=xdr;dc=aerospike-dcn4;auth-user=new-user-name"'

asadm -e 'asinfo -v "set-config:context=xdr;dc=aerospike-dcn4;auth-password-file=new_path"'

sleep 0.5

asadm -e 'asinfo -v "set-config:context=xdr;dc=aerospike-dcn4;namespace=test;action=add;rewind=2"'

 

 

Basically, you will need to remove the remote DC, change the XDR credentials and then add the DC back.

The rewind is needed to ensure that last 2 seconds of updates will get ship. Depending on your SLA, the number of seconds can be adjusted.

 

The sleep may need to be adjusted in case you hit the following error:

 

WARNING (xdr-client): (cluster.c:382) previous disconnect pending

WARNING (xdr): (dc.c:565) DC aerospike-dcn4 connect failed

 


Applies To Earliest Version

5.0

Applies To Latest Version

Current Version
Was this article helpful?
0 out of 0 found this helpful