I'm working on the test-catalog charm to support postgresql in preparation for the move of the OIL infrastructure to prodstack and the test-catalog relation with postgresql is triggering a race condition.
Using juju from my laptop to canonistack, I can't reproduce this error all the time, most of the time the db-relation hooks work as intended. Using juju from bastion (a machine inside the DC) and deploying against serverstack, I can reliably reproduce the error.
If I add the following patch: http://pastebin.ubuntu.com/6831342/ to test-catalog, then most of the time I can get the db-relation hooks to just work as intended (i.e. the test-catalog-database script correctly initializes the db in PG).
Any ideas on how to debug this further? Is the test-catalog changes in the MP just plain wrong? In theory (and based on the doc for the postgresql charm) allowed-units is the right way to verify the database is ready for access from related units.
I'm working on the test-catalog charm to support postgresql in preparation for the move of the OIL infrastructure to prodstack and the test-catalog relation with postgresql is triggering a race condition.
The charms used are: lp:charms/postgresql (revno 82) and lp:~matsubara/charms/precise/test-catalog/swap-to-postgresql and the merge proposal is here: https:/ /code.launchpad .net/~matsubara /charms/ precise/ test-catalog/ swap-to- postgresql/ +merge/ 203307
Steps to reproduce:
juju deploy --repository . local:test-catalog
juju deploy --repository . local:postgresql
juju add-relation test-catalog:db postgresql:db
At this point test-catalog's db-relation-changed fails with the following error: http:// pastebin. ubuntu. com/6831296/
Using juju from my laptop to canonistack, I can't reproduce this error all the time, most of the time the db-relation hooks work as intended. Using juju from bastion (a machine inside the DC) and deploying against serverstack, I can reliably reproduce the error.
If I add the following patch: http:// pastebin. ubuntu. com/6831342/ to test-catalog, then most of the time I can get the db-relation hooks to just work as intended (i.e. the test-catalog- database script correctly initializes the db in PG).
Any ideas on how to debug this further? Is the test-catalog changes in the MP just plain wrong? In theory (and based on the doc for the postgresql charm) allowed-units is the right way to verify the database is ready for access from related units.