-
Notifications
You must be signed in to change notification settings - Fork 387
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
[Windows] Replace the private patch in the dependent hcsshim library #2931
Conversation
e1e8e29
to
808dd94
Compare
Codecov Report
@@ Coverage Diff @@
## main #2931 +/- ##
==========================================
- Coverage 59.62% 58.26% -1.36%
==========================================
Files 292 292
Lines 24724 24742 +18
==========================================
- Hits 14741 14417 -324
- Misses 8364 8752 +388
+ Partials 1619 1573 -46
Flags with carried forward coverage won't be shown. Click here to find out more.
|
c4b73b9
to
d27ffdb
Compare
/test-all |
/test-integration |
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.
@tnqn : do you still have concerns on the proposed approach.
for _, containerConfig := range knownInterfaces { | ||
// Find the OVS ports which are not connected to host interfaces, this is useful on Windows if the runtime is |
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.
, this -> . This
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.
Could we add some comments somewhere (pod_configuration.go, or pod_configuration_windows.go) to briefly describe the process of interface creation on Windows with Docker and containerd? It can be very short, but at least for readers to understand the CNI call sequence and what happen at each call.
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.
Sure, I would update.
pkg/ovs/ovsconfig/ovs_client.go
Outdated
return 0, NewTransactionError(err, temporary) | ||
} | ||
|
||
// Wait until OVS allocated the ofport to the Interface. |
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.
It seems the following code is duplicate with GetOFPort
. Why don't we just call GetOFPort
on caller side?
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.
They are different. The wait condition in function GetOFPort
is field "ofport" is not empty, but here we wait until the "ofport" field is not "-1".
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.
That's still one line difference, could we share the code? For example, make GetOFPort
take one argument waitUntilValid
, set it true
for the new scenario on client side.
I'm fine with the approach. I have comments for the code itself. |
/test-all |
@tnqn Could you help review it again? |
pkg/ovs/ovsconfig/ovs_client.go
Outdated
return 0, NewTransactionError(err, temporary) | ||
} | ||
|
||
// Wait until OVS allocated the ofport to the Interface. |
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.
That's still one line difference, could we share the code? For example, make GetOFPort
take one argument waitUntilValid
, set it true
for the new scenario on client side.
b01ebbf
to
d79b11e
Compare
/test-all |
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.
LGTM overall, one comment left
1. Use OVS Port externalIDs to cache the externalIDS in containerd runtime instead of HNSEndpoint 2. Create the OVS Interface with type "" if the host interface is not created (in containerd case), and update the type as "internal" after the host interface is created 3. Connect the OVS port to the host interface in function "reconcile" if the OVS port's ofport number is -1, by updating the OVS Interface type as "internal". Signed-off-by: wenyingd <wenyingd@vmware.com>
/test-integration |
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.
LGTM
/test-e2e |
/test-windows-networkpolicy |
Use OVS Port externalIDs to cache the externalIDS in containerd
runtime instead of HNSEndpoint
Create the OVS Interface with type "" if the host interface is
not created (in containerd case), and update the type as "internal"
after the host interface is created
Connect the OVS port to the host interface in function "reconcile" if
the OVS port's ofport number is -1, by updating the OVS Interface type
as "internal".
Fixes #2913
Signed-off-by: wenyingd wenyingd@vmware.com