From 2c35d9b2f0597289e526c615c720431314b25f43 Mon Sep 17 00:00:00 2001 From: Daniel Schwarz Date: Tue, 22 Aug 2017 11:10:25 +0200 Subject: SONAR-9738 Fail if the cluster name differs from node to node --- sonar-application/src/main/java/org/sonar/application/App.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sonar-application/src') diff --git a/sonar-application/src/main/java/org/sonar/application/App.java b/sonar-application/src/main/java/org/sonar/application/App.java index 123467455ee..ad3710088ce 100644 --- a/sonar-application/src/main/java/org/sonar/application/App.java +++ b/sonar-application/src/main/java/org/sonar/application/App.java @@ -32,6 +32,7 @@ import org.sonar.application.process.StopRequestWatcherImpl; import org.sonar.process.SystemExit; import static org.sonar.application.config.SonarQubeVersionHelper.getSonarqubeVersion; +import static org.sonar.process.ProcessProperties.CLUSTER_NAME; public class App { @@ -48,6 +49,7 @@ public class App { try (AppState appState = new AppStateFactory(settings).create()) { appState.registerSonarQubeVersion(getSonarqubeVersion()); + appState.registerClusterName(settings.getProps().value(CLUSTER_NAME, "sonarqube")); AppReloader appReloader = new AppReloaderImpl(settingsLoader, fileSystem, appState, logging); fileSystem.reset(); CommandFactory commandFactory = new CommandFactoryImpl(settings.getProps(), fileSystem.getTempDir()); -- cgit v1.2.3