Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
puppet: Add an exec rule to reload the whole supervisor config.
Alex Vandiver64b44a12f520
diff --git a/puppet/zulip/files/supervisor/supervisord.conf b/puppet/zulip/files/supervisor/supervisord.confindex c09736583cb..b010b718a84 100644--- a/puppet/zulip/files/supervisor/supervisord.conf+++ b/puppet/zulip/files/supervisor/supervisord.conf@@ -3,7 +3,7 @@[unix_http_server]file=/var/run/supervisor.sock ; (the path to the socket file)chmod=0700 ; socket file mode (default 0700)-chown=zulip+chown=zulip:zulip[supervisord]logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)diff --git a/puppet/zulip/manifests/common.pp b/puppet/zulip/manifests/common.ppindex c46e5d593f0..e5516dbc443 100644--- a/puppet/zulip/manifests/common.pp+++ b/puppet/zulip/manifests/common.pp@@ -9,6 +9,7 @@ class zulip::common {$supervisor_conf_file = '/etc/supervisor/supervisord.conf'$supervisor_service = 'supervisor'$supervisor_start = '/etc/init.d/supervisor start'+ $supervisor_reload = '/etc/init.d/supervisor restart'}'redhat': {$nagios_plugins = 'nagios-plugins'@@ -18,6 +19,7 @@ class zulip::common {$supervisor_conf_file = '/etc/supervisord.conf'$supervisor_service = 'supervisord'$supervisor_start = 'systemctl start supervisord'+ $supervisor_reload = 'systemctl reload supervisord'}default: {fail('osfamily not supported')diff --git a/puppet/zulip/manifests/supervisor.pp b/puppet/zulip/manifests/supervisor.ppindex ba1795f1894..5fdf2c41074 100644--- a/puppet/zulip/manifests/supervisor.pp+++ b/puppet/zulip/manifests/supervisor.pp@@ -29,6 +29,10 @@ class zulip::supervisor {hasrestart => true,restart => '/bin/true'}+ exec { 'supervisor-restart':+ refreshonly => true,+ command => '/bin/true',+ }} else {service { $supervisor_service:ensure => running,@@ -49,6 +53,9 @@ class zulip::supervisor {# your config file parses without doing anything, but it's# really confusing).#+ # If restarting supervisor itself is necessary, see+ # Exec['supervisor-restart']+ ## Also, to handle the case that supervisord wasn't running at# all, we check if it is not running and if so, start it.#@@ -59,6 +66,10 @@ class zulip::supervisor {restart => "bash -c 'if pgrep -f supervisor[d] >/dev/null; then supervisorctl reread && supervisorctl update; else ${zulip::common::supervisor_start}; fi'"# lint:endignore}+ exec { 'supervisor-restart':+ refreshonly => true,+ command => $zulip::common::supervisor_reload,+ }}file { $zulip::common::supervisor_conf_file:@@ -68,6 +79,6 @@ class zulip::supervisor {group => 'root',mode => '0644',source => 'puppet:///modules/zulip/supervisor/supervisord.conf',- notify => Service[$supervisor_service],+ notify => Exec['supervisor-restart'],}}diff --git a/scripts/lib/install b/scripts/lib/installindex 6e65a53466c..b5bb904404f 100755--- a/scripts/lib/install+++ b/scripts/lib/install@@ -489,10 +489,6 @@ if [ "$has_appserver" = 0 ]; thenfifi-if [ -e "/var/run/supervisor.sock" ]; then- chown zulip:zulip /var/run/supervisor.sock-fi-if [ -n "$NO_INIT_DB" ]; thenset +xcat <<EOF