Change in vdsm[master]: net: wait for restored devices to be up

danken at redhat.com danken at redhat.com
Mon Jul 6 12:06:17 UTC 2015


Dan Kenigsberg has posted comments on this change.

Change subject: net: wait for restored devices to be up
......................................................................


Patch Set 4:

(2 comments)

https://gerrit.ovirt.org/#/c/43209/4/vdsm/vdsm-restore-net-config
File vdsm/vdsm-restore-net-config:

Line 45: from network import configurators
Line 46: 
Line 47: import pkgutil
Line 48: 
Line 49: _ALL_DEVICES_UP_TIMEOUT = 30
> still needs research
I suspect that 3-5 seconds would be enough bonds to settle. But certainly an little research is needed.
Line 50: 
Line 51: _NETS_RESTORED_MARK = os.path.join(P_VDSM_RUN, 'nets_restored')
Line 52: _VIRTUAL_FUNCTIONS_PATH = os.path.join(CONF_PERSIST_DIR, 'virtual_functions')
Line 53: 


Line 291:     return _ifcfg_predicate(link_name, predicate)
Line 292: 
Line 293: 
Line 294: def _onboot(link_name):
Line 295:     predicate = lambda content: bool(re.search('ONBOOT=(yes|YES)', content))
I think that this "re" is an overkill (and underkill). We care only about Vdsm-written files, which always have lowercase.

And why an underkill? because initscript considers anything other than no/NO as "yes".

Let's check for '^ONBOOT=yes$'.
Line 296:     return _ifcfg_predicate(link_name, predicate)
Line 297: 
Line 298: 
Line 299: def _ifcfg_predicate(link_name, predicate):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3cd3de577e5d0bcf5e87c4894e94e03c209ce76a
Gerrit-PatchSet: 4
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: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list