Skip to content

Commit

Permalink
F #3161: Fix segmentation fault when OpenNebula is bootstraping the D…
Browse files Browse the repository at this point in the history
…B in MASTER mode (#3162)

(cherry picked from commit f4ed44a)
  • Loading branch information
Christian González authored and rsmontero committed Apr 2, 2019
1 parent eb3d4ed commit 790bf93
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/nebula/Nebula.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
// ---------------------------------------------------------------------
Expand Down

0 comments on commit 790bf93

Please sign in to comment.