Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
upgrade-postgresql: Use tags to partially-apply configuration.
Alex Vandivere13f82f048d8
diff --git a/puppet/zulip/manifests/postgresql_base.pp b/puppet/zulip/manifests/postgresql_base.ppindex c30e3a6b4fe..59ca2a28e58 100644--- a/puppet/zulip/manifests/postgresql_base.pp+++ b/puppet/zulip/manifests/postgresql_base.pp@@ -47,12 +47,13 @@ class zulip::postgresql_base {ensure => link,require => Package[$postgresql],target => $postgresql_dict_dict,+ tag => ['postgresql_upgrade'],}file { "${tsearch_datadir}/en_us.affix":ensure => link,require => Package[$postgresql],target => $postgresql_dict_affix,-+ tag => ['postgresql_upgrade'],}file { "${tsearch_datadir}/zulip_english.stop":ensure => file,@@ -61,6 +62,7 @@ class zulip::postgresql_base {group => 'root',mode => '0644',source => 'puppet:///modules/zulip/postgresql/zulip_english.stop',+ tag => ['postgresql_upgrade'],}zulip::nagios_plugins { 'zulip_postgresql': }@@ -73,6 +75,7 @@ class zulip::postgresql_base {Package[$postgresql],Exec[$setup_system_deps]],+ tag => ['postgresql_upgrade'],}exec { 'pgroonga-config':require => Package["${postgresql}-pgdg-pgroonga"],diff --git a/puppet/zulip/manifests/postgresql_common.pp b/puppet/zulip/manifests/postgresql_common.ppindex 961cdfe0f01..6795c34183e 100644--- a/puppet/zulip/manifests/postgresql_common.pp+++ b/puppet/zulip/manifests/postgresql_common.pp@@ -61,6 +61,7 @@ class zulip::postgresql_common {zulip::safepackage { $postgresql_packages:ensure => installed,require => Exec['generate-default-snakeoil'],+ tag => ['postgresql_upgrade'],}if $facts['os']['family'] == 'Debian' {diff --git a/puppet/zulip/manifests/supervisor.pp b/puppet/zulip/manifests/supervisor.ppindex 47166f4a3d8..a7f1bcd4d73 100644--- a/puppet/zulip/manifests/supervisor.pp+++ b/puppet/zulip/manifests/supervisor.pp@@ -12,15 +12,12 @@ class zulip::supervisor {}$conf_dir = $zulip::common::supervisor_conf_dir- # lint:ignore:quoted_booleans- $should_purge = $facts['leave_supervisor'] != 'true'- # lint:endignorefile { $conf_dir:ensure => directory,require => Package['supervisor'],owner => 'root',group => 'root',- purge => $should_purge,+ purge => true,recurse => true,notify => Service[$supervisor_service],}diff --git a/scripts/setup/upgrade-postgresql b/scripts/setup/upgrade-postgresqlindex a441b967b6f..49fa6e0f15d 100755--- a/scripts/setup/upgrade-postgresql+++ b/scripts/setup/upgrade-postgresql@@ -75,7 +75,6 @@ ficp /etc/zulip/zulip.conf "$TEMP_CONF_DIR"ZULIP_CONF="${TEMP_CONF_DIR}/zulip.conf"crudini --set "$ZULIP_CONF" postgresql version "$UPGRADE_TO"- crudini --set "$ZULIP_CONF" machine puppet_classes zulip::profile::base,zulip::postgresql_baseif [ -f "/usr/share/postgresql/$UPGRADE_FROM/pgroonga_setup.sql.applied" ]; then# This file is intentionally blank, to trigger always running@@ -83,7 +82,7 @@ fitouch "/usr/share/postgresql/$UPGRADE_TO/pgroonga_setup.sql.applied"fi- FACTER_LEAVE_SUPERVISOR=true "$ZULIP_PATH"/scripts/zulip-puppet-apply -f --config "$ZULIP_CONF"+ "$ZULIP_PATH"/scripts/zulip-puppet-apply -f --config "$ZULIP_CONF" --tags postgresql_upgraderm -rf "$TEMP_CONF_DIR")