juju-solutions / layer-logstash

Other
2 stars 5 forks source link

TypeError: __init__() got an unexpected keyword argument 'namespace' #18

Closed panlinux closed 6 years ago

panlinux commented 8 years ago

I related logstash:elasticsearch with elasticsearch:client in an ELK deploy with beats and got this traceback in the logstash/0 unit ("ANDREAS" is my added juju log just before the problematic return(**conversation)):

2016-09-20 16:18:44 INFO juju-log elasticsearch:12: ANDREAS: conversation={'scope': 'elasticsearch/0', 'units': ['elasticsearch/0'], 'namespace': 'elasticsearch:12'} 2016-09-20 16:18:44 INFO elasticsearch-relation-changed Traceback (most recent call last): 2016-09-20 16:18:44 INFO elasticsearch-relation-changed File "/var/lib/juju/agents/unit-logstash-0/charm/hooks/elasticsearch-relation-changed", line 19, in 2016-09-20 16:18:44 INFO elasticsearch-relation-changed main() 2016-09-20 16:18:44 INFO elasticsearch-relation-changed File "/usr/local/lib/python3.4/dist-packages/charms/reactive/init.py", line 69, in main 2016-09-20 16:18:44 INFO elasticsearch-relation-changed bus.dispatch() 2016-09-20 16:18:44 INFO elasticsearch-relation-changed File "/usr/local/lib/python3.4/dist-packages/charms/reactive/bus.py", line 418, in dispatch 2016-09-20 16:18:44 INFO elasticsearch-relation-changed _invoke(other_handlers) 2016-09-20 16:18:44 INFO elasticsearch-relation-changed File "/usr/local/lib/python3.4/dist-packages/charms/reactive/bus.py", line 401, in _invoke 2016-09-20 16:18:44 INFO elasticsearch-relation-changed handler.invoke() 2016-09-20 16:18:44 INFO elasticsearch-relation-changed File "/usr/local/lib/python3.4/dist-packages/charms/reactive/bus.py", line 276, in invoke 2016-09-20 16:18:44 INFO elasticsearch-relation-changed args = self._get_args() 2016-09-20 16:18:44 INFO elasticsearch-relation-changed File "/usr/local/lib/python3.4/dist-packages/charms/reactive/bus.py", line 270, in _get_args 2016-09-20 16:18:44 INFO elasticsearch-relation-changed return list(chain.from_iterable(self._args)) 2016-09-20 16:18:44 INFO elasticsearch-relation-changed File "/usr/local/lib/python3.4/dist-packages/charms/reactive/relations.py", line 172, in from_state 2016-09-20 16:18:44 INFO elasticsearch-relation-changed conversations = Conversation.load(value['conversations']) 2016-09-20 16:18:44 INFO elasticsearch-relation-changed File "/usr/local/lib/python3.4/dist-packages/charms/reactive/relations.py", line 472, in load 2016-09-20 16:18:44 INFO elasticsearch-relation-changed conversations.append(cls.deserialize(conversation)) 2016-09-20 16:18:44 INFO elasticsearch-relation-changed File "/usr/local/lib/python3.4/dist-packages/charms/reactive/relations.py", line 450, in deserialize 2016-09-20 16:18:44 INFO elasticsearch-relation-changed return cls(**conversation) 2016-09-20 16:18:44 INFO elasticsearch-relation-changed TypeError: init() got an unexpected keyword argument 'namespace'

panlinux commented 8 years ago

Charm versions used:

APP VERSION STATUS SCALE CHARM STORE REV OS NOTES elasticsearch unknown 1 elasticsearch jujucharms 15 ubuntu logstash error 1 logstash jujucharms 0 ubuntu

Juju 2.0beta18

panlinux commented 8 years ago

I then did a simpler deployment, with just these two services and zulu, and got a different error when establishing the relation:

unit-logstash-0: 13:39:37 INFO unit.logstash/0.juju-log elasticsearch:3: Invoking reactive handler: reactive/logstash.py:39:configure_logstash unit-logstash-0: 13:39:37 INFO unit.logstash/0.elasticsearch-relation-changed Traceback (most recent call last): unit-logstash-0: 13:39:37 INFO unit.logstash/0.elasticsearch-relation-changed File "/var/lib/juju/agents/unit-logstash-0/charm/hooks/elasticsearch-relation-changed", line 19, in unit-logstash-0: 13:39:37 INFO unit.logstash/0.elasticsearch-relation-changed main() unit-logstash-0: 13:39:37 INFO unit.logstash/0.elasticsearch-relation-changed File "/usr/local/lib/python3.4/dist-packages/charms/reactive/init.py", line 69, in main unit-logstash-0: 13:39:37 INFO unit.logstash/0.elasticsearch-relation-changed bus.dispatch() unit-logstash-0: 13:39:37 INFO unit.logstash/0.elasticsearch-relation-changed File "/usr/local/lib/python3.4/dist-packages/charms/reactive/bus.py", line 418, in dispatch unit-logstash-0: 13:39:37 INFO unit.logstash/0.elasticsearch-relation-changed _invoke(other_handlers) unit-logstash-0: 13:39:37 INFO unit.logstash/0.elasticsearch-relation-changed File "/usr/local/lib/python3.4/dist-packages/charms/reactive/bus.py", line 401, in _invoke unit-logstash-0: 13:39:37 INFO unit.logstash/0.elasticsearch-relation-changed handler.invoke() unit-logstash-0: 13:39:37 INFO unit.logstash/0.elasticsearch-relation-changed File "/usr/local/lib/python3.4/dist-packages/charms/reactive/bus.py", line 277, in invoke unit-logstash-0: 13:39:37 INFO unit.logstash/0.elasticsearch-relation-changed self._action(*args) unit-logstash-0: 13:39:37 INFO unit.logstash/0.elasticsearch-relation-changed TypeError: configure_logstash() missing 1 required positional argument: 'elasticsearch' unit-logstash-0: 13:39:37 ERROR juju.worker.uniter.operation hook "elasticsearch-relation-changed" failed: exit status 1

kwmonroe commented 6 years ago

I realize this issue is super old, but the logstash charm has moved. Bugs and code can be found here:

https://launchpad.net/logstash-charm

With the most recent logstash charm (rev 2), I cannot reproduce this issue:

https://jujucharms.com/logstash/

Closing out.