diff --git a/postgres-appliance/bootstrap/maybe_pg_upgrade.py b/postgres-appliance/bootstrap/maybe_pg_upgrade.py index 73871bf0..86086e8e 100644 --- a/postgres-appliance/bootstrap/maybe_pg_upgrade.py +++ b/postgres-appliance/bootstrap/maybe_pg_upgrade.py @@ -11,7 +11,7 @@ def tail_postgres_log(weekday): logdir = os.environ.get('PGLOG', '/home/postgres/pgdata/pgroot/pg_log') logfile = os.path.join(logdir, 'postgresql-{0}.csv'.format(weekday)) - if os.getenv('LOG_SHIP_HOURLY'): + if os.getenv('LOG_SHIP_HOURLY') == 'true': logfile = os.path.join(logdir, 'postgresql-{0}-{1}.csv'.format(weekday, datetime.datetime.today().hour)) return subprocess.check_output(['tail', '-n5', logfile]).decode('utf-8') diff --git a/postgres-appliance/scripts/configure_spilo.py b/postgres-appliance/scripts/configure_spilo.py index 5eec38be..c7ff4a28 100755 --- a/postgres-appliance/scripts/configure_spilo.py +++ b/postgres-appliance/scripts/configure_spilo.py @@ -590,7 +590,7 @@ def get_placeholders(provider): placeholders.setdefault('CLONE_TARGET_INCLUSIVE', True) placeholders.setdefault('LOG_GROUP_BY_DATE', False) - placeholders.setdefault('LOG_SHIP_HOURLY', False) + placeholders.setdefault('LOG_SHIP_HOURLY', 'false') placeholders.setdefault('LOG_SHIP_SCHEDULE', '1 0 * * *') placeholders.setdefault('LOG_S3_BUCKET', '') placeholders.setdefault('LOG_S3_ENDPOINT', '') @@ -775,7 +775,7 @@ def write_log_environment(placeholders): log_schedule = os.getenv('LOG_SHIP_SCHEDULE') if '/' in log_schedule.split()[1]: - log_env['LOG_SHIP_HOURLY'] = True + log_env['LOG_SHIP_HOURLY'] = 'true' log_s3_key += placeholders['instance_data']['id'] log_env['LOG_S3_KEY'] = log_s3_key