Description of problem: Seems like setting external_svc_net was ommitted in initial implementation of preparing kuryr.conf. This breaks Kuryr's support for LoadBalancer services. This commit fixes it by fetching the external network ID from the external-router created by the installer and passing it to kuryr.conf. Version-Release number of selected component (if applicable): cluster-network-operator 4.2 How reproducible: Always Steps to Reproduce: 1. Install OpenShift 4.2 with Kuryr 2. Create LoadBalancer type Service 3. Notice tracebacks in kuryr-controller logs. Actual results: Service never gets provisioned correctly with the floating IP. Expected results: Service gets a floating IP and becomes reachable. Additional info:
Verified on 4.2.0-0.nightly-2019-10-02-150642 on top of OSP 13 2019-10-01.1 puddle. External network ID is now set in kuryr config and LoadBalancer type services can be created. $ openstack network list | grep nova | 4d037425-2def-4416-9f5a-10294251c72f | nova $ openstack router list +--------------------------------------+------------------------------+--------+-------+----------------------------------+ | ID | Name | Status | State | Project | +--------------------------------------+------------------------------+--------+-------+----------------------------------+ | 25032fbf-6f50-43bc-aa60-f7e80100800f | ostest-mp284-external-router | ACTIVE | UP | 4d589eb96cb04a4598056bc3679b63dc | +--------------------------------------+------------------------------+--------+-------+----------------------------------+ $ openstack router show 25032fbf-6f50-43bc-aa60-f7e80100800f -c external_gateway_info +-----------------------+--------------------------------------------------------------------------------------------------------+ | Field | Value | +-----------------------+--------------------------------------------------------------------------------------------------------+ | external_gateway_info | {"network_id": "4d037425-2def-4416-9f5a-10294251c72f", "enable_snat": true, "external_fixed_ips": ..." | +-----------------------+--------------------------------------------------------------------------------------------------------+ $ oc -n openshift-kuryr get cm kuryr-config -o yaml | grep external external_svc_net = 4d037425-2def-4416-9f5a-10294251c72f $ oc new-project test $ oc run --image kuryr/demo pod1 $ oc expose dc/pod1 --port 80 --target-port 8080 $ oc run --image kuryr/demo pod2 $ oc get pods,svc -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES pod/pod1-1-deploy 0/1 Completed 0 5m25s 10.128.110.6 ostest-mp284-worker-tm2ql <none> <none> pod/pod1-1-vdk6z 1/1 Running 0 5m9s 10.128.110.3 ostest-mp284-worker-tm2ql <none> <none> pod/pod2-1-bb5vf 1/1 Running 0 2m46s 10.128.110.21 ostest-mp284-worker-tm2ql <none> <none> pod/pod2-1-deploy 0/1 Completed 0 3m16s 10.128.110.12 ostest-mp284-worker-pczjp <none> <none> NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR service/pod1 ClusterIP 172.30.129.4 <none> 80/TCP 3m58s run=pod1 $ oc rsh pod2-1-bb5vf curl 172.30.129.4 pod1-1-vdk6z: HELLO! I AM ALIVE!!! $ openstack loadbalancer list +-----------------------------------------------------------------------+----------------+---------------------+----------+ | name | vip_address | provisioning_status | provider | +-----------------------------------------------------------------------+----------------+---------------------+----------+ |... | | | | +-----------------------------------------------------------------------+----------------+---------------------+----------+ | test/pod1 | 172.30.129.4 | ACTIVE | octavia | +-----------------------------------------------------------------------+----------------+---------------------+----------+
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:2922