Skip to content
This repository was archived by the owner on Mar 4, 2024. It is now read-only.
This repository was archived by the owner on Mar 4, 2024. It is now read-only.

'output' referenced before assignment at wait_for_hdfs timeout #61

@merlijn-sebrechts

Description

@merlijn-sebrechts

Found this when hdfs couldn't come online because of an unrelated issue with the network. Throwing the exception causes an exception:

unit-slave-2: 15:40:59 DEBUG unit.slave/2.namenode-relation-changed   File "/var/lib/juju/agents/unit-slave-2/charm/hooks/namenode-relation-changed", line 19, in <module>
unit-slave-2: 15:40:59 DEBUG unit.slave/2.namenode-relation-changed     main()
unit-slave-2: 15:40:59 DEBUG unit.slave/2.namenode-relation-changed   File "/usr/local/lib/python3.5/dist-packages/charms/reactive/__init__.py", line 78, in main
unit-slave-2: 15:40:59 DEBUG unit.slave/2.namenode-relation-changed     bus.dispatch()
unit-slave-2: 15:40:59 DEBUG unit.slave/2.namenode-relation-changed   File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 423, in dispatch
unit-slave-2: 15:40:59 DEBUG unit.slave/2.namenode-relation-changed     _invoke(other_handlers)
unit-slave-2: 15:40:59 DEBUG unit.slave/2.namenode-relation-changed   File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 406, in _invoke
unit-slave-2: 15:40:59 DEBUG unit.slave/2.namenode-relation-changed     handler.invoke()
unit-slave-2: 15:40:59 DEBUG unit.slave/2.namenode-relation-changed   File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 280, in invoke
unit-slave-2: 15:40:59 DEBUG unit.slave/2.namenode-relation-changed     self._action(*args)
unit-slave-2: 15:40:59 DEBUG unit.slave/2.namenode-relation-changed   File "/var/lib/juju/agents/unit-slave-2/charm/reactive/datanode.py", line 70, in start_datanode
unit-slave-2: 15:40:59 DEBUG unit.slave/2.namenode-relation-changed     utils.wait_for_hdfs(30)
unit-slave-2: 15:40:59 DEBUG unit.slave/2.namenode-relation-changed   File "/usr/local/lib/python3.5/dist-packages/jujubigdata/utils.py", line 581, in wait_for_hdfs
unit-slave-2: 15:40:59 DEBUG unit.slave/2.namenode-relation-changed     raise TimeoutError('Timed-out waiting for HDFS:\n%s' % output)
unit-slave-2: 15:40:59 DEBUG unit.slave/2.namenode-relation-changed UnboundLocalError: local variable 'output' referenced before assignment



Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions