cloud-provider-for-cloud-director icon indicating copy to clipboard operation
cloud-provider-for-cloud-director copied to clipboard

CCM does not update the exiting virtual service if the port name is updated in the service

Open viveksyngh opened this issue 1 year ago • 5 comments

Describe the bug

CCM does not update the exiting virtual service if the port name is updated in the LoadBalancer service. It reports error saying there is existing virtual service with same IP and port combination.

Reproduction steps

  1. Create a service type of load balancer with multiple ports
  2. Wait for virtual service to get created for each port
  3. Update one of the port name ...

Expected behavior

It should update the existing virtual service or delete existing virtual first and then create a new one.

Additional context

No response

viveksyngh avatar Jan 24 '24 12:01 viveksyngh

@viveksyngh the issue we have is that, when a name is changed, we do not see it as a rename operation because we do not get an old name. We just get a new name with the same port, and we try to reconcile it.

I will check with the cloud-provider sig about how they usually handle these cases. Maybe the older name can be inferred from soma last applied configuration or so.

arunmk avatar Jan 24 '24 19:01 arunmk

Looks like we have same issue when we remove a port from the list of ports from virtual service.

viveksyngh avatar Feb 26 '24 16:02 viveksyngh

I've seen that when we try to remove a port from a LB service the reconciliation of that service gets stuck until we manually delete the corresponding VirtualService and Pool from VCD......

luisdavim avatar Feb 26 '24 16:02 luisdavim

@arunmk Let us know if you need help. This is becoming a recurring issue for us and we would like to fix this as soon as possible.

We can may be used for some mapping in the annotation of the service to figure out the difference or

we should have some way to select all virtual ports services for a service and then figure out the diff. We can implement this in controller for load balancer if VCD has API to list all virtual services for a kubernetes service.

viveksyngh avatar Feb 26 '24 16:02 viveksyngh

@viveksyngh can we get a bugzilla also going on for this so that we can prioritize.

arunmk avatar Feb 26 '24 18:02 arunmk