When exposing nbi with LoadBalancer service type, an empty ingress address is retrieved

Bug #1853853 reported by Nicolas Pochet
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Invalid
Undecided
Unassigned
charm-osm-nbi
New
Undecided
Unassigned

Bug Description

When deploying OSM with NBI exposed with a LoadBalancer service type, it cannot find its ingress-addresses to send it to the other applications that need it (e.g. UI).

OSM is deployed with the following bundle: https://drive.google.com/open?id=1_6xJ0Z-NFDOEhP1K8qaopH8aeo2vrf_8

As K8s is deployed on top of OpenStack with Octavia, it makes sense to expose the OSM apps with a load-balancer instead of using Ingress.

We can see the following in the nbi-k8s-operator-0 logs:

kubectl logs nbi-k8s-operator-0 -n osm
...
tracer: ++ queue handler reactive/nbi.py:80:set_nbi_active
tracer: ++ queue handler reactive/nbi.py:90:send_config
2019-11-25 14:30:52 INFO juju-log Invoking reactive handler: reactive/nbi.py:80:set_nbi_active
2019-11-25 14:30:52 INFO juju-log Invoking reactive handler: reactive/nbi.py:90:send_config
2019-11-25 14:30:52 INFO juju-log status-set: maintenance: Sending NBI configuration
2019-11-25 14:30:54 INFO juju-log No ingress-addresses: {'bind-addresses': [{'macaddress': '', 'interfacename': '', 'addresses': []}]}
2019-11-25 14:30:54 INFO juju-log status-set: active: ready

Tags: k8s network osm
Revision history for this message
Nicolas Pochet (npochet) wrote :

The log message saying that there's no ingress-addresses seems to come from https://git.launchpad.net/charm-osm-common/tree/lib/charms/osm/k8s.py#n8
The get_service_ip function calls network_get(endpoint, relation_id()) which will call network-get itself.
Looking at the juju status of the nbi-k8s app, it seems that juju does not know any address for this application:
juju status nbi-k8s
Model Controller Cloud/Region Version SLA Timestamp
osm foundation-k8s kubernetes_cloud 2.6.10 unsupported 14:48:15Z

SAAS Status Store URL
osm-vca active foundation-openstack admin/kubernetes.osm-vca

App Version Status Scale Charm Store Rev OS Address Notes
nbi-k8s active 1 nbi-k8s jujucharms 30 kubernetes

Unit Workload Agent Address Ports Message
nbi-k8s/0* active idle 10.1.3.33 9999/TCP ready

tags: added: k8s network osm
Revision history for this message
Ian Booth (wallyworld) wrote :

Juju can only know the ingress address once the service is available in the cluster. Each time this changes, the config-changed hook is run (moving forward we need another way to signal this to the charm other than the config-changed hook). The charm needs to be resilient enough to operate with incomplete information and wait till all information becomes available (which it eventually will).

Changed in juju:
status: New → Invalid
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.