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 {
45
45
echo " 4. Running generated SQL files"
46
46
retry 3 run_generated_sql
47
47
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
50
50
51
51
sleep 5
52
52
@@ -73,12 +73,14 @@ function run_generated_sql {
73
73
fi
74
74
}
75
75
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 {
79
79
PASSWORD_ENCRYPTION_SETTING=$( run_sql -A -t -c " SHOW password_encryption;" )
80
80
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
82
84
fi
83
85
}
84
86
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