-
Notifications
You must be signed in to change notification settings - Fork 113
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
improve drain check #354
improve drain check #354
Conversation
Thanks for your PR,
To skip the vendors CIs use one of:
|
/cc @zeeke @e0ne @adrianchiris |
Pull Request Test Coverage Report for Build 3059567663
💛 - Coveralls |
I think there is a regression in case the I arranged a unit test with information taken from a test cluster here: It works without changes at generic_plugin.go:166. Can you please add the test to the PR? |
1ed6dba
to
adf181f
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
adf181f
to
d440259
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
d440259
to
664f718
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
LGTM |
@@ -163,8 +163,8 @@ func needDrainNode(desired sriovnetworkv1.Interfaces, current sriovnetworkv1.Int | |||
needDrain = true | |||
return | |||
} | |||
if iface.Mtu != 0 && iface.Mtu != ifaceStatus.Mtu { | |||
glog.V(2).Infof("generic-plugin needDrainNode(): need drain, expect MTU %v, current MTU %v", iface.Mtu, ifaceStatus.Mtu) | |||
if utils.NeedUpdate(&iface, &ifaceStatus) { |
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 method checks also num VFs so you can remove the condition at L161
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.
done
sriovnetworkv1 "github.com/k8snetworkplumbingwg/sriov-network-operator/api/v1" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
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.
Any chance to use ginkgo and gomega as we do in other places ?
also you could define a test package (i.e generic_test
) and just test the interface calls WDYT ?
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.
done
664f718
to
a2140df
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
Hi @adrianchiris please take a look when you have time |
a2140df
to
c1c13de
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
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
|
||
}) | ||
|
||
//func TestNeedDrainNode_InterfaceWithBadMtuShouldDrainTheNode(t *testing.T) { |
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.
nit : delete ?
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.
miss that :P
Thanks!
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.
Minor nit. and im LGTM
We need to check in the drain function also if VFs exist If they exist we need to check if any other configuration is required (link driver and MTU) If a change to the VF is requested we should drain the node because we can have pods using the VF Signed-off-by: Sebastian Sch <[email protected]>
c1c13de
to
6cdb482
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
We need to check in the drain function also if VFs exist
If they exist we need to check if any other configuration is required (link driver and MTU)
If a change to the VF is requested we should drain the node because we can have pods using the VF
Signed-off-by: Sebastian Sch [email protected]