IDO DB host change


For a maintenance purpose, I want to change the IDO DB host which has both Icinga2 and Icingweb2 DBs. I’ve HA enabled and the DB seems to be synced. The setup is Masters → Satellites → clients ( nrpe ).

I do see the size of the ibdata file is different on both nodes. The currently active host has a lot bigger in size than the replica host. So I want to make sure that DBs have the same data.

How do I confirm that at the DB level ?
Do I need to stop all icinga2 service on all endpoints before I change the DB host in the ido.config?

Please advise

The HA feature of the ido-connection does not create a fully synced database on two nodes.
@dnsmichi explained this here: Implementing HA Master-Master setup - #8 by dnsmichi
I previously had this “illusion”, but it was just wishful thinking^^

So two have two synced databses you would need to have some form of replication.

A change to the ido config will need a reload of icinga2.

Yes, the mysql replication is in place.

Then I would go with changing the ido config and then reloading icinga2.

But I can’t talk from experience here, because my setups are either signle master, single db oder HA master with galera clustered db :slight_smile:

It sounds like you’re asking more of a database question. Are you using MySQL? Slave replication? If so, you can use pt-table-checksum to verify the slave is consistent before promoting it to master. Only the Icinga2 master(s) should be writing to the database, unless I’m mistaken.

1 Like