puppet: Switch the `rolling_restart` setting to use the bool values.

2c5fc1827c standardized which values are "true"; use them.
This commit is contained in:
Alex Vandiver 2022-01-20 04:16:52 +00:00 committed by Tim Abbott
parent 530980cf31
commit f4683de742
4 changed files with 8 additions and 8 deletions

View File

@ -754,10 +754,10 @@ RabbitMQ.
#### `rolling_restart` #### `rolling_restart`
If set to a non-empty value, when using `./scripts/restart-server` to If set to true, when using `./scripts/restart-server` to restart
restart Zulip, restart the uwsgi processes one-at-a-time, instead of Zulip, restart the uwsgi processes one-at-a-time, instead of all at
all at once. This decreases the number of 502's served to clients, at once. This decreases the number of 502's served to clients, at the
the cost of slightly increased memory usage, and the possibility that cost of slightly increased memory usage, and the possibility that
different requests will be served by different versions of the code. different requests will be served by different versions of the code.
#### `s3_memory_cache_size` #### `s3_memory_cache_size`

View File

@ -152,7 +152,7 @@ class zulip::app_frontend_base {
notify => Service[$zulip::common::supervisor_service], notify => Service[$zulip::common::supervisor_service],
} }
$uwsgi_rolling_restart = zulipconf('application_server', 'rolling_restart', '') $uwsgi_rolling_restart = zulipconf('application_server', 'rolling_restart', false)
$uwsgi_listen_backlog_limit = zulipconf('application_server', 'uwsgi_listen_backlog_limit', 128) $uwsgi_listen_backlog_limit = zulipconf('application_server', 'uwsgi_listen_backlog_limit', 128)
$uwsgi_processes = zulipconf('application_server', 'uwsgi_processes', $uwsgi_default_processes) $uwsgi_processes = zulipconf('application_server', 'uwsgi_processes', $uwsgi_default_processes)
$somaxconn = 2 * Integer($uwsgi_listen_backlog_limit) $somaxconn = 2 * Integer($uwsgi_listen_backlog_limit)

View File

@ -53,7 +53,7 @@ post-buffering=4096
stats=/home/zulip/deployments/uwsgi-stats stats=/home/zulip/deployments/uwsgi-stats
<% if @uwsgi_rolling_restart != '' -%> <% if @uwsgi_rolling_restart -%>
# If we are doing a rolling restart, re-chdir to the current "current" # If we are doing a rolling restart, re-chdir to the current "current"
# directory in each forked process # directory in each forked process
hook-post-fork=chdir:/home/zulip/deployments/current hook-post-fork=chdir:/home/zulip/deployments/current

View File

@ -14,7 +14,7 @@ from scripts.lib.zulip_tools import (
ENDC, ENDC,
OKGREEN, OKGREEN,
WARNING, WARNING,
get_config, get_config_bool,
get_config_file, get_config_file,
get_tornado_ports, get_tornado_ports,
has_application_server, has_application_server,
@ -178,7 +178,7 @@ if has_application_server():
if ( if (
action == "restart" action == "restart"
and not args.less_graceful and not args.less_graceful
and get_config(config_file, "application_server", "rolling_restart") != "" and get_config_bool(config_file, "application_server", "rolling_restart")
and os.path.exists("/home/zulip/deployments/uwsgi-control") and os.path.exists("/home/zulip/deployments/uwsgi-control")
): ):
# See if it's currently running # See if it's currently running