service::storage_service: serialize the system_auth KS initialization

Move the system_auth KS initialization to be before Node moves to the NORMAL
state. This way we will serialize this code running on different Nodes and
avoid hitting issue #420.

Signed-off-by: Vlad Zolotarov <vladz@scylladb.com>
Message-Id: <1483552503-12873-2-git-send-email-vladz@scylladb.com>
This commit is contained in:
Vlad Zolotarov
2017-01-04 12:55:02 -05:00
committed by Tomasz Grabiec
parent 4667641f5f
commit d3b8b67e66

View File

@@ -468,6 +468,7 @@ void storage_service::join_token_ring(int delay) {
#endif
if (!_is_survey_mode) {
auth::auth::setup().get();
// start participating in the ring.
db::system_keyspace::set_bootstrap_state(db::system_keyspace::bootstrap_state::COMPLETED).get();
set_tokens(_bootstrap_tokens);
@@ -483,8 +484,6 @@ void storage_service::join_token_ring(int delay) {
logger.error(err.c_str());
throw std::runtime_error(err);
}
auth::auth::setup().get();
} else {
logger.info("Startup complete, but write survey mode is active, not becoming an active ring member. Use JMX (StorageService->joinRing()) to finalize ring joining.");
}