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

Fixed windows CNI issues #223

Merged
merged 3 commits into from
Aug 9, 2018
Merged

Conversation

tamilmani1989
Copy link
Member

What this PR does / why we need it:

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

  1. Return error if hotadd fails so that all resources will be cleaned up.
  2. If endpoint not found on second add call, return error

Special notes for your reviewer:

Release note:

@tamilmani1989
Copy link
Member Author

@madhanrm

@@ -55,7 +56,8 @@ func handleConsecutiveAdd(containerId, endpointId string, nwInfo *network.Networ
return result, nil
}

return nil, nil
err = fmt.Errorf("endpoint %v not found", endpointId)
Copy link
Contributor

Choose a reason for hiding this comment

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

Try to return the error returned from the platform instead of constructing a new one.

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

defer func() {
if err != nil {
log.Printf("[net] HNSEndpointRequest DELETE id:%v", hnsResponse.Id)
hnsResponse, err := hcsshim.HNSEndpointRequest("DELETE", hnsResponse.Id, "")
Copy link
Contributor

Choose a reason for hiding this comment

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

Hopefully the IPAddress is also released from the IPAM following this somewhere in CNI

Copy link
Member Author

Choose a reason for hiding this comment

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

yes it will free up..will test once.

@PatrickLang
Copy link
Contributor

Does this resolve #218?

@tamilmani1989
Copy link
Member Author

yes it should

@madhanrm
Copy link
Contributor

madhanrm commented Aug 9, 2018

/lgtm

Try following scenarios

() Deploy a service
(
) Scaleup & down to 0-20
(*) Restart Kubelet service/Host while scaling

@sharmasushant sharmasushant merged commit 3ea96ed into Azure:master Aug 9, 2018
@tamilmani1989 tamilmani1989 deleted the wincnifix branch September 17, 2018 18:35
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.

4 participants