-
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
Improve the virtual plugin support #262
Improve the virtual plugin support #262
Conversation
Thanks for your PR,
To skip the vendors CIs use one of:
|
example:
|
/cc @atyronesmith |
315b4be
to
375a490
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
|
||
return names[0] | ||
} | ||
|
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 make this return an error instead of calling glog
and handle that error in CreateOpenstackDevicesInfo
?
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.
@bn222 sorry I was not able to understand you will like this function to return (string,error) and just change
if name := tryToGetVirtualInterfaceName(device.Address); name != "" {
to
if name,error := tryToGetVirtualInterfaceName(device.Address); err != nil {
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.
Yes, that's correct.
pkg/daemon/writer.go
Outdated
return &utils.InitialState, nil | ||
} | ||
|
||
func (w *NodeStateStatusWriter) createCleanUpServiceIfNeeded() 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.
Do you want this to work on RHCOS nodes? I think we need to use MCO to inject the systemd service for RHCOS nodes.
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.
Hi @pliurh I test this one also on RHCOS and it's working the service is created.
another option will be for the sriov operator to create this system service always for masters and workers pools is that a valid solution?
375a490
to
df4f8f4
Compare
rebased on master |
Thanks for your PR,
To skip the vendors CIs use one of:
|
LGTM |
df4f8f4
to
38612c9
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
38612c9
to
b76e3b8
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
b76e3b8
to
d436eff
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
@pliurh can you please have a look? I change the location of the initial file to be in /tmp on the host file system as requested. this way the file we get removed after every reboot without the need of a system service |
@@ -21,4 +21,4 @@ data: | |||
Broadcom_bnxt_BCM57414_2x25G: "14e4 16d7 16dc" | |||
Broadcom_bnxt_BCM75508_2x100G: "14e4 1750 1806" | |||
Qlogic_qede_QL45000_50G: "1077 1654 1664" | |||
|
|||
Red_Hat_Virtio_network_device: "1af4 1000 1000" |
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 also add to:
https://github.com/openshift/sriov-network-operator/blob/master/manifests/stable/supported-nic-ids_v1_configmap.yaml (once we backport 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.
can you clarify on the 1000 I see it configured as 0000
https://github.com/k8snetworkplumbingwg/sriov-network-operator/pull/271/files#r839536286
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 will add it when I rebase the openshift repo base on this PR.
The deviceID is 1000 I checked it again
Thanks for your PR,
To skip the vendors CIs use one of:
|
for key := range utils.PlatformMap { | ||
if strings.Contains(strings.ToLower(node.Spec.ProviderID), strings.ToLower(key)) && sriovnetworkv1.IsVfSupportedModel(iface.Vendor, iface.DeviceID) { | ||
if strings.Contains(strings.ToLower(node.Spec.ProviderID), strings.ToLower(key)) && | ||
selector.NetFilter != "" && selector.NetFilter == iface.NetFilter && |
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.
Nice!
LGTM |
@@ -0,0 +1,17 @@ | |||
contents: | |
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.
We don't need this systemd service anymore, do we?
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.
right! done
pkg/daemon/writer.go
Outdated
) | ||
|
||
const ( | ||
CheckpointFileName = "sno-initial-node-state.json" | ||
CheckpointFileName = "sno-initial-node-state.json" | ||
InitialConfigurationResetUnitFile = "bindata/manifests/config-units/initial-config-reset.yaml" |
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.
ditto
pkg/daemon/writer.go
Outdated
glog.V(0).Infof("Run(): start writer") | ||
msg := Message{} | ||
|
||
var err error | ||
if runonce { |
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.
What about refactoring this if-body to a different function and getting rid of the runonce
parameters?
lgtm |
This commit add the support for virtio interfaces like vhostuser for openstack virtual workers. implementation details: * on first run (after a reboot) we get all the information we need when the devices are visible to the kernel * we match the mac address to the openstack network ID * if the sriov-network-config-daemon gets reboot it will use the initial file on the node so even if the nics are in vfio the node state will be right move the operator initial state file to /tmp on the host so it will get deleted on every reboot to support nic changes both for virtual and BM environments Signed-off-by: Sebastian Sch <[email protected]>
Signed-off-by: Sebastian Sch <[email protected]>
33ec717
to
5243dc1
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
pkg/daemon/writer.go
Outdated
return err | ||
} | ||
} else { | ||
devicesInfo := make(utils.OSPDevicesInfo) |
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: can we move this logic to: utils.CreateOpenstackDevicesInfoFromNodeStatus(ns)
or similar ?
/lgtm |
this script is gathering the following: * openshift-sriov-network-operator namespace. * the following resources: - sriovnetworknodepolicies. - sriovnetworknodestates. - sriovnetworkpoolconfigs. - sriovnetworks. - sriovoperatorconfigs. - sriovibnetworks. * the following logs from the sriov-config-daemon: - /etc/sno-initial-node-state.json. (*) - /proc/cmdline. - dmseg. - ip link. - var/multus.log (if exists). - netns and output of `ip a` fron every ns. - NIC firmware and driver from ethtool. (*) Need to update the path to /tmp/sno-initial-node-state.json after: k8snetworkplumbingwg/sriov-network-operator#262
this script is gathering the following: * openshift-sriov-network-operator namespace. * the following resources: - sriovnetworknodepolicies. - sriovnetworknodestates. - sriovnetworkpoolconfigs. - sriovnetworks. - sriovoperatorconfigs. - sriovibnetworks. * the following logs from the sriov-config-daemon: - /etc/sno-initial-node-state.json. (*) - /proc/cmdline. - dmseg. - ip link. - var/multus.log (if exists). - netns and output of `ip a` fron every ns. - NIC firmware and driver from ethtool. (*) Need to update the path to /tmp/sno-initial-node-state.json after: k8snetworkplumbingwg/sriov-network-operator#262
this script is gathering the following: * openshift-sriov-network-operator namespace. * the following resources: - sriovnetworknodepolicies. - sriovnetworknodestates. - sriovnetworkpoolconfigs. - sriovnetworks. - sriovoperatorconfigs. - sriovibnetworks. * the following logs from the sriov-config-daemon: - /etc/sno-initial-node-state.json. (*) - /proc/cmdline. - dmseg. - ip link. - var/multus.log (if exists). - netns and output of `ip a` fron every ns. - NIC firmware and driver from ethtool. (*) Need to update the path to /tmp/sno-initial-node-state.json after: k8snetworkplumbingwg/sriov-network-operator#262
we can't run the udev rule on virtual environments because all the nics in that type of deployment will be presented as VFs. this means that we are going to disable nics on the machine itself Signed-off-by: Sebastian Sch <[email protected]>
5243dc1
to
346de67
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
@adrianchiris done can you make another round please :) |
/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
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.
was accidently logged in as npwg-robot :) LGTM
I merged this.
This commit add the support for virtio interfaces like vhostuser for openstack virtual workers.
implementation details:
Signed-off-by: Sebastian Sch [email protected]