Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip processing Service without IPPool annotation #6950

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xliuxu
Copy link
Contributor

@xliuxu xliuxu commented Jan 23, 2025

No description provided.

Comment on lines 159 to 162
_, allocationExists := c.getExternalIPAllocation(namespacedName)
if !allocationExists && getServiceExternalIPPool(service) == "" {
return
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could there be a race condition with a concurrent call to syncService operating on a previous version of the Service?

  1. enqueueService (this function) observes no current allocation (allocationExists is false) and no annotation (getServiceExternalIPPool(service) is the empty string)
  2. syncService observes a previous version of the Service with the annotation, and is in the process of creating an allocation.

@tnqn do you know if it is safe to have a stateful check in this code path (event handler function)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated the checks for annotations to ResourceEventHandlerFuncs before enqueueService as it is not needed to check the IP allocations.

@antoninbas antoninbas requested a review from tnqn January 23, 2025 18:36
@xliuxu xliuxu force-pushed the xliuxu/service-external-ip-queue branch from 6ef2d70 to c12b4dd Compare January 24, 2025 03:51
@xliuxu xliuxu force-pushed the xliuxu/service-external-ip-queue branch from c12b4dd to 49276de Compare January 24, 2025 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants