-
Notifications
You must be signed in to change notification settings - Fork 114
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
Fix reconcile vf functional test #744
Conversation
Thanks for your PR,
To skip the vendors CIs, Maintainers can use one of:
|
Pull Request Test Coverage Report for Build 10351277379Details
💛 - Coveralls |
d98b652
to
377410f
Compare
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.
Left few minor comments. As far as I understood, the main change in this PR is
unusedSriovDevices, err := findUnusedSriovDevices(node, sriovDeviceList)
if err != nil {
Skip(err.Error())
}
intf = unusedSriovDevices[0]
correct?
networkStatusJSON, exist := firstPod.Annotations["k8s.v1.cni.cncf.io/network-status"] | ||
Expect(exist).To(BeTrue()) | ||
Expect(networkStatusJSON).To(ContainSubstring("\"mtu\": 9000")) | ||
Eventually(func() error { |
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.
can you use waitForNetAttachDef()
here?
stdout, stderr, err = pod.ExecCommand(clients, firstPod, "ip", "link", "show", "net1") | ||
if stdout == "" { | ||
return fmt.Errorf("empty response from pod exec") | ||
// update 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.
please, extract a function like
// update the interface | |
intf = getInterfaceFromNodeStateByPciAddress(node, intf.PciAddr) | |
func getInterfaceFromNodeStateByPciAddress(node, pciAddress string) { | |
nodeState := &sriovv1.SriovNetworkNodeState{} | |
err = clients.Get(context.Background(), runtimeclient.ObjectKey{Name: node, Namespace: operatorNamespace}, nodeState) | |
Expect(err).ToNot(HaveOccurred()) | |
found := false | |
for _, state := range nodeState.Status.Interfaces { | |
if state.PciAddress == intf.PciAddress { | |
intf = state.DeepCopy() | |
found = true | |
break | |
} | |
} | |
Expect(found).To(BeTrue()) | |
} |
WDYT?
377410f
to
b789933
Compare
Hi @zeeke when you have time please take another look :) |
we should not lower the MTU on a primary SDN nic. with this change we select a PF that is not the default route of the node or not the nic connected to the ovs bridge for openshift Signed-off-by: Sebastian Sch <[email protected]>
b789933
to
09d5f75
Compare
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!
we should not lower the MTU on a primary SDN nic.
with this change we select a PF that is not the default route of the node or not the nic connected to the ovs bridge for openshift