From d3b8b67e662851185ff899f882adff6da5feb79a Mon Sep 17 00:00:00 2001 From: Vlad Zolotarov Date: Wed, 4 Jan 2017 12:55:02 -0500 Subject: [PATCH] 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 Message-Id: <1483552503-12873-2-git-send-email-vladz@scylladb.com> --- service/storage_service.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/service/storage_service.cc b/service/storage_service.cc index 1f5bb8a7a8..f54b5fccf2 100644 --- a/service/storage_service.cc +++ b/service/storage_service.cc @@ -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."); }