Skip to content

Fix possible overlapping IPs when ingressNA == nil#49948

Merged
thaJeztah merged 1 commit intomoby:masterfrom
corhere:process-all-attachments
May 12, 2025
Merged

Fix possible overlapping IPs when ingressNA == nil#49948
thaJeztah merged 1 commit intomoby:masterfrom
corhere:process-all-attachments

Conversation

@corhere
Copy link
Contributor

@corhere corhere commented May 9, 2025

- What I did
Logic was added to the Swarm executor in #42432 to clean up managed networks whenever the node's load-balancer IP address is removed or changed in order to free up the address in the case where the container fails to start entirely. Unfortunately, due to an oversight the function returns early if the Swarm is lacking an ingress network. Fix the implementation so that load-balancer IP addresses for all the other networks are freed as appropriate, irrespective of whether an ingress network exists in the Swarm.

- How I did it
Change the early return to a conditional.

- How to verify it
By inspection 🤷

- Human readable description for the release notes

Fix an issue where the load-balancer IP address for an overlay network would not be released in certain cases if the Swarm was lacking an ingress network

- A picture of a cute animal (not mandatory but encouraged)

Logic was added to the Swarm executor in commit 0d9b0ed
to clean up managed networks whenever the node's load-balancer IP
address is removed or changed in order to free up the address in the
case where the container fails to start entirely. Unfortunately, due to
an oversight the function returns early if the Swarm is lacking
an ingress network. Remove the early return so that load-balancer IP
addresses for all the other networks are freed as appropriate,
irrespective of whether an ingress network exists in the Swarm.

Signed-off-by: Cory Snider <csnider@mirantis.com>
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah added this to the 28.2.0 milestone May 12, 2025
@thaJeztah thaJeztah merged commit 99368ee into moby:master May 12, 2025
153 of 159 checks passed
@corhere corhere deleted the process-all-attachments branch May 13, 2025 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Node LB not deleted after container exits itself (cause IP overlapping)

3 participants