Skip to content

cns: run stale-HNS cleanup for delegated-NIC Docker NCs - #4856

Draft
Paul Johnston (pjohnst5) wants to merge 1 commit into
masterfrom
pjohnst5/hns-cleanup
Draft

cns: run stale-HNS cleanup for delegated-NIC Docker NCs#4856
Paul Johnston (pjohnst5) wants to merge 1 commit into
masterfrom
pjohnst5/hns-cleanup

Conversation

@pjohnst5

Copy link
Copy Markdown
Contributor

Stale-HNS-resource cleanup on NC create previously ran only for the AzureContainerInstance NetworkContainerType. Delegated-NIC NCs on the Swift/BYON path arrive as ContainerType Docker, so leaked/orphaned delegated-NIC HNS networks (issue #4540) that strand a MAC were not cleaned for that path.

Factor the enable/delegated-NIC gating and cleanup call into a shared helper (cleanupStaleHNSForDelegatedNIC) and add a dedicated cns.Docker branch that invokes it before saving NC goal state. The existing ACI branch keeps its control flow; only its inline cleanup block is replaced by the identical helper call. No APIPA gate is added: AKS has no ApipaNIC endpoints, so findStaleContainerByApipaIP no-ops on the passed local IP.

Stale-HNS-resource cleanup on NC create previously ran only for the
AzureContainerInstance NetworkContainerType. Delegated-NIC NCs on the
Swift/BYON path arrive as ContainerType Docker, so leaked/orphaned
delegated-NIC HNS networks (issue #4540) that strand a MAC were not
cleaned for that path.

Factor the enable/delegated-NIC gating and cleanup call into a shared
helper (cleanupStaleHNSForDelegatedNIC) and add a dedicated cns.Docker
branch that invokes it before saving NC goal state. The existing ACI
branch keeps its control flow; only its inline cleanup block is replaced
by the identical helper call. No APIPA gate is added: AKS has no ApipaNIC
endpoints, so findStaleContainerByApipaIP no-ops on the passed local IP.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@pjohnst5

Copy link
Copy Markdown
Contributor Author

#4540

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.

1 participant