k8snetworkplumbingwg / ib-sriov-cni

InfiniBand SR-IOV CNI
Other
40 stars 27 forks source link

CmdAdd: check GUID if ib-kubernetes enabled #46

Closed DmytroLinkin closed 4 years ago

DmytroLinkin commented 4 years ago

If ib-kubernetes enabled make sure GUID is not empty to avoid misconfiguration.

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 118


Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/sriov/sriov.go 8 10 80.0%
pkg/utils/utils.go 6 9 66.67%
<!-- Total: 14 19 73.68% -->
Totals Coverage Status
Change from base Build 137: 1.1%
Covered Lines: 228
Relevant Lines: 520

💛 - Coveralls
adrianchiris commented 4 years ago

can you explain in the commit message what is the current behaviour , the proposed solution and how cni would behave after the change ?

abdallahyas commented 4 years ago

/retest

adrianchiris commented 4 years ago

Reword suggestion as the first commit message is not accurate.

Currently ib-sriov-cni receive GUID in two ways: generated by ib-kubernetes or manually configured

Currently ib-sriov-cni configures GUID according to the value provided in the CNI's network configuration. This value is either set by ib-kubernetes or by other means (e.g by manually specifying it in the CNI configuration)

Also it is possible that a pod can appear with already attached VF with setted GUID.

When GUID is not specified, the existing GUID that is currently set on the VF is used