Lucretius / vault_raft_snapshot_agent

⛔️ DEPRECATED ⛔️ An agent which provides periodic snapshotting capabilities of Vault's Raft backend
MIT License
78 stars 42 forks source link

Checking IsLeader instead of ClusterAddress. #4

Closed Kyrklund closed 3 years ago

Kyrklund commented 3 years ago

Checking "IsLeader" instead of "ClusterAddress", which returns true or false when asking local/specific node. Tested and verified in HA Vault Cluster Removed unused function that checks google dns for local node IP. Also removed packages that are not used with new way of determining Leader

Closes #3

Lucretius commented 3 years ago

Just saw this PR, it looks good I'll try to get it released soon.

To confirm - is your addr property in the config set to localhost? Currently there is an option to set the addr (in snapshot_agent/agent.go but I think if we want to use this change, that property should be removed/ignored - as setting it to something aside from localhost will cause issues with determining the leader.

Kyrklund commented 3 years ago

In our setup we had addr set to the local nodes address. On server1 it is set to: server1.example.com and on server2 to: server1.example.com

Lucretius commented 3 years ago

I see - so it sounds like we just need to make it optional (since by default it resolves to 127.0.0.1) and then call that out in the documentation. After that, this should be good to go.

LouisNitag commented 3 years ago

Any news about it?

Lucretius commented 3 years ago

Let me merge this in, sorry about the delay