get_certs_and_keys: charmhelpers.core.hookenv.NoNetworkBinding: No network binding for internal

Bug #1842680 reported by Frode Nordahl on 2019-09-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charms.openstack
Undecided
Unassigned

Bug Description

When attempting to use ``charms.openstack`` for a charm without spaces the ``get_certs_and_keys()`` helper will cause a Traceback.

2019-09-04 14:31:03 ERROR juju-log Hook error:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charmhelpers/core/hookenv.py", line 1239, in network_get_primary_address
    stderr=subprocess.STDOUT).decode('UTF-8').strip()
  File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['network-get', '--primary-address', 'internal']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charms/reactive/__init__.py", line 74, in main
    bus.dispatch(restricted=restricted_mode)
  File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 390, in dispatch
    _invoke(other_handlers)
  File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 359, in _invoke
    handler.invoke()
  File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 181, in invoke
    self._action(*args)
  File "/var/lib/juju/agents/unit-ovn-0/charm/reactive/ovn_handlers.py", line 39, in certificates_in_config_tls
    ovn_charm.configure_tls()
  File "lib/charm/openstack/ovn.py", line 127, in configure_tls
    certificates_interface=certificates_interface)
  File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charms_openstack/charm/classes.py", line 427, in configure_tls
    certificates_interface=certificates_interface)
  File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charms_openstack/charm/classes.py", line 356, in get_certs_and_keys
    'cn': os_ip.resolve_address(endpoint_type=ep_type)})
  File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charms_openstack/ip.py", line 175, in resolve_address
    resolved_address = _network_get_primary_address(binding)
  File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charms_openstack/ip.py", line 94, in _network_get_primary_address
    address = hookenv.network_get_primary_address(binding).decode('utf-8')
  File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charmhelpers/core/hookenv.py", line 1043, in inner_translate_exc2
    return f(*args, **kwargs)
  File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charmhelpers/core/hookenv.py", line 1243, in network_get_primary_address
    .format(binding))
charmhelpers.core.hookenv.NoNetworkBinding: No network binding for internal

2019-09-04 14:31:03 DEBUG config-changed Traceback (most recent call last):
2019-09-04 14:31:03 DEBUG config-changed File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charmhelpers/core/hookenv.py", line 1239, in network_get_primary_address
2019-09-04 14:31:03 DEBUG config-changed stderr=subprocess.STDOUT).decode('UTF-8').strip()
2019-09-04 14:31:03 DEBUG config-changed File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
2019-09-04 14:31:03 DEBUG config-changed **kwargs).stdout
2019-09-04 14:31:03 DEBUG config-changed File "/usr/lib/python3.6/subprocess.py", line 438, in run
2019-09-04 14:31:03 DEBUG config-changed output=stdout, stderr=stderr)
2019-09-04 14:31:03 DEBUG config-changed subprocess.CalledProcessError: Command '['network-get', '--primary-address', 'internal']' returned non-zero exit status 1.
2019-09-04 14:31:03 DEBUG config-changed
2019-09-04 14:31:03 DEBUG config-changed During handling of the above exception, another exception occurred:
2019-09-04 14:31:03 DEBUG config-changed
2019-09-04 14:31:03 DEBUG config-changed Traceback (most recent call last):
2019-09-04 14:31:03 DEBUG config-changed File "/var/lib/juju/agents/unit-ovn-0/charm/hooks/config-changed", line 22, in <module>
2019-09-04 14:31:03 DEBUG config-changed main()
2019-09-04 14:31:03 DEBUG config-changed File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charms/reactive/__init__.py", line 74, in main
2019-09-04 14:31:03 DEBUG config-changed bus.dispatch(restricted=restricted_mode)
2019-09-04 14:31:03 DEBUG config-changed File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 390, in dispatch
2019-09-04 14:31:03 DEBUG config-changed _invoke(other_handlers)
2019-09-04 14:31:03 DEBUG config-changed File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 359, in _invoke
2019-09-04 14:31:03 DEBUG config-changed handler.invoke()
2019-09-04 14:31:03 DEBUG config-changed File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 181, in invoke
2019-09-04 14:31:03 DEBUG config-changed self._action(*args)
2019-09-04 14:31:03 DEBUG config-changed File "/var/lib/juju/agents/unit-ovn-0/charm/reactive/ovn_handlers.py", line 39, in certificates_in_config_tls
2019-09-04 14:31:03 DEBUG config-changed ovn_charm.configure_tls()
2019-09-04 14:31:03 DEBUG config-changed File "lib/charm/openstack/ovn.py", line 127, in configure_tls
2019-09-04 14:31:03 DEBUG config-changed certificates_interface=certificates_interface)
2019-09-04 14:31:03 DEBUG config-changed File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charms_openstack/charm/classes.py", line 427, in configure_tls
2019-09-04 14:31:03 DEBUG config-changed certificates_interface=certificates_interface)
2019-09-04 14:31:03 DEBUG config-changed File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charms_openstack/charm/classes.py", line 356, in get_certs_and_keys
2019-09-04 14:31:03 DEBUG config-changed 'cn': os_ip.resolve_address(endpoint_type=ep_type)})
2019-09-04 14:31:03 DEBUG config-changed File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charms_openstack/ip.py", line 175, in resolve_address
2019-09-04 14:31:03 DEBUG config-changed resolved_address = _network_get_primary_address(binding)
2019-09-04 14:31:03 DEBUG config-changed File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charms_openstack/ip.py", line 94, in _network_get_primary_address
2019-09-04 14:31:03 DEBUG config-changed address = hookenv.network_get_primary_address(binding).decode('utf-8')
2019-09-04 14:31:03 DEBUG config-changed File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charmhelpers/core/hookenv.py", line 1043, in inner_translate_exc2
2019-09-04 14:31:03 DEBUG config-changed return f(*args, **kwargs)
2019-09-04 14:31:03 DEBUG config-changed File "/var/lib/juju/agents/unit-ovn-0/.venv/lib/python3.6/site-packages/charmhelpers/core/hookenv.py", line 1243, in network_get_primary_address
2019-09-04 14:31:03 DEBUG config-changed .format(binding))
2019-09-04 14:31:03 DEBUG config-changed charmhelpers.core.hookenv.NoNetworkBinding: No network binding for internal
2019-09-04 14:31:03 ERROR juju.worker.uniter.operation runhook.go:132 hook "config-changed" failed: exit status 1

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers