cloud-provider-openstack icon indicating copy to clipboard operation
cloud-provider-openstack copied to clipboard

[occm] `AllocateLoadBalancerNodePorts=false` makes cloud provider to send nonsense requests to Octavia

Open dulek opened this issue 3 years ago • 0 comments

Is this a BUG REPORT or FEATURE REQUEST?: /kind bug

What happened: As explained in K8s docs it is possible to set spec.allocateLoadBalancerNodePorts to false for a type=LoadBalancer Service which will disable creation of the NodePorts for that Service. Effectively this means .spec.ports[*].nodePort on that Service will be set to 0. The cloud-provider-openstack doesn't really account for that and just uses this value when creating loadbalancer members. Obviously that fails because Octavia won't accept port number 0.

What you expected to happen: Creation of members with a port 0 is skipped, so that Service can be handled fully without errors.

How to reproduce it: Create a type=LoadBalancer Service with spec.allocateLoadBalancerNodePorts=false and observe events on the Service.

Anything else we need to know?: This won't make such Services to suddenly start to work as in direct traffic correctly without NodePorts, but rather protect from sending nonsense requests to Octavia.

Environment:

  • openstack-cloud-controller-manager(or other related binary) version: current
  • OpenStack version: Doesn't matter.
  • Others:

dulek avatar Sep 20 '22 14:09 dulek