postgresql with multiple units, hook failures with postgresql-psql charm
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postgresql (Juju Charms Collection) |
Fix Released
|
High
|
Stuart Bishop |
Bug Description
Access is granted to the postgresql-psql charm, but the second unit in the postgresql charm has hook execution errors. Looks like the hot standby unit also tries to create the access in the database, which fails.
juju status output:
postgresql:
charm: local:precise/
exposed: false
relations:
db:
- psql
db-admin:
- psql
replication:
- postgresql
units:
postgresql/0:
machine: 37
postgresql/1:
machine: 38
db:
- psql
db-admin:
- psql
psql:
charm: cs:precise/
relations:
db:
- postgresql
db-admin:
- postgresql
units:
psql/0:
machine: 39
db:
charm log:
2013-06-21 08:54:11,631: unit.relation.
2013-06-21 08:54:12,001: unit.hook.api@INFO: Running db-relation-joined hook
2013-06-21 08:54:12,075: hook.output@INFO: Traceback (most recent call last):
2013-06-21 08:54:12,076: hook.output@INFO: File "/var/lib/
2013-06-21 08:54:12,076: hook.output@INFO:
2013-06-21 08:54:12,076: hook.output@INFO: raise SystemExit(main())
2013-06-21 08:54:12,077: hook.output@INFO: File "/var/lib/
2013-06-21 08:54:12,077: hook.output@INFO:
2013-06-21 08:54:12,077: hook.output@INFO: db_relation_
2013-06-21 08:54:12,078: hook.output@INFO: File "/var/lib/
2013-06-21 08:54:12,078: hook.output@INFO:
2013-06-21 08:54:12,079: hook.output@INFO: password = create_user(user)
2013-06-21 08:54:12,079: hook.output@INFO: File "/var/lib/
2013-06-21 08:54:12,079: hook.output@INFO:
2013-06-21 08:54:12,080: hook.output@INFO: run_sql_
2013-06-21 08:54:12,081: hook.output@INFO: File "/var/lib/
cur.
psycopg2.
2013-06-21 08:54:12,091: hook.output@DEBUG: hook db-relation-joined exited, exit code Traceback (most recent call last):
Failure: juju.errors.
.
2013-06-21 08:54:12,091: hook.executor@
2013-06-21 08:54:12,091: unit.relation.
2013-06-21 08:54:12,091: unit.relation.
2013-06-21 08:54:12,093: hook.executor@
2013-06-21 08:54:12,100: statemachine@DEBUG: relationworkflo
2013-06-21 08:54:12,100: statemachine@DEBUG: relationworkflo
2013-06-21 08:54:12,101: hook.scheduler@
2013-06-21 08:54:12,101: unit.relation.
2013-06-21 08:54:12,112: statemachine@DEBUG: relationworkflo
2013-06-21 08:54:12,113: hook.scheduler@
2013-06-21 08:54:12,113: hook.scheduler@
2013-06-21 08:54:12,491: unit.hook.api@INFO: Running db-admin-
2013-06-21 08:54:12,550: hook.output@INFO: Traceback (most recent call last):
2013-06-21 08:54:12,550: hook.output@INFO: File "/var/lib/
2013-06-21 08:54:12,551: hook.output@INFO:
2013-06-21 08:54:12,551: hook.output@INFO: raise SystemExit(main())
2013-06-21 08:54:12,551: hook.output@INFO: File "/var/lib/
2013-06-21 08:54:12,552: hook.output@INFO:
2013-06-21 08:54:12,552: hook.output@INFO: db_admin_
2013-06-21 08:54:12,552: hook.output@INFO: File "/var/lib/
2013-06-21 08:54:12,553: hook.output@INFO:
2013-06-21 08:54:12,553: hook.output@INFO: password = create_user(user, admin=True)
2013-06-21 08:54:12,554: hook.output@INFO: File "/var/lib/
2013-06-21 08:54:12,554: hook.output@INFO:
2013-06-21 08:54:12,554: hook.output@INFO: run_sql_
2013-06-21 08:54:12,556: hook.output@INFO: File "/var/lib/
cur.
psycopg2.
2013-06-21 08:54:12,566: hook.output@DEBUG: hook db-admin-
Failure: juju.errors.
.
2013-06-21 08:54:12,567: hook.executor@
Related branches
- Mark Mims (community): Approve
-
Diff: 1377 lines (+691/-378)3 files modifiedhooks/hooks.py (+518/-365)
metadata.yaml (+1/-6)
test.py (+172/-7)
Changed in postgresql (Juju Charms Collection): | |
status: | In Progress → Fix Released |
I'm reworking replication at the moment with a design that should work reliably rather than when hooks happen to be run in the right order.