mirror of https://github.com/Icinga/icinga2.git
IDO: Do not terminate Icinga 2 if the database schema version does not match
Instead, log an error and continue. fixes #4440
This commit is contained in:
parent
39ca1b8460
commit
900b33dc5d
|
@ -288,7 +288,7 @@ void IdoMysqlConnection::Reconnect(void)
|
|||
|
||||
Log(LogCritical, "IdoMysqlConnection", "Schema does not provide any valid version! Verify your schema installation.");
|
||||
|
||||
Application::Exit(EXIT_FAILURE);
|
||||
BOOST_THROW_EXCEPTION(std::runtime_error("Invalid schema."));
|
||||
}
|
||||
|
||||
DiscardRows(result);
|
||||
|
@ -305,7 +305,7 @@ void IdoMysqlConnection::Reconnect(void)
|
|||
<< "Schema version '" << version << "' does not match the required version '"
|
||||
<< IDO_COMPAT_SCHEMA_VERSION << "' (or newer)! Please check the upgrade documentation.";
|
||||
|
||||
Application::Exit(EXIT_FAILURE);
|
||||
BOOST_THROW_EXCEPTION(std::runtime_error("Schema version mismatch."));
|
||||
}
|
||||
|
||||
String instanceName = GetInstanceName();
|
||||
|
|
|
@ -251,7 +251,7 @@ void IdoPgsqlConnection::Reconnect(void)
|
|||
|
||||
Log(LogCritical, "IdoPgsqlConnection", "Schema does not provide any valid version! Verify your schema installation.");
|
||||
|
||||
Application::Exit(EXIT_FAILURE);
|
||||
BOOST_THROW_EXCEPTION(std::runtime_error("Invalid schema."));
|
||||
}
|
||||
|
||||
String version = row->Get("version");
|
||||
|
@ -266,7 +266,7 @@ void IdoPgsqlConnection::Reconnect(void)
|
|||
<< "Schema version '" << version << "' does not match the required version '"
|
||||
<< IDO_COMPAT_SCHEMA_VERSION << "' (or newer)! Please check the upgrade documentation.";
|
||||
|
||||
Application::Exit(EXIT_FAILURE);
|
||||
BOOST_THROW_EXCEPTION(std::runtime_error("Schema version mismatch."));
|
||||
}
|
||||
|
||||
String instanceName = GetInstanceName();
|
||||
|
|
Loading…
Reference in New Issue