Change in vdsm[master]: vdsm-restore-net-config: wait for links with netlink monitor

edwardh at redhat.com edwardh at redhat.com
Thu Feb 25 15:23:58 UTC 2016


Edward Haas has posted comments on this change.

Change subject: vdsm-restore-net-config: wait for links with netlink monitor
......................................................................


Patch Set 3: Code-Review-1

(1 comment)

https://gerrit.ovirt.org/#/c/53968/3/vdsm/vdsm-restore-net-config
File vdsm/vdsm-restore-net-config:

Line 319:             available_bonds[bond]['nics'] = available_bond_nics
Line 320:     return available_bonds
Line 321: 
Line 322: 
Line 323: def _wait_for_all_devices_up(links):
I think you need to continue checking 'mon' in a loop until either all links come up or a timeout event occurs.
Not sure why you directly stop mon, it is stooped when exiting the context manager.

And IMO, I think that you should check for links down twice, once before the monitoring (why create an mon object if not needed), and a second time after the monitor has been activated as you have done.
Line 324:     try:
Line 325:         with monitor.Monitor(groups=('link',), timeout=5) as mon:
Line 326:             down_links = _get_links_with_state_down(links)
Line 327:             logging.debug("waiting for %s to be up.", down_links)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1c45430925a55bb54995b91a061bc15affe15763
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list