puppet: Rename env-wal-e to env-wal-g.

It runs wal-g now, not wal-e; make its name respect that.
This commit is contained in:
Alex Vandiver 2020-06-11 14:52:12 -07:00 committed by Alex Vandiver
parent 4fe0444108
commit b114eb2f10
10 changed files with 13 additions and 13 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"'