From 1cab62674b7d3e24873d05b0a499e92277b5cf72 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 3 Oct 2024 10:03:52 -0700 Subject: [PATCH] koji / manual / staging sync: fixes from recent sync * The password was being set to the prod one * The allowed ip in the database was the phx2 one. ;( * The sequences were too low, prod already passed those, so increase them. Signed-off-by: Kevin Fenzi --- playbooks/manual/staging-sync/koji.yml | 3 +++ .../manual/staging-sync/templates/koji-reset-staging.sql | 6 +++--- roles/postgresql_server/files/pg_hba.conf | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/playbooks/manual/staging-sync/koji.yml b/playbooks/manual/staging-sync/koji.yml index 019c70542e..df0ba0228e 100644 --- a/playbooks/manual/staging-sync/koji.yml +++ b/playbooks/manual/staging-sync/koji.yml @@ -64,6 +64,9 @@ - db-sync-script - postgresql_user: name=koji password={{ kojiPassword }} + when: env != "staging" + - postgresql_user: name=koji password={{ kojiStgPassword }} + when: env == "staging" - postgresql_user: name=backup - postgresql_db: name=koji state=absent # buildroot_listing is excluded from the sync to save some time diff --git a/playbooks/manual/staging-sync/templates/koji-reset-staging.sql b/playbooks/manual/staging-sync/templates/koji-reset-staging.sql index 2ddaf99d34..7c4a19f505 100644 --- a/playbooks/manual/staging-sync/templates/koji-reset-staging.sql +++ b/playbooks/manual/staging-sync/templates/koji-reset-staging.sql @@ -31,9 +31,9 @@ delete from imageinfo_listing; -- bump sequences (not strictly needed anymore) select now() as time, 'bumping sequences' as msg; -alter sequence task_id_seq restart with 120000000; -alter sequence repo_id_seq restart with 9000000; -alter sequence imageinfo_id_seq restart with 900000; +alter sequence task_id_seq restart with 130000000; +alter sequence repo_id_seq restart with 130000000; +alter sequence imageinfo_id_seq restart with 13000000; -- truncate sessions select now() as time, 'truncating sessions' as msg; diff --git a/roles/postgresql_server/files/pg_hba.conf b/roles/postgresql_server/files/pg_hba.conf index 9370a609a3..e6e836d3e9 100644 --- a/roles/postgresql_server/files/pg_hba.conf +++ b/roles/postgresql_server/files/pg_hba.conf @@ -71,7 +71,7 @@ #host all all ::1/128 @authmethod@ local all all ident -host koji koji 10.5.128.166 255.255.255.255 md5 +host koji koji 10.3.167.64 255.255.255.255 md5 host all all 0.0.0.0 0.0.0.0 md5 host replication all 0.0.0.0 0.0.0.0 md5 # Note, I can't think of a reason to make this more restrictive than ipv4 but