High-Availability Master Setup - primary master

Hi,

I have setup icinga in ha master with one db node, and two masters, as in the ‘Icinga2 Distributed Monitoring’ described Setup works well, and master role and db connection are changed after a few seconds as expected.

My problem is, that the master2 always gets active and master1 pauses his IDO connection.
But I think master01 should keep his connection, also when master2 gets back online.
Is there an option that can affect this behave?

Hope someone can tell me where’s my mistake.

Icinga2 version: r2.12.3-1
Disabled features: command compatlog debuglog elasticsearch gelf graphite icingadb influxdb livestatus opentsdb perfdata statusdata syslog
Enabled features: api checker ido-mysql mainlog notification
OS: debian 11 (bullseye) kernel version: 5.10.0-11-amd64

Regards, Markus

Unfortunately the feature does not stick to one node after switching, but will always fallback to the node it thinks it should run on. So no mistake on your side, just designed in this way.

Okay, that sounds like I already thought. But what are the parameters which let cinga think where it should run, in this case master1 was the initial installed master, and is also the more powerfull one of both :slight_smile:

It is a hash build on object names, so servername and name of the feature object have an impact on it. But the hash will be rebuild always when a change to the configuration happens, so I am not sure if tinkering with the name would help as a permanent solution even if I would see this as a valid option instead of some kind of gambling! :smiley: