-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support GUID CNI runtime config #70
Conversation
Pull Request Test Coverage Report for Build 241
💛 - Coveralls |
Add `DAEMON_SM_PLUGIN_PATH` environment variable to allow loading plugins from a custom directory. Default value is set to the original path (root dir) This eases Development by allowing to specify the plugins dir in a custom location.
- Retrieve guid value by runtime config or cni-args - Set GUID in pod annotation in either runtime config or cni-args according to provided parameters - Determine wether or on a POD has guid request according to either the existance of infinibandGUID runtime config or guid attribute in cni args
All Prereq have been met. This PR should ideally be split into 2:
|
Update the package to a newer version that contains infiniband-guid runtime config This required to bump up k8s related dependent packages from verison 1.17 to version that support k8s 1.18.3 as its required by the newer network-attach-def-client package
6fe3f75
to
eb7cb0e
Compare
The change was validated and confirmed to be working. |
pkg/daemon/daemon.go
Outdated
@@ -246,7 +248,9 @@ func (d *daemon) AddPeriodicUpdate() { | |||
d.guidPodNetworkMap[allocatedGUID] = podNetworkID | |||
} | |||
|
|||
if err = utils.SetPodNetworkGUID(network, allocatedGUID); err != nil { | |||
// TODO(adrianc): should we just set GUID both in CNI ARGS and runtime config ? |
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.
why it should be both?
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.
i was thinking at the time of a cluster with different versions of ib-sriov cni where some might support infinibandGUID runtime config and some might not, however we should not hide configuration issues here so ill remove this TODO.
pkg/daemon/daemon.go
Outdated
@@ -263,11 +267,12 @@ func (d *daemon) AddPeriodicUpdate() { | |||
pod.Annotations[v1.NetworkAttachmentAnnot] = string(netAnnotations) | |||
} | |||
|
|||
// used GUID as net.HardwareAddress to use it in sm plugin which receive n[]et.HardwareAddress as parameter | |||
// Create a GUID list as net.HardwareAddress to be used it in sm plugin |
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.
I think you can remove the "it"
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.
will remove sure
pkg/daemon/daemon.go
Outdated
guidList = append(guidList, guidAddr.HardWareAddress()) | ||
passedPods = append(passedPods, pod) | ||
} | ||
|
||
// Get configured PKEY for network and Add the relevand POD GUIDs as members of the PKey via Subnet Manager |
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.
s/Add/add
s/relevand/relevant
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
I will also open an issue to deprecate the GUID attribute in ib-sriov-cni so we use only one form |
- Typos and comment changes
we should first:
k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1/types.go
with the new infiniband-guid runtime config. PR 25