2016-05-10 19:20:41 |
Tim Van Steenburgh |
description |
My charm received all postgres connection info (including seeing its unit in 'allowed-units') from a db-relation-changed hook. Upon attempting to connect to postgres, a pg_hba rejection error occurred. (I can see the error in the app logs on my charm unit). If I ssh to the postgres unit immediately after this, I can see that pg_hba.conf does not include any rows for my unit.
If I leave the deployment untouched, the pg_hba.conf will eventually be updated, and my charm will connect successfully.
The attached log file demonstrates this. The 'review-queue' is my charm. Line 4286 is where review-queue first receives all relation data it needs to connect. Line 4289 is where the review-queue service fails to start. Error from the review-queue app log:
FATAL: pg_hba.conf rejects connection for host "10.0.4.58", user "juju_review-queue", database "review-queue", SSL off
Fast-forward in the log to line 4398 and we see the pg_hba.conf being updated. Subsequently, on line 4425, the review-queue successfully starts.
In case it helps, my charm's handler is here: https://github.com/tvansteenburgh/review-queue-charm/blob/master/reactive/review_queue.py#L157
And the postgres interface I'm using is what you see here: https://github.com/bcsaller/juju-relation-pgsql/pull/3/files |
Using charm cs:~tribaal/trusty/postgresql-built-0
My charm received all postgres connection info (including seeing its unit in 'allowed-units') from a db-relation-changed hook. Upon attempting to connect to postgres, a pg_hba rejection error occurred. (I can see the error in the app logs on my charm unit). If I ssh to the postgres unit immediately after this, I can see that pg_hba.conf does not include any rows for my unit.
If I leave the deployment untouched, the pg_hba.conf will eventually be updated, and my charm will connect successfully.
The attached log file demonstrates this. The 'review-queue' is my charm. Line 4286 is where review-queue first receives all relation data it needs to connect. Line 4289 is where the review-queue service fails to start. Error from the review-queue app log:
FATAL: pg_hba.conf rejects connection for host "10.0.4.58", user "juju_review-queue", database "review-queue", SSL off
Fast-forward in the log to line 4398 and we see the pg_hba.conf being updated. Subsequently, on line 4425, the review-queue successfully starts.
In case it helps, my charm's handler is here: https://github.com/tvansteenburgh/review-queue-charm/blob/master/reactive/review_queue.py#L157
And the postgres interface I'm using is what you see here: https://github.com/bcsaller/juju-relation-pgsql/pull/3/files |
|