New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dev.icinga.com #12322] Exceptions might be better than exit in IDO #4440
Comments
Updated by mfriedrich on 2016-08-08 14:16:55 +00:00 Upgrading the database schema should involve a daemon stop for icinga2. I'm not exactly sure if exceptions instead of exit() would entirely solve the issue - what if the user never updates the schema on package upgrade, ignores the syslog and doesn't have any ido health check applied? |
Updated by ip1981 on 2016-08-08 14:26:38 +00:00
wut? :-) Now seriously, I don't see much difference between access denied to the database (exception) and the database is broken (exit). While the database may be not usable for some reason, icinga still can do its work, instead of restarting every minute (and skipping most of checks). |
There's pros and cons. If you send in a PR, we'll look into merging it. |
If tests work fine, I'm considering this for the next release. |
|
This issue has been migrated from Redmine: https://dev.icinga.com/issues/12322
Created by ip1981 on 2016-08-06 13:13:56 +00:00
Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-08-08 14:26:38 +00:00 (in Redmine)
I noticed a kind of race on new installation, when icinga and mysql database are get initialized in parallel:
Credentials are valid (icinga can connect to the database), tables exist,
but version info is not yet inserted (is it done at the end of the SQL file).
Throwing an exception might be better choice just like it's done for failed connection,
to avoid restarts
From https://github.com/Icinga/icinga2/blob/master/lib/db\_ido\_mysql/idomysqlconnection.cpp:
The text was updated successfully, but these errors were encountered: