db-admin-relation-joined crash with gojuju

Bug #1178862 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postgresql (Juju Charms Collection)
Fix Released
Undecided
Andreas Hasenack

Bug Description

2013/05/10 23:13:11 INFO worker/uniter: HOOK Traceback (most recent call last):
2013/05/10 23:13:11 INFO worker/uniter: HOOK File "/var/lib/juju/agents/unit-postgresql-0/charm/hooks/db-admin-relation-joined", line 1885, in <module>
2013/05/10 23:13:11 INFO worker/uniter: HOOK raise SystemExit(main())
2013/05/10 23:13:11 INFO worker/uniter: HOOK File "/var/lib/juju/agents/unit-postgresql-0/charm/hooks/db-admin-relation-joined", line 1848, in main
2013/05/10 23:13:11 INFO worker/uniter: HOOK db_admin_relation_joined_changed(user, 'all')
2013/05/10 23:13:11 INFO worker/uniter: HOOK File "/var/lib/juju/agents/unit-postgresql-0/charm/hooks/db-admin-relation-joined", line 1206, in db_admin_relation_joined_changed
2013/05/10 23:13:11 INFO worker/uniter: HOOK generate_postgresql_hba(postgresql_hba)
2013/05/10 23:13:11 INFO worker/uniter: HOOK File "/var/lib/juju/agents/unit-postgresql-0/charm/hooks/db-admin-relation-joined", line 651, in generate_postgresql_hba
2013/05/10 23:13:11 INFO worker/uniter: HOOK for unit in relation_list(relid):
2013/05/10 23:13:11 INFO worker/uniter: HOOK TypeError: 'NoneType' object is not iterable
2013/05/10 23:13:11 ERROR worker/uniter: hook failed: exit status 1

I think pyjuju returned an empty string instead of the string "null". That breaks the relation_list() code so it doesn't return an empty list in that case, but the python value of None.

Branch attached, but only tested against gojuju.

Tags: landscape

Related branches

Changed in postgresql (Juju Charms Collection):
assignee: nobody → Andreas Hasenack (ahasenack)
status: New → In Progress
Marco Ceppi (marcoceppi)
Changed in postgresql (Juju Charms Collection):
status: In Progress → Fix Released
tags: added: landscape
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.