From b114eb2f101e36982508c3d26ed0a49855bf06ef Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 11 Jun 2020 14:52:12 -0700 Subject: [PATCH] puppet: Rename env-wal-e to env-wal-g. It runs wal-g now, not wal-e; make its name respect that. --- puppet/zulip/files/postgresql/{env-wal-e => env-wal-g} | 0 puppet/zulip/files/postgresql/pg_backup_and_purge | 6 +++--- puppet/zulip/manifests/postgres_common.pp | 6 +++--- .../postgresql/10/postgresql.conf.centos.template.erb | 2 +- .../templates/postgresql/10/postgresql.conf.template.erb | 2 +- .../templates/postgresql/11/postgresql.conf.template.erb | 2 +- .../templates/postgresql/12/postgresql.conf.template.erb | 2 +- .../templates/postgresql/9.5/postgresql.conf.template.erb | 2 +- .../templates/postgresql/9.6/postgresql.conf.template.erb | 2 +- puppet/zulip_ops/files/postgresql/recovery.conf | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) rename puppet/zulip/files/postgresql/{env-wal-e => env-wal-g} (100%) diff --git a/puppet/zulip/files/postgresql/env-wal-e b/puppet/zulip/files/postgresql/env-wal-g similarity index 100% rename from puppet/zulip/files/postgresql/env-wal-e rename to puppet/zulip/files/postgresql/env-wal-g diff --git a/puppet/zulip/files/postgresql/pg_backup_and_purge b/puppet/zulip/files/postgresql/pg_backup_and_purge index 13844950f3..e4cd6d3d39 100755 --- a/puppet/zulip/files/postgresql/pg_backup_and_purge +++ b/puppet/zulip/files/postgresql/pg_backup_and_purge @@ -45,7 +45,7 @@ if len(pg_data_paths) != 1: print(f"Postgres installation is not unique: {pg_data_paths}") sys.exit(1) pg_data_path = pg_data_paths[0] -run(['env-wal-e', 'backup-push', pg_data_path]) +run(['env-wal-g', 'backup-push', pg_data_path]) now = datetime.now(tz=timezone.utc) with open('/var/lib/nagios_state/last_postgres_backup', 'w') as f: @@ -53,7 +53,7 @@ with open('/var/lib/nagios_state/last_postgres_backup', 'w') as f: f.write("\n") backups: Dict[datetime, str] = {} -lines = run(['env-wal-e', 'backup-list']).split("\n") +lines = run(['env-wal-g', 'backup-list']).split("\n") for line in lines[1:]: if line: backup_name, date_str, _, _ = line.split() @@ -62,7 +62,7 @@ for line in lines[1:]: one_month_ago = now - timedelta(days=30) for date in sorted(backups.keys(), reverse=True): if date < one_month_ago: - run(['env-wal-e', 'delete', '--confirm', 'before', backups[date]]) + run(['env-wal-g', 'delete', '--confirm', 'before', backups[date]]) # Because we're going from most recent to least recent, we # only have to do one delete operation break diff --git a/puppet/zulip/manifests/postgres_common.pp b/puppet/zulip/manifests/postgres_common.pp index de8c47f2d7..402520a301 100644 --- a/puppet/zulip/manifests/postgres_common.pp +++ b/puppet/zulip/manifests/postgres_common.pp @@ -80,12 +80,12 @@ class zulip::postgres_common { source => 'puppet:///modules/zulip/nagios_plugins/zulip_postgres_common', } - file { '/usr/local/bin/env-wal-e': + file { '/usr/local/bin/env-wal-g': ensure => file, owner => 'root', group => 'postgres', mode => '0750', - source => 'puppet:///modules/zulip/postgresql/env-wal-e', + source => 'puppet:///modules/zulip/postgresql/env-wal-g', require => Package[$postgresql], } @@ -95,7 +95,7 @@ class zulip::postgres_common { group => 'postgres', mode => '0754', source => 'puppet:///modules/zulip/postgresql/pg_backup_and_purge', - require => File['/usr/local/bin/env-wal-e'], + require => File['/usr/local/bin/env-wal-g'], } # Use arcane puppet virtual resources to add postgres user to zulip group diff --git a/puppet/zulip/templates/postgresql/10/postgresql.conf.centos.template.erb b/puppet/zulip/templates/postgresql/10/postgresql.conf.centos.template.erb index 00534588e0..c27c584bbf 100644 --- a/puppet/zulip/templates/postgresql/10/postgresql.conf.centos.template.erb +++ b/puppet/zulip/templates/postgresql/10/postgresql.conf.centos.template.erb @@ -698,7 +698,7 @@ listen_addresses = <%= @listen_addresses %> wal_level = hot_standby max_wal_senders = 5 archive_mode = on -archive_command = '/usr/local/bin/env-wal-e wal-push %p' +archive_command = '/usr/local/bin/env-wal-g wal-push %p' # Standby replication settings (ignored on master) hot_standby = on diff --git a/puppet/zulip/templates/postgresql/10/postgresql.conf.template.erb b/puppet/zulip/templates/postgresql/10/postgresql.conf.template.erb index 615aeb7185..c5d4c7b0a8 100644 --- a/puppet/zulip/templates/postgresql/10/postgresql.conf.template.erb +++ b/puppet/zulip/templates/postgresql/10/postgresql.conf.template.erb @@ -698,7 +698,7 @@ listen_addresses = <%= @listen_addresses %> wal_level = hot_standby max_wal_senders = 5 archive_mode = on -archive_command = '/usr/local/bin/env-wal-e wal-push %p' +archive_command = '/usr/local/bin/env-wal-g wal-push %p' # Standby replication settings (ignored on master) hot_standby = on diff --git a/puppet/zulip/templates/postgresql/11/postgresql.conf.template.erb b/puppet/zulip/templates/postgresql/11/postgresql.conf.template.erb index 615aeb7185..c5d4c7b0a8 100644 --- a/puppet/zulip/templates/postgresql/11/postgresql.conf.template.erb +++ b/puppet/zulip/templates/postgresql/11/postgresql.conf.template.erb @@ -698,7 +698,7 @@ listen_addresses = <%= @listen_addresses %> wal_level = hot_standby max_wal_senders = 5 archive_mode = on -archive_command = '/usr/local/bin/env-wal-e wal-push %p' +archive_command = '/usr/local/bin/env-wal-g wal-push %p' # Standby replication settings (ignored on master) hot_standby = on diff --git a/puppet/zulip/templates/postgresql/12/postgresql.conf.template.erb b/puppet/zulip/templates/postgresql/12/postgresql.conf.template.erb index e10a1213ed..d9e2ff2e2e 100644 --- a/puppet/zulip/templates/postgresql/12/postgresql.conf.template.erb +++ b/puppet/zulip/templates/postgresql/12/postgresql.conf.template.erb @@ -792,7 +792,7 @@ listen_addresses = <%= @listen_addresses %> wal_level = hot_standby max_wal_senders = 5 archive_mode = on -archive_command = '/usr/local/bin/env-wal-e wal-push %p' +archive_command = '/usr/local/bin/env-wal-g wal-push %p' # Standby replication settings (ignored on master) hot_standby = on diff --git a/puppet/zulip/templates/postgresql/9.5/postgresql.conf.template.erb b/puppet/zulip/templates/postgresql/9.5/postgresql.conf.template.erb index 5bfcbcfee9..a89ce9db3d 100644 --- a/puppet/zulip/templates/postgresql/9.5/postgresql.conf.template.erb +++ b/puppet/zulip/templates/postgresql/9.5/postgresql.conf.template.erb @@ -670,7 +670,7 @@ listen_addresses = <%= @listen_addresses %> wal_level = hot_standby max_wal_senders = 5 archive_mode = on -archive_command = '/usr/local/bin/env-wal-e wal-push %p' +archive_command = '/usr/local/bin/env-wal-g wal-push %p' # Standby replication settings (ignored on master) hot_standby = on diff --git a/puppet/zulip/templates/postgresql/9.6/postgresql.conf.template.erb b/puppet/zulip/templates/postgresql/9.6/postgresql.conf.template.erb index 318ecbcd53..20473051ce 100644 --- a/puppet/zulip/templates/postgresql/9.6/postgresql.conf.template.erb +++ b/puppet/zulip/templates/postgresql/9.6/postgresql.conf.template.erb @@ -683,7 +683,7 @@ listen_addresses = <%= @listen_addresses %> wal_level = hot_standby max_wal_senders = 5 archive_mode = on -archive_command = '/usr/local/bin/env-wal-e wal-push %p' +archive_command = '/usr/local/bin/env-wal-g wal-push %p' # Standby replication settings (ignored on master) hot_standby = on diff --git a/puppet/zulip_ops/files/postgresql/recovery.conf b/puppet/zulip_ops/files/postgresql/recovery.conf index f9f8b529fd..9bc6bf887e 100644 --- a/puppet/zulip_ops/files/postgresql/recovery.conf +++ b/puppet/zulip_ops/files/postgresql/recovery.conf @@ -1,3 +1,3 @@ standby_mode = on primary_conninfo = 'host=postgres3.zulipchat.net user=replicator' -restore_command = '/usr/local/bin/env-wal-e wal-fetch "%f" "%p"' +restore_command = '/usr/local/bin/env-wal-g wal-fetch "%f" "%p"'