-
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
Add waitForDevicesInitialization to systemd service #808
base: master
Are you sure you want to change the base?
Add waitForDevicesInitialization to systemd service #808
Conversation
This function ensures that the network devices specified in the configuration are registered and handled by UDEV. Sometimes, the initialization of network devices might take a significant amount of time, and the sriov-config systemd service may start before the devices are fully processed, leading to failure.
Thanks for your PR,
To skip the vendors CIs, Maintainers can use one of:
|
Pull Request Test Coverage Report for Build 11957819658Details
💛 - Coveralls |
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
// The command watches the udev event queue, and exits if all current events are handled. | ||
func (u *udev) WaitUdevEventsProcessed(timeout int) error { | ||
log.Log.V(2).Info("WaitUdevEventsProcessed()") | ||
_, stderr, err := u.utilsHelper.RunCommand("udevadm", "settle", "-t", strconv.Itoa(timeout)) |
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.
Is this supposed to run in the host chroot? I tried running it in the config-daemon pod:
[root@cnfdr22 /]# udevadm settle -t 10
Running in chroot, ignoring request.
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.
Currently this function will never run inside the daemon Pod. The function is executed by the sriov-config
and sriov-config-post-networking
systemd services on boot. When running as a part of systemd service the functions have direct access to the host's tools and there is no need to use chroot
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.
Got it, I wrongly thought the systemd service was running the config-daemon via podman run ...
.
thanks for explaining
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
Add waitForDevicesInitialization to systemd service.
This function ensures that the network devices specified in the configuration are registered and handled by UDEV. Sometimes, the initialization of network devices might take a significant amount of time, and the sriov-config systemd service may start before the devices are fully processed, leading to failure.