alertmanager icon indicating copy to clipboard operation
alertmanager copied to clipboard

Allow specifying persistent peer ids

Open sinkingpoint opened this issue 3 years ago • 2 comments

Currently the default behaviour is to generate a new, random peer id on every startup. This makes clustering a bit weird, so this commit adds in an optional cli arg that allows specifying a custom peer id that we can persist across runs

This addresses #2285

Signed-off-by: sinkingpoint [email protected]

sinkingpoint avatar Jul 21 '22 03:07 sinkingpoint

Thanks for the review @simonpasquier ! I've added in an acceptance test to test the behaviour. Detecting duplicate names is an interesting problem... Yes - we can implement the ConflictDelegate interface, but the question is what to do with that information - we can log it (easy), or attempt to shut down one of the duplicates, but that, in practice gets a bit messy. In particular, identifying which peer is the "invalid" one is kind of difficult - memberlist doesn't have the idea of an "authoritative" node for a given name

sinkingpoint avatar Aug 08 '22 04:08 sinkingpoint

Sorry for the lag (PTO interruption on my side). I agree that there's no practical that we can decide which peer is more legitimate than the other. I think that logging the issue + adding a metric/alert would be good enough. WDYT?

simonpasquier avatar Sep 09 '22 15:09 simonpasquier

Apologies for leaving this... I think that sounds reasonable. Will push that today

sinkingpoint avatar Jan 30 '23 23:01 sinkingpoint