diff --git a/src/acl/AclManager.cc b/src/acl/AclManager.cc index 4e535bd83a..949527ec69 100644 --- a/src/acl/AclManager.cc +++ b/src/acl/AclManager.cc @@ -69,7 +69,15 @@ AclManager::AclManager( unset_callback(); - if (!is_federation_slave && lastOID == -1) + am.addListener(this); + + //Federation slaves do not need to init the pool + if (is_federation_slave) + { + return; + } + + if (lastOID == -1) { // Add a default rules for the ACL engine string error_str; @@ -103,10 +111,7 @@ AclManager::AclManager( AuthRequest::CREATE, AclRule::ALL_ID, error_str); - } - - am.addListener(this); } /* -------------------------------------------------------------------------- */ diff --git a/src/group/GroupPool.cc b/src/group/GroupPool.cc index de8db53e7d..2340fe0433 100644 --- a/src/group/GroupPool.cc +++ b/src/group/GroupPool.cc @@ -46,8 +46,14 @@ GroupPool::GroupPool(SqlDB * db, ostringstream oss; string error_str; + //Federation slaves do not need to init the pool + if (is_federation_slave) + { + return; + } + //lastOID is set in PoolSQL::init_cb - if (!is_federation_slave && get_lastOID() == -1) + if (get_lastOID() == -1) { int rc; Group * group; diff --git a/src/um/UserPool.cc b/src/um/UserPool.cc index be32100078..eaf1021b0d 100644 --- a/src/um/UserPool.cc +++ b/src/um/UserPool.cc @@ -80,6 +80,12 @@ UserPool::UserPool(SqlDB * db, _session_expiration_time = __session_expiration_time; + //Federation slaves do not need to init the pool + if (is_federation_slave) + { + return; + } + User * oneadmin_user = get(0, true); if (oneadmin_user != 0) @@ -92,11 +98,6 @@ UserPool::UserPool(SqlDB * db, return; } - if (is_federation_slave) - { - goto error_federation; - } - // User oneadmin needs to be added in the bootstrap one_auth = getenv("ONE_AUTH"); @@ -206,10 +207,6 @@ UserPool::UserPool(SqlDB * db, return; -error_federation: - oss << "Error reading the oneadmin user from the replicated table: " << error_str; - goto error_common; - error_no_file: oss << "Could not get one_auth file location"; goto error_common; diff --git a/src/zone/ZonePool.cc b/src/zone/ZonePool.cc index d972f1f254..d9aa6f504d 100644 --- a/src/zone/ZonePool.cc +++ b/src/zone/ZonePool.cc @@ -29,8 +29,14 @@ ZonePool::ZonePool(SqlDB * db, bool is_federation_slave) { string error_str; + //Federation slaves do not need to init the pool + if (is_federation_slave) + { + return; + } + //lastOID is set in PoolSQL::init_cb - if (!is_federation_slave && get_lastOID() == -1) + if (get_lastOID() == -1) { int rc; Template * tmpl;