Comment 1 for bug 1996218

Revision history for this message
Ian Booth (wallyworld) wrote :

When network-get is run, it is not guaranteed that Juju has collated all the address info - link layer devices, instance ips etc - for the host machine. Therefore the api call may return 0 network info records. This results in the charmhelper "NoNetworkBinding" error.

The Juju agent on the host machine gathers the link layer device info, and the controller polls for cloud allocated host instance addresses, so the network info does eventually become available.

The charm needs to be resilient to the fact that the address info may not immediately be known. It needs to take account of that error and try again a short time later. It needs to set its status to "Waiting" with a suitable message. And if after several attempts the address info is not available, it should set its status to "Blocked".

If this error happens, can you retry the hook - it should run ok the next time, assuming the address info has been populated. This will confirm the above theory and indicate that the charm needs to be fixed.