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.

resolve_private_address() fails #62

@chrisheckler

Description

@chrisheckler

If your DNS can't resolve hostnames of other machines on your network this will fail, in which causing charm install/deploys to fail.

	unit-spark-1: 15:57:21 ERROR unit.spark/1.juju-log zookeeper:7: Unable to resolve private IP: juju-e32cb2-3.hecky (will attempt to guess)
unit-spark-1: 15:57:21 ERROR unit.spark/1.juju-log zookeeper:7: [Errno -2] Name or service not known
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed Traceback (most recent call last):
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed   File "/usr/local/lib/python3.5/dist-packages/jujubigdata/utils.py", line 433, in resolve_private_address
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed     ip = socket.gethostbyname(addr)
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed socket.gaierror: [Errno -2] Name or service not known
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed 
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed During handling of the above exception, another exception occurred:
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed 
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed Traceback (most recent call last):
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed   File "/var/lib/juju/agents/unit-spark-1/charm/hooks/zookeeper-relation-changed", line 19, in <module>
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed     main()
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed   File "/usr/local/lib/python3.5/dist-packages/charms/reactive/__init__.py", line 78, in main
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed     bus.dispatch()
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed   File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 423, in dispatch
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed     _invoke(other_handlers)
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed   File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 406, in _invoke
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed     handler.invoke()
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed   File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 280, in invoke
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed     self._action(*args)
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed   File "/var/lib/juju/agents/unit-spark-1/charm/reactive/spark.py", line 203, in reinstall_spark
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed     install_spark_standalone(zks, peers)
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed   File "/var/lib/juju/agents/unit-spark-1/charm/reactive/spark.py", line 99, in install_spark_standalone
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed     spark.configure(hosts, zk_units=zks, peers=peers, extra_libs=extra_libs)
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed   File "lib/charms/layer/bigtop_spark.py", line 234, in configure
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed     master_ip = utils.resolve_private_address(available_hosts['spark-master'])
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed   File "/usr/local/lib/python3.5/dist-packages/jujubigdata/utils.py", line 440, in resolve_private_address
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed     raise ValueError('Unable to resolve or guess IP from private-address: %s' % addr)
unit-spark-1: 15:57:21 DEBUG unit.spark/1.zookeeper-relation-changed ValueError: Unable to resolve or guess IP from private-address: juju-e32cb2-3.hecky
unit-spark-1: 15:57:21 ERROR juju.worker.uniter.operation hook "zookeeper-relation-changed" failed: exit status 1

Can we sort this out a different way please?

Thanks

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