mirror of https://github.com/Icinga/icinga2.git
Exit application when IDO version doesn't match expected version
fixes #6850
This commit is contained in:
parent
8256638fde
commit
731ee15d4d
|
@ -214,7 +214,8 @@ void IdoMysqlConnection::Reconnect(void)
|
||||||
|
|
||||||
if (!version_row) {
|
if (!version_row) {
|
||||||
Log(LogCritical, "IdoMysqlConnection", "Schema does not provide any valid version! Verify your schema installation.");
|
Log(LogCritical, "IdoMysqlConnection", "Schema does not provide any valid version! Verify your schema installation.");
|
||||||
BOOST_THROW_EXCEPTION(std::runtime_error("Schema does not provide any valid version! Verify your schema installation."));
|
|
||||||
|
Application::Exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
DiscardRows(result);
|
DiscardRows(result);
|
||||||
|
@ -225,8 +226,7 @@ void IdoMysqlConnection::Reconnect(void)
|
||||||
Log(LogCritical, "IdoMysqlConnection", "Schema version '" + version + "' does not match the required version '" +
|
Log(LogCritical, "IdoMysqlConnection", "Schema version '" + version + "' does not match the required version '" +
|
||||||
SCHEMA_VERSION + "'! Please check the upgrade documentation.");
|
SCHEMA_VERSION + "'! Please check the upgrade documentation.");
|
||||||
|
|
||||||
BOOST_THROW_EXCEPTION(std::runtime_error("Schema version '" + version + "' does not match the required version '" +
|
Application::Exit(EXIT_FAILURE);
|
||||||
SCHEMA_VERSION + "'!"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String instanceName = GetInstanceName();
|
String instanceName = GetInstanceName();
|
||||||
|
|
|
@ -216,7 +216,8 @@ void IdoPgsqlConnection::Reconnect(void)
|
||||||
|
|
||||||
if (!version_row) {
|
if (!version_row) {
|
||||||
Log(LogCritical, "IdoPgsqlConnection", "Schema does not provide any valid version! Verify your schema installation.");
|
Log(LogCritical, "IdoPgsqlConnection", "Schema does not provide any valid version! Verify your schema installation.");
|
||||||
BOOST_THROW_EXCEPTION(std::runtime_error("Schema does not provide any valid version! Verify your schema installation."));
|
|
||||||
|
Application::Exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
String version = version_row->Get("version");
|
String version = version_row->Get("version");
|
||||||
|
@ -225,8 +226,7 @@ void IdoPgsqlConnection::Reconnect(void)
|
||||||
Log(LogCritical, "IdoPgsqlConnection", "Schema version '" + version + "' does not match the required version '" +
|
Log(LogCritical, "IdoPgsqlConnection", "Schema version '" + version + "' does not match the required version '" +
|
||||||
SCHEMA_VERSION + "'! Please check the upgrade documentation.");
|
SCHEMA_VERSION + "'! Please check the upgrade documentation.");
|
||||||
|
|
||||||
BOOST_THROW_EXCEPTION(std::runtime_error("Schema version '" + version + "' does not match the required version '" +
|
Application::Exit(EXIT_FAILURE);
|
||||||
SCHEMA_VERSION + "'!"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String instanceName = GetInstanceName();
|
String instanceName = GetInstanceName();
|
||||||
|
|
Loading…
Reference in New Issue