-
Notifications
You must be signed in to change notification settings - Fork 260
Add workaround for windows network creation #174
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
Conversation
|
ping @sharmasushant |
|
@madhanrm I sent you couple of questions offline yesterday. Can you please respond to those, and add a little bit of description. Thanks for submitting the PR. |
|
/assign @sharmasushant |
|
@sharmasushant is there any CI Tests I can run to validate this changes? |
network/network_windows.go
Outdated
|
|
||
| // Sleep for 10 seconds as a workaround for windows | ||
| // This is done only when the network is created. | ||
| time.Sleep(10 * 1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you may need something like this to sleep for 10 seconds.
"time.Sleep(time.Duration(10) * time.Second)"
|
Also fixes #178 |
|
@tamilmani1989 took care of the review comments. Can you take a look? |
| // Initialize HNS network. | ||
| hnsNetwork := &hcsshim.HNSNetwork{ | ||
| Name: nwInfo.Id, | ||
| NetworkAdapterName: extIf.Name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not remove network adapter name. Please separate this change from the time delay you have added below. We can discuss this on a separate PR/Issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current usage is still not correct. If this nic name passed is a vnic part of an existing switch, this call is going to fail.
I'll revert this change, but will add another check to skip host vnic.
What this PR does / why we need it:
This is a workaround for windows CNI, where the platform need some delay before cni starts creating endpoint on a newly created network.
The second change is to remove the networkAdapterName
The next change is to use the latest compile with latest CNI
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close that issue when PR gets merged): fixes #Special notes for your reviewer:
This workaround is needed only for 1803 & below
Release note: