adding a unit of a related service to postgresql is racy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postgresql (Juju Charms Collection) |
Fix Released
|
Undecided
|
David Britton |
Bug Description
If you have a db-admin related service to postgresql and you try and add unit, you typically look for "host" to be set in the relation data before you proceed with contacting postgresql to set things up. This works fine for the first unit, but breaks down on subsequent add-unit calls.
The problem is on each add-unit call relation data is already supplied (from the previous relation attempt), but the postgresql charm actually needs to add the joining unit into the pg_hba.conf file and restart the service to allow the unit to connect. Otherwise you end up with the following in the pgsql log files:
2013-05-29 19:39:41 UTC FATAL: no pg_hba.conf entry for host "10.154.134.171", user "db_admin_
2013-05-29 19:39:41 UTC DETAIL: Client IP address resolved to "ip-10-
There needs to be an updated list of clients that are allowed to connect to a postgresql service published in the relation data so each joining service unit knows when it's OK to contact the database.
Related branches
- Mark Mims (community): Needs Resubmitting
- Stuart Bishop (community): Approve
-
Diff: 72 lines (+18/-1)2 files modifiedREADME.markdown (+4/-0)
hooks/hooks.py (+14/-1)
Changed in postgresql (Juju Charms Collection): | |
assignee: | nobody → David Britton (davidpbritton) |
Changed in postgresql (Juju Charms Collection): | |
status: | New → In Progress |
Changed in postgresql (Juju Charms Collection): | |
status: | In Progress → Fix Released |