ERROR no network config found for binding cluster

Bug #1691242 reported by Adam Stokes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned
OpenStack RabbitMQ Server Charm
Invalid
Undecided
Unassigned

Bug Description

From a `conjure-up openstack-novalxd localhost`

2017-05-16 19:01:30 DEBUG worker.uniter.jujuc server.go:178 hook context id "rabbitmq-server/0-config-changed-7825474525823500688"; dir "/var/lib/juju/agents/unit-rabbitmq-server-0/charm"
2017-05-16 19:01:30 DEBUG juju-log Hardening function 'install'
2017-05-16 19:01:30 DEBUG worker.uniter.jujuc server.go:178 hook context id "rabbitmq-server/0-config-changed-7825474525823500688"; dir "/var/lib/juju/agents/unit-rabbitmq-server-0/charm"
2017-05-16 19:01:30 DEBUG juju-log Hardening function 'upgrade_charm'
2017-05-16 19:01:30 DEBUG worker.uniter.jujuc server.go:178 hook context id "rabbitmq-server/0-config-changed-7825474525823500688"; dir "/var/lib/juju/agents/unit-rabbitmq-server-0/charm"
2017-05-16 19:01:30 DEBUG juju-log Hardening function 'config_changed'
2017-05-16 19:01:30 DEBUG worker.uniter.jujuc server.go:178 hook context id "rabbitmq-server/0-config-changed-7825474525823500688"; dir "/var/lib/juju/agents/unit-rabbitmq-server-0/charm"
2017-05-16 19:01:30 DEBUG juju-log Hardening function 'update_status'
2017-05-16 19:01:30 DEBUG worker.uniter.jujuc server.go:178 hook context id "rabbitmq-server/0-config-changed-7825474525823500688"; dir "/var/lib/juju/agents/unit-rabbitmq-server-0/charm"
2017-05-16 19:01:30 DEBUG worker.uniter.jujuc server.go:178 hook context id "rabbitmq-server/0-config-changed-7825474525823500688"; dir "/var/lib/juju/agents/unit-rabbitmq-server-0/charm"
2017-05-16 19:01:30 DEBUG worker.uniter.jujuc server.go:178 hook context id "rabbitmq-server/0-config-changed-7825474525823500688"; dir "/var/lib/juju/agents/unit-rabbitmq-server-0/charm"
2017-05-16 19:01:30 DEBUG worker.uniter.jujuc server.go:178 hook context id "rabbitmq-server/0-config-changed-7825474525823500688"; dir "/var/lib/juju/agents/unit-rabbitmq-server-0/charm"
2017-05-16 19:01:30 DEBUG worker.uniter.jujuc server.go:178 hook context id "rabbitmq-server/0-config-changed-7825474525823500688"; dir "/var/lib/juju/agents/unit-rabbitmq-server-0/charm"
2017-05-16 19:01:30 DEBUG worker.uniter.jujuc server.go:178 hook context id "rabbitmq-server/0-config-changed-7825474525823500688"; dir "/var/lib/juju/agents/unit-rabbitmq-server-0/charm"
2017-05-16 19:01:30 DEBUG worker.uniter.jujuc server.go:178 hook context id "rabbitmq-server/0-config-changed-7825474525823500688"; dir "/var/lib/juju/agents/unit-rabbitmq-server-0/charm"
2017-05-16 19:01:30 DEBUG worker.uniter.jujuc server.go:178 hook context id "rabbitmq-server/0-config-changed-7825474525823500688"; dir "/var/lib/juju/agents/unit-rabbitmq-server-0/charm"
2017-05-16 19:01:30 DEBUG juju-log No hardening applied to 'config_changed'
2017-05-16 19:01:30 DEBUG worker.uniter.jujuc server.go:178 hook context id "rabbitmq-server/0-config-changed-7825474525823500688"; dir "/var/lib/juju/agents/unit-rabbitmq-server-0/charm"
2017-05-16 19:01:30 DEBUG worker.uniter.jujuc server.go:178 hook context id "rabbitmq-server/0-config-changed-7825474525823500688"; dir "/var/lib/juju/agents/unit-rabbitmq-server-0/charm"
2017-05-16 19:01:30 DEBUG worker.uniter.jujuc server.go:178 hook context id "rabbitmq-server/0-config-changed-7825474525823500688"; dir "/var/lib/juju/agents/unit-rabbitmq-server-0/charm"
2017-05-16 19:01:30 DEBUG worker.uniter.jujuc server.go:178 hook context id "rabbitmq-server/0-config-changed-7825474525823500688"; dir "/var/lib/juju/agents/unit-rabbitmq-server-0/charm"
2017-05-16 19:01:30 INFO config-changed ERROR no network config found for binding "cluster"
2017-05-16 19:01:30 INFO config-changed Traceback (most recent call last):
2017-05-16 19:01:30 INFO config-changed File "/var/lib/juju/agents/unit-rabbitmq-server-0/charm/hooks/config-changed", line 672, in <module>
2017-05-16 19:01:30 INFO config-changed hooks.execute(sys.argv)
2017-05-16 19:01:30 INFO config-changed File "/var/lib/juju/agents/unit-rabbitmq-server-0/charm/hooks/charmhelpers/core/hookenv.py", line 731, in execute
2017-05-16 19:01:30 INFO config-changed self._hooks[hook_name]()
2017-05-16 19:01:30 INFO config-changed File "/var/lib/juju/agents/unit-rabbitmq-server-0/charm/hooks/rabbit_utils.py", line 788, in wrapped_f
2017-05-16 19:01:30 INFO config-changed f(*args, **kwargs)
2017-05-16 19:01:30 INFO config-changed File "/var/lib/juju/agents/unit-rabbitmq-server-0/charm/hooks/charmhelpers/contrib/hardening/harden.py", line 79, in _harden_inner2
2017-05-16 19:01:30 INFO config-changed return f(*args, **kwargs)
2017-05-16 19:01:30 INFO config-changed File "/var/lib/juju/agents/unit-rabbitmq-server-0/charm/hooks/config-changed", line 576, in config_changed
2017-05-16 19:01:30 INFO config-changed rabbit.get_unit_hostname()})
2017-05-16 19:01:30 INFO config-changed File "/var/lib/juju/agents/unit-rabbitmq-server-0/charm/hooks/rabbit_utils.py", line 916, in get_unit_ip
2017-05-16 19:01:30 INFO config-changed return network_get_primary_address(interface)
2017-05-16 19:01:30 INFO config-changed File "/var/lib/juju/agents/unit-rabbitmq-server-0/charm/hooks/charmhelpers/core/hookenv.py", line 853, in inner_translate_exc2
2017-05-16 19:01:30 INFO config-changed return f(*args, **kwargs)
2017-05-16 19:01:30 INFO config-changed File "/var/lib/juju/agents/unit-rabbitmq-server-0/charm/hooks/charmhelpers/core/hookenv.py", line 1037, in network_get_primary_address
2017-05-16 19:01:30 INFO config-changed return subprocess.check_output(cmd).decode('UTF-8').strip()
2017-05-16 19:01:30 INFO config-changed File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
2017-05-16 19:01:30 INFO config-changed raise CalledProcessError(retcode, cmd, output=output)
2017-05-16 19:01:30 INFO config-changed subprocess.CalledProcessError: Command '['network-get', '--primary-address', 'cluster']' returned non-zero exit status 1
2017-05-16 19:01:30 ERROR juju.worker.uniter.operation runhook.go:107 hook "config-changed" failed: exit status 1
2017-05-16 19:01:30 DEBUG juju.worker.uniter.operation executor.go:84 lock released
2017-05-16 19:01:30 INFO juju.worker.uniter resolver.go:100 awaiting error resolution for "config-changed" hook
2017-05-16 19:01:30 DEBUG juju.worker.uniter agent.go:17 [AGENT-STATUS] error: hook failed: "config-changed"

Revision history for this message
James Page (james-page) wrote :

I believe that network-get should always return information for the cluster binding, even if not binding has been provided by the end-user of the charm. Otherwise we're back to 'unit-get private-address' which is know to be non-deterministic.

Raising juju task and marking rabbitmq charm bug as Invalid.

Changed in charm-rabbitmq-server:
status: New → Invalid
Revision history for this message
John A Meinel (jameinel) wrote :

Assuming this is about:
2017-05-16 19:01:30 INFO config-changed ERROR no network config found for binding "cluster"

I believe the comment that "juju deploy openstack-novalxd" should still provide a value for 'network-get ENDPOINT', even though no bindings were specified is valid.

We *should* have bindings for all endpoints, even if a user doesn't supply them. Ultimately there is supposed to be a model-level default binding for everything that is deployed without other arguments. I'm not 100% sure if without that configuration we'll get sane results, because we'll have machines deployed that don't have any constraints, meaning they could be in just about any spaces, and then what are we doing with the units that show up.

The *right* fix is that 'juju bootstrap' enforces a model-level default binding, which then every 'juju deploy' from then on uses the default binding if not otherwise specified.
In the short term, maybe we can use the "" space to give some sort of result for network-get.

Revision history for this message
John A Meinel (jameinel) wrote :

I know Witold recently made some changes wrt this which also should make 'unit-get private-address' more stable (albeit in the presence of bindings).
We should see if his changes in 2.2 also stabilize and give a value for 'network-get' when there are no explicit bindings.

Changed in juju:
importance: Undecided → High
status: New → Triaged
Revision history for this message
SysXpert (sysxpert) wrote :

I am seeing this too. Is anyone going to do anything about it ?

Revision history for this message
SysXpert (sysxpert) wrote :

Any workarounds ?

Revision history for this message
John A Meinel (jameinel) wrote :

Is this being seen after an upgrade (of either juju or of a charm)?

The standard behavior for juju is to provide a binding definition for everything the charm exposes, though there is work that need to be done to allow users to update configurations post-deploy.

Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: High → Low
tags: added: expirebugs-bot
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.