Skip to content

Conversation

@madhanrm
Copy link
Contributor

@madhanrm madhanrm commented Jun 19, 2018

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:

@madhanrm
Copy link
Contributor Author

madhanrm commented Jun 20, 2018

ping @sharmasushant

@sharmasushant
Copy link
Contributor

@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.

@madhanrm
Copy link
Contributor Author

/assign @sharmasushant

@madhanrm
Copy link
Contributor Author

@sharmasushant is there any CI Tests I can run to validate this changes?


// Sleep for 10 seconds as a workaround for windows
// This is done only when the network is created.
time.Sleep(10 * 1000)
Copy link
Member

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)"

@madhanrm
Copy link
Contributor Author

madhanrm commented Jun 28, 2018

Also fixes #178

@madhanrm
Copy link
Contributor Author

@madhanrm
Copy link
Contributor Author

@tamilmani1989 took care of the review comments. Can you take a look?

// Initialize HNS network.
hnsNetwork := &hcsshim.HNSNetwork{
Name: nwInfo.Id,
NetworkAdapterName: extIf.Name,
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@sharmasushant sharmasushant merged commit 5f58809 into Azure:master Jul 2, 2018
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.

3 participants