Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
[dev.icinga.com #5272] Ido2db should check if the db schema version is appropriate for it #1402
This issue has been migrated from Redmine: https://dev.icinga.com/issues/5272
Created by mhoyer on 2013-12-06 09:00:33 +00:00
we try to automate our monitoring infrastructure deployment in a cld style. To increase resilience on updates change i would really like to have ido2db check it's database schema version on startup and terminate if it isn't appropriate for it. This would help a lot to get remembered that there is something to be done with the database. It would be simple to determine that something is wrong if the service stops working and there should also be a log message informing about the problem.
2014-01-03 17:04:25 +00:00 by (unknown) 920eee9
2014-01-03 17:04:47 +00:00 by (unknown) 6bcd519
2014-01-03 17:09:00 +00:00 by (unknown) cd1d7a0
Updated by mfriedrich on 2014-01-03 17:05:44 +00:00
The log message already exists.
The problem is the flow when such a connection attempt happens - after idomod sending a message, and not on daemon startup. All the database connectivity checks happen in the forked child which happens on idomod client connect. By simply terminating the client, a reconnect by idomod will again force the db schema version check. While this isn't essentially clean, it will attempt to flood the (sys)log with such messages indicating a re-occuring problem to the user.
An additional check on startup is required which uses its own idi struct for the initial schema version handshake.
This renders the db version check obsolete on each client connection, therefore removing it.