mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
puppet: ‘supervisorctl stop all’ before restarting Supervisor.
This fixes a failure of the 3.4 upgrade test running on Ubuntu 20.04 with Supervisor 4. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Alex Vandiver
parent
1292338537
commit
a7e6cb7705
@@ -8,11 +8,19 @@ class zulip::common {
|
|||||||
$supervisor_system_conf_dir = '/etc/supervisor/conf.d'
|
$supervisor_system_conf_dir = '/etc/supervisor/conf.d'
|
||||||
$supervisor_conf_file = '/etc/supervisor/supervisord.conf'
|
$supervisor_conf_file = '/etc/supervisor/supervisord.conf'
|
||||||
$supervisor_service = 'supervisor'
|
$supervisor_service = 'supervisor'
|
||||||
$supervisor_start = '/etc/init.d/supervisor start'
|
$supervisor_start = '/usr/sbin/service supervisor start'
|
||||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877086
|
$supervisor_reload = @(EOT)
|
||||||
# "restart" is actually "stop" under sysvinit
|
# The init script's timeout waiting for supervisor is shorter
|
||||||
$supervisor_reload = '/etc/init.d/supervisor restart && (/etc/init.d/supervisor start || /bin/true) && /etc/init.d/supervisor status'
|
# than supervisor's timeout waiting for its programs, so we need
|
||||||
$supervisor_status = '/etc/init.d/supervisor status'
|
# to ask supervisor to stop its programs first.
|
||||||
|
supervisorctl stop all &&
|
||||||
|
service supervisor restart &&
|
||||||
|
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877086
|
||||||
|
# "restart" is actually "stop" under sysvinit
|
||||||
|
{ service supervisor start || true; } &&
|
||||||
|
service supervisor status
|
||||||
|
| EOT
|
||||||
|
$supervisor_status = '/usr/sbin/service supervisor status'
|
||||||
}
|
}
|
||||||
'RedHat': {
|
'RedHat': {
|
||||||
$nagios_plugins = 'nagios-plugins'
|
$nagios_plugins = 'nagios-plugins'
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ class zulip::supervisor {
|
|||||||
}
|
}
|
||||||
exec { 'supervisor-restart':
|
exec { 'supervisor-restart':
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
|
provider => shell,
|
||||||
command => $zulip::common::supervisor_reload,
|
command => $zulip::common::supervisor_reload,
|
||||||
require => Service[$supervisor_service],
|
require => Service[$supervisor_service],
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user