Bug 2114834

Summary: Failure when creating Floating IP for load-balancer
Product: OpenShift Container Platform Reporter: Maysa Macedo <mdemaced>
Component: Cloud ComputeAssignee: Maysa Macedo <mdemaced>
Cloud Compute sub component: OpenStack Provider QA Contact: Jon Uriarte <juriarte>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: itbrown, m.andre, mfedosin, pprinett
Version: 4.12Keywords: Triaged
Target Milestone: ---   
Target Release: 4.12.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-17 19:54:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Maysa Macedo 2022-08-03 11:41:03 UTC
Description of problem:

When multiple external networks are available in the cluster the cloud provider(CCM) picks a random one to create the floating IP, which may cause the following error:

 I0801 15:18:30.718397       1 event.go:294] "Event occurred" object="e2e-k8s-service-load-balancer-with-pdb-new-1970/service-test" fieldPath="" kind="Service" apiVersion="v1" type="Warning" reason="SyncLoadBalancerFailed" message="Error syncing load balancer: failed to ensure load balancer: error creating LB floatingip: Bad request with: [POST https://network.rdo.mtl2.vexxhost.net/v2.0/floatingips], error message: {\"NeutronError\": {\"type\": \"BadRequest\", \"message\": \"Bad floatingip request: Network 2429fcb3-f820-4573-b965-2dd5f6dc0338 does not contain any IPv4 subnet.\", \"detail\": \"\"}}"
2022-08-01T15:18:30.718451054Z I0801 15:18:30.718436       1 event.go:294] "Event occurred" object="e2e-k8s-service-load-balancer-with-pdb-reused-2375/service-test" fieldPath="" kind="Service" apiVersion="v1" type="Normal" reason="EnsuringLoadBalancer" message="Ensuring load balancer"
2022-08-01T15:18:31.617808284Z E0801 15:18:31.617768       1 controller.go:310] error processing service e2e-k8s-service-load-balancer-with-pdb-reused-2375/service-test (will retry): failed to ensure load balancer: error creating LB floatingip: Bad request with: [POST https://network.rdo.mtl2.vexxhost.net/v2.0/floatingips], error message: {"NeutronError": {"type": "BadRequest", "message": "Bad floatingip request: Network 2429fcb3-f820-4573-b965-2dd5f6dc0338 does not contain any IPv4 subnet.", "detail": ""}}

Spot in a CI run[1].
While this issue can be fixed by adding the networkID to be used to the config[2], we should understand if this also happen in previous releases and provide a fix to the tests that cause this issue.

[1] https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/logs/periodic-ci-shiftstack-shiftstack-ci-main-periodic-4.12-upgrade-from-stable-4.11-e2e-openstack-upgrade/1554091091228102656/artifacts/e2e-openstack-upgrade/gather-must-gather/artifacts/
[2] https://docs.openshift.com/container-platform/4.10/installing/installing_openstack/installing-openstack-installer-custom.html#installation-osp-setting-cloud-provider-options_installing-openstack-installer-custom

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Pierre Prinetti 2022-08-03 12:25:41 UTC
I understand that when creating a load-balancer, CCM randomly picks one of the external networks available in OpenStack for creating the floating IP.

What is instead the expected behaviour?

Comment 2 Maysa Macedo 2022-08-04 11:05:27 UTC
We need to understand if this test produces the same failure with the in-tree cloud provider, if it's skipped or if it's a regression from previous version.

Comment 4 ShiftStack Bugwatcher 2022-08-11 07:18:21 UTC
Removing the Triaged keyword because:
* the priority assessment is missing

Comment 6 Maysa Macedo 2022-09-19 10:11:08 UTC
Fix upstream https://github.com/kubernetes/cloud-provider-openstack/pull/1992

Comment 8 Itzik Brown 2022-10-26 11:45:45 UTC
Verified with 4.12.0-0.nightly-2022-10-25-005239 , OpenshiftSDN

Created another external network with IPv6 subnet and created a LoadBalancer service.
A FIP was attached to the service.

Note: Both of the original and the new network were set as shared. If the new one is with an ID smaller than the original and it's not set as shared it will be picked up first.

Comment 11 errata-xmlrpc 2023-01-17 19:54:14 UTC
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 (Moderate: OpenShift Container Platform 4.12.0 bug fix and security update), 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/RHSA-2022:7399