diff options
6 files changed, 21 insertions, 7 deletions
diff --git a/server/sonar-web/src/main/js/components/common/RestartButton.tsx b/server/sonar-web/src/main/js/components/common/RestartButton.tsx index c6eb8bd0f24..feae00d4318 100644 --- a/server/sonar-web/src/main/js/components/common/RestartButton.tsx +++ b/server/sonar-web/src/main/js/components/common/RestartButton.tsx @@ -32,9 +32,7 @@ interface Props { } export default class RestartButton extends React.PureComponent<Props> { - handleConfirm = () => { - return restart().then(this.props.fetchSystemStatus); - }; + handleConfirm = () => restart().then(this.props.fetchSystemStatus); render() { const { className, systemStatus } = this.props; @@ -46,7 +44,8 @@ export default class RestartButton extends React.PureComponent<Props> { <p className="spacer-top spacer-bottom"> {translate('system.are_you_sure_to_restart')} </p> - <p>{translate('system.forcing_shutdown_not_recommended')}</p> + <p className="spacer-bottom">{translate('system.forcing_shutdown_not_recommended')}</p> + <p>{translate('system.restart_does_not_reload_sonar_properties')}</p> </> } modalHeader={translate('system.restart_server')} diff --git a/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/RestartButton-test.tsx.snap b/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/RestartButton-test.tsx.snap index 90940e63cbb..4d612a7bcff 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/RestartButton-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/RestartButton-test.tsx.snap @@ -10,9 +10,14 @@ exports[`should render correctly 1`] = ` > system.are_you_sure_to_restart </p> - <p> + <p + className="spacer-bottom" + > system.forcing_shutdown_not_recommended </p> + <p> + system.restart_does_not_reload_sonar_properties + </p> </React.Fragment> } modalHeader="system.restart_server" diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/platform/ws/RestartAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/platform/ws/RestartAction.java index 99a188ea297..de87d55c6c3 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/platform/ws/RestartAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/platform/ws/RestartAction.java @@ -52,7 +52,8 @@ public class RestartAction implements SystemWsAction { @Override public void define(WebService.NewController controller) { controller.createAction("restart") - .setDescription("Restart server. Require 'Administer System' permission. Perform a full restart of the Web, Search and Compute Engine Servers processes.") + .setDescription("Restarts server. Requires 'Administer System' permission. Performs a full restart of the Web, Search and Compute Engine Servers processes." + + " Does not reload sonar.properties.") .setSince("4.3") .setPost(true) .setHandler(this); diff --git a/sonar-application/src/main/assembly/conf/sonar.properties b/sonar-application/src/main/assembly/conf/sonar.properties index c1e24de49cd..31f9fe7d4aa 100644 --- a/sonar-application/src/main/assembly/conf/sonar.properties +++ b/sonar-application/src/main/assembly/conf/sonar.properties @@ -1,3 +1,11 @@ +#-------------------------------------------------------------------------------------------------- +# IMPORTANT: +# This file will *not* be reloaded upon hitting the "Restart" button in the UI, or using the +# api/system/restart endpoint. +# In order for any change made to this file to be taken into account, you must perform a full +# restart of the main SonarQube service. +#-------------------------------------------------------------------------------------------------- + # Property values can: # - be overridden by environment variables. The name of the corresponding environment variable is the # upper-cased name of the property where all the dot ('.') and dash ('-') characters are replaced by diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index 2a51b3d2d5b..7625bd7b15e 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -3194,6 +3194,7 @@ system.log_level.warning.short=Current logs level has performance impacts, get b system.log_level.info=Your selection does not affect the Search Engine. system.logs_level=Logs level system.new_version_available=A new version of SonarQube is available. +system.restart_does_not_reload_sonar_properties=Also note that a restart will not reload the sonar.properties file. system.see_whats_new=See what's new! system.release_notes=Release Notes system.released_x=Released {0} diff --git a/sonar-ws-generator/src/main/resources/snapshot-of-api.json b/sonar-ws-generator/src/main/resources/snapshot-of-api.json index 72630f2deee..47f92478d4f 100644 --- a/sonar-ws-generator/src/main/resources/snapshot-of-api.json +++ b/sonar-ws-generator/src/main/resources/snapshot-of-api.json @@ -8961,7 +8961,7 @@ }, { "key": "restart", - "description": "Restart server. Require 'Administer System' permission. Perform a full restart of the Web, Search and Compute Engine Servers processes.", + "description": "Restarts server. Requires 'Administer System' permission. Performs a full restart of the Web, Search and Compute Engine Servers processes. Does not reload sonar.properties.", "since": "4.3", "internal": false, "post": true, |