Change in vdsm[master]: network: wait for udev after configuring SRIOV

nsoffer at redhat.com nsoffer at redhat.com
Fri May 1 12:24:04 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: network: wait for udev after configuring SRIOV
......................................................................


Patch Set 5:

(1 comment)

https://gerrit.ovirt.org/#/c/40400/5/vdsm/network/api.py
File vdsm/network/api.py:

Line 542:         # This is a blocking call that should wait for all udev events to be
Line 543:         # handled. Since those include renaming devices, we should wait until
Line 544:         # udev finishes in order to report a stable hardware state in
Line 545:         # subsequent engine calls.
Line 546:         udevadm.settle(timeout=10)
> If "settle" is not to be used in new code, it must be deprecated, explained
I think the issue is settle not a the right way to wait for events. It work only if the event stream started before you called settle, and it will take more time to process the events, so the queue will not become empty before all events enter it. Udev have no control on the kernel generating the events.

We can use udevadm monitor, but I'm not sure that you get the same control compared with libudev, and error handling may be insufficient like settle, since this is a tool for users, not for programs.

If this issue is urgent, I think we should go with this solution, or slightly improved one like I suggested (see also https://gerrit.ovirt.org/39740), and work on better solution later.
Line 547: 
Line 548: 
Line 549: def _persist_numvfs(device_name, numvfs):
Line 550:     dir_path = os.path.join(constants.P_VDSM_LIB, 'virtual_functions')


-- 
To view, visit https://gerrit.ovirt.org/40400
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I04d63ca35aab585051c3d0a5f2652dbf2f91b080
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list