Staging instance, all changes can be removed at any time

Skip to content

Adapt postgresql connection information on the provenance server

This was missing hence why pgbouncer would not accept connection.

Related to T3487

Test Plan

octo-diff

$ bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to staging met
Found host met.internal.softwareheritage.org
WARN     -> Environment "share-opam-root" contained non-word characters, correcting name to share_opam_root
WARN     -> Environment "staging-add-prometheus-metrics" contained non-word characters, correcting name to staging_add_prometheus_metrics
WARN     -> Environment "staging-check-journal-client" contained non-word characters, correcting name to staging_check_journal_client
WARN     -> Environment "staging-check-journal-client-2nd-implementation" contained non-word characters, correcting name to staging_check_journal_client_2nd_implementation
WARN     -> Environment "staging-check-journal-client-first-implem" contained non-word characters, correcting name to staging_check_journal_client_first_implem
WARN     -> Environment "wip-pg-hba-rules-in-yaml" contained non-word characters, correcting name to wip_pg_hba_rules_in_yaml
Cloning into '/tmp/swh-ocd.4TmbI2hr/environments/production/data/private'...
done.
Cloning into '/tmp/swh-ocd.4TmbI2hr/environments/staging/data/private'...
done.
*** Running octocatalog-diff on host met.internal.softwareheritage.org
I, [2021-09-28T14:52:42.695440 #1453223]  INFO -- : Catalogs compiled for met.internal.softwareheritage.org
I, [2021-09-28T14:52:43.036572 #1453223]  INFO -- : Diffs computed for met.internal.softwareheritage.org
diff origin/production/met.internal.softwareheritage.org current/met.internal.softwareheritage.org
*******************************************
  Concat::Fragment[/tmp/pgbouncer-paramtmpfile_params] =>
   parameters =>
     content =>
      @@ -10,5 +10,5 @@
       unix_socket_dir = /var/run/postgresql
       auth_file = /etc/pgbouncer/userlist.txt
      -listen_addr = 127.0.0.1,127.0.1.1,
      +listen_addr = 127.0.0.1,127.0.1.1,192.168.100.210
       listen_port = 5432
       admin_users = postgres,olasd
      @@ -26,5 +26,5 @@
       client_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
       server_tls_sslmode = allow
      -auth_hba_file =_
      +auth_hba_file = /etc/postgresql/13/main/pg_hba.conf
       ignore_startup_parameters = extra_float_digits
       max_db_connections = 2000
*******************************************
+ Concat::Fragment[_postgres] =>
   parameters =>
      "order": "02"
      "target": "/etc/pgbouncer/pgbouncer.ini"
      "content": >>>
; Created from: pgbouncer_module_databases
swh-provenance = host=met.internal.softwareheritage.org port=5433 auth_user=postgres
<<<
*******************************************
  Concat_fragment[/tmp/pgbouncer-paramtmpfile_params] =>
   parameters =>
     content =>
      @@ -10,5 +10,5 @@
       unix_socket_dir = /var/run/postgresql
       auth_file = /etc/pgbouncer/userlist.txt
      -listen_addr = 127.0.0.1,127.0.1.1,
      +listen_addr = 127.0.0.1,127.0.1.1,192.168.100.210
       listen_port = 5432
       admin_users = postgres,olasd
      @@ -26,5 +26,5 @@
       client_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
       server_tls_sslmode = allow
      -auth_hba_file =_
      +auth_hba_file = /etc/postgresql/13/main/pg_hba.conf
       ignore_startup_parameters = extra_float_digits
       max_db_connections = 2000
*******************************************
+ Concat_fragment[_postgres] =>
   parameters =>
      "order": "02"
      "tag": "_etc_pgbouncer_pgbouncer.ini"
      "target": "/etc/pgbouncer/pgbouncer.ini"
      "content": >>>
; Created from: pgbouncer_module_databases
swh-provenance = host=met.internal.softwareheritage.org port=5433 auth_user=postgres
<<<
*******************************************
  Pgbouncer::Databases[pgbouncer_module_databases] =>
   parameters =>
     databases =>
      - [ ]
      + [{"source_db"=>"swh-provenance", "host"=>"met.internal.softwareheritage.org", "auth_user"=>"postgres", "port"=>"5433"}]
*******************************************
*** End octocatalog-diff on met.internal.softwareheritage.org

Migrated from D6365 (view on Phabricator)

Merge request reports

Loading