1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-23 22:50:09 +03:00

F #3161: Fix segmentation fault when OpenNebula is bootstraping the DB in MASTER mode (#3162)

This commit is contained in:
Christian González 2019-04-02 11:13:50 +02:00 committed by Ruben S. Montero
parent 32bde0df44
commit f4ed44adf4

View File

@ -174,12 +174,12 @@ void Nebula::start(bool bootstrap_only)
zone_id = 0;
server_id = -1;
master_oned = vatt->vector_value("MASTER_ONED");
string mode = vatt->vector_value("MODE");
one_util::toupper(mode);
if (vatt != 0)
{
string mode = vatt->vector_value("MODE");
one_util::toupper(mode);
if (mode == "STANDALONE")
{
federation_enabled = false;
@ -339,6 +339,12 @@ void Nebula::start(bool bootstrap_only)
throw runtime_error("Database version mismatch. Check oned.log.");
}
if ((local_bootstrap || shared_bootstrap) && (mode != "STANDALONE"))
{
throw runtime_error("Database has to be bootstraped to start"
" oned in FEDERATION");
}
// ---------------------------------------------------------------------
// Initialize logging and federation database facilities and SystemDB
// ---------------------------------------------------------------------