File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
ansible/files/admin_api_scripts/pg_upgrade_scripts Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ function complete_pg_upgrade {
4545 echo " 4. Running generated SQL files"
4646 retry 3 run_generated_sql
4747
48- echo " 4.1. Applying correct authentication scheme"
49- retry 3 use_corect_auth_scheme
48+ echo " 4.1. Applying authentication scheme updates "
49+ retry 3 apply_auth_scheme_updates
5050
5151 sleep 5
5252
@@ -73,12 +73,14 @@ function run_generated_sql {
7373 fi
7474}
7575
76- # Projects which had their passwords hashed using md5 need be
77- # configured to use md5 on upgraded instances as well, as opposed to scram-sha-256
78- function use_corect_auth_scheme {
76+ # Projects which had their passwords hashed using md5 need to have their passwords reset
77+ # Passwords for managed roles are already present in /etc/postgresql.schema.sql
78+ function apply_auth_scheme_updates {
7979 PASSWORD_ENCRYPTION_SETTING=$( run_sql -A -t -c " SHOW password_encryption;" )
8080 if [ " $PASSWORD_ENCRYPTION_SETTING " = " md5" ]; then
81- sed -i ' s/scram-sha-256/md5/g' /etc/postgresql/pg_hba.conf
81+ run_sql -c " ALTER SYSTEM SET password_encryption TO 'scram-sha-256';"
82+ run_sql -c " SELECT pg_reload_conf();"
83+ run_sql -f /etc/postgresql.schema.sql
8284 fi
8385}
8486
Original file line number Diff line number Diff line change 1- postgres-version = " 15.1.0.129 "
1+ postgres-version = " 15.1.0.130 "
You can’t perform that action at this time.
0 commit comments