1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

F #4809: Enable federated of solo Zones

This commit is contained in:
Ruben S. Montero 2017-06-30 11:48:23 +02:00
parent 87b5e5cb5b
commit 215bc0dff7

View File

@ -90,7 +90,7 @@ LogDB::LogDB(SqlDB * _db, bool _solo, unsigned int _lret):solo(_solo), db(_db),
oss << time(0);
insert_log_record(0, 0, oss, time(0), false);
insert_log_record(0, 0, oss, time(0), -1);
}
setup_index(r, i);
@ -432,7 +432,14 @@ int LogDB::_exec_wr(ostringstream& cmd, int federated_index)
// -------------------------------------------------------------------------
if ( solo )
{
return db->exec_wr(cmd);
rc = db->exec_wr(cmd);
if ( rc == 0 && Nebula::instance().is_federation_enabled() )
{
insert_log_record(0, cmd, time(0), federated_index);
}
return rc;
}
else if ( raftm == 0 || !raftm->is_leader() )
{