'NoneType' object has no attribute 'uri'

Bug #1666337 reported by james beedy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pgsql Interface for charms.reactive
Fix Released
Critical
Unassigned

Bug Description

I seem to be hitting this every ~1/5 deploys.

2017-02-21 00:12:17 INFO db-relation-joined Traceback (most recent call last):
2017-02-21 00:12:17 INFO db-relation-joined File "/var/lib/juju/agents/unit-feed-web-5/charm/hooks/db-relation-joined", line 19, in <module>
2017-02-21 00:12:17 INFO db-relation-joined main()
2017-02-21 00:12:17 INFO db-relation-joined File "/usr/local/lib/python3.5/dist-packages/charms/reactive/__init__.py", line 78, in main
2017-02-21 00:12:17 INFO db-relation-joined bus.dispatch()
2017-02-21 00:12:17 INFO db-relation-joined File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 434, in dispatch
2017-02-21 00:12:17 INFO db-relation-joined _invoke(other_handlers)
2017-02-21 00:12:17 INFO db-relation-joined File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 417, in _invoke
2017-02-21 00:12:17 INFO db-relation-joined handler.invoke()
2017-02-21 00:12:17 INFO db-relation-joined File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 291, in invoke
2017-02-21 00:12:17 INFO db-relation-joined self._action(*args)
2017-02-21 00:12:17 INFO db-relation-joined File "/var/lib/juju/agents/unit-feed-web-5/charm/reactive/feed_base.py", line 172, in get_set_feeddb_data
2017-02-21 00:12:17 INFO db-relation-joined uri_vars = {'uri': pgsql.master.uri,
2017-02-21 00:12:17 INFO db-relation-joined AttributeError: 'NoneType' object has no attribute 'uri'
2017-02-21 00:12:17 ERROR juju.worker.uniter.operation runhook.go:107 hook "db-relation-joined" failed: exit status 1

james beedy (jamesbeedy)
description: updated
Revision history for this message
james beedy (jamesbeedy) wrote :

Seem to be hitting this for pgsql.master.host in ~(1/5) deploys too.

2017-02-21 02:06:41 INFO feeddb-relation-changed Traceback (most recent call last):
2017-02-21 02:06:41 INFO feeddb-relation-changed File "/var/lib/juju/agents/unit-copy1-0/charm/hooks/feeddb-relation-changed", line 19, in <module>
2017-02-21 02:06:41 INFO feeddb-relation-changed main()
2017-02-21 02:06:41 INFO feeddb-relation-changed File "/usr/local/lib/python3.5/dist-packages/charms/reactive/__init__.py", line 78, in main
2017-02-21 02:06:41 INFO feeddb-relation-changed bus.dispatch()
2017-02-21 02:06:41 INFO feeddb-relation-changed File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 434, in dispatch
2017-02-21 02:06:41 INFO feeddb-relation-changed _invoke(other_handlers)
2017-02-21 02:06:41 INFO feeddb-relation-changed File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 417, in _invoke
2017-02-21 02:06:41 INFO feeddb-relation-changed handler.invoke()
2017-02-21 02:06:41 INFO feeddb-relation-changed File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 291, in invoke
2017-02-21 02:06:41 INFO feeddb-relation-changed self._action(*args)
2017-02-21 02:06:41 INFO feeddb-relation-changed File "/var/lib/juju/agents/unit-copy1-0/charm/reactive/copy.py", line 151, in get_set_feed_db_data
2017-02-21 02:06:41 INFO feeddb-relation-changed **{'host': pgsql.master.host,
2017-02-21 02:06:41 INFO feeddb-relation-changed AttributeError: 'NoneType' object has no attribute 'host'
2017-02-21 02:06:41 ERROR juju.worker.uniter.operation runhook.go:107 hook "feeddb-relation-changed" failed: exit status 1

Revision history for this message
james beedy (jamesbeedy) wrote :

As can be seen here -> http://paste.ubuntu.com/24037759/, copy1 has the error above, while copy2 deployed successfully (copy2 didn't hit the error).

Revision history for this message
Stuart Bishop (stub) wrote :

The various set_*() methods need to remove the *.available states if the value has changed.

Changed in interface-pgsql:
status: New → Triaged
importance: Undecided → Critical
Stuart Bishop (stub)
Changed in interface-pgsql:
status: Triaged → Fix Released
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.