You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you include a password containing a '$' under databases.roles, the postgres job will report as running but the DB won't have a password set. In /var/vcap/sys/log/postgres/postgres_ctl.err.log I see:
[2017-08-18 20:46:02+0000] + echo 'Setting password for role cloud_controller...'
[2017-08-18 20:46:02+0000] /var/vcap/jobs/postgres/bin/postgres_start.sh: line 81: $6: unbound variable
My cloud_controller DB password does have a '...$6...' in the middle. Looks like this line is not doing any escaping so special characters get expanded. On CAPI we usually use Ruby's Shellwords.shellescape in our ERB templates around passwords.
Also a big +1 on this comment around failing the job if setting the roles fails:
@ljfranklin
Thanks for reporting this issue. We have opened a separate story to have the postgres job to fail when a query fails.
For the empty password issue, we have fixed it as suggested and you will find the fix in the next release.
If you include a password containing a '$' under
databases.roles
, the postgres job will report as running but the DB won't have a password set. In/var/vcap/sys/log/postgres/postgres_ctl.err.log
I see:My cloud_controller DB password does have a '...$6...' in the middle. Looks like this line is not doing any escaping so special characters get expanded. On CAPI we usually use Ruby's
Shellwords.shellescape
in our ERB templates around passwords.Also a big +1 on this comment around failing the job if setting the roles fails:
postgres-release/jobs/postgres/templates/postgres_ctl.erb
Lines 31 to 37 in 865224b
The text was updated successfully, but these errors were encountered: