Skip to content

Conversation

@huntergregory
Copy link
Contributor

Reason for Change:

Filter HNS endpoints for running, local Pods. This will improve endpoint cache management, preventing any race conditions.

Issue Fixed:

N/A

Requirements:

Notes:

@huntergregory huntergregory added npm Related to NPM. windows labels Mar 13, 2023
@huntergregory huntergregory requested a review from a team as a code owner March 13, 2023 19:55
@huntergregory huntergregory requested review from vakalapa and removed request for a team March 13, 2023 19:55
@huntergregory huntergregory force-pushed the hgregory/npm-filter-endpoints branch from cd567fb to f1f5d00 Compare March 13, 2023 22:19

// NOTE see assumptions of hnsv2wrapperfake.ListEndpointsQuery
func (h Hnsv2wrapperwithtimeout) ListEndpointsQuery(query hcn.HostComputeQuery) ([]hcn.HostComputeEndpoint, error) {
r := make(chan ListEndpointsFuncResult)
Copy link
Contributor

Choose a reason for hiding this comment

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

this leaks goroutines when they try to send to the channel after the timeout has fired. fix is to make this a buffered chan of size 1.

@huntergregory
Copy link
Contributor Author

huntergregory commented Mar 17, 2023

Testing Non-Attached Container

Created non-Pod endpoint, and NPM did not see it:
new-hnsendpoint -NetworkId 72ad9d30-db92-41f2-a8bc-f5adfb5b6a7e -IPAddress 10.224.0.123 -Name MyTestEndpoint123

Testing Remote Endpoints

  1. Create 30 Pods across 3 nodes
  2. Delete all 30 pods
  3. Re-add 30 Pods

Verified that:

  • correct endpoints are added to cache
  • correct ones are deleted

vakalapa
vakalapa previously approved these changes Mar 29, 2023
@huntergregory huntergregory force-pushed the hgregory/npm-filter-endpoints branch 2 times, most recently from 4e75895 to 5042897 Compare March 31, 2023 21:18
@huntergregory
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@vakalapa vakalapa merged commit 6265826 into master Apr 6, 2023
@vakalapa vakalapa deleted the hgregory/npm-filter-endpoints branch April 6, 2023 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

npm Related to NPM. windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants