Skip to content
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

Merged

Conversation

ykulazhenkov
Copy link
Collaborator

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.

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.
Copy link

Thanks for your PR,
To run vendors CIs, Maintainers can use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs, Maintainers can use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 11957819658

Details

  • 40 of 55 (72.73%) changed or added relevant lines in 4 files are covered.
  • 6 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.1%) to 47.144%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/sriov-network-config-daemon/service.go 22 27 81.48%
pkg/host/mock/mock_host.go 0 10 0.0%
Files with Coverage Reduction New Missed Lines %
controllers/helper.go 1 69.6%
controllers/generic_network_controller.go 5 74.38%
Totals Coverage Status
Change from base Build 11931554664: 0.1%
Covered Lines: 7147
Relevant Lines: 15160

💛 - Coveralls

Copy link
Collaborator

@e0ne e0ne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ykulazhenkov
Copy link
Collaborator Author

@SchSeba @zeeke Please, take a look on this PR

// 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))
Copy link
Member

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.

Copy link
Collaborator Author

@ykulazhenkov ykulazhenkov Nov 25, 2024

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

Copy link
Member

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

Copy link
Member

@zeeke zeeke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@e0ne e0ne merged commit 71d2d16 into k8snetworkplumbingwg:master Nov 26, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants