Ido Barkan has posted comments on this change.

Change subject: network: wait for a bridge to appear before disabling IPv6 on it
......................................................................


Patch Set 1: Code-Review-1

(3 comments)

nits mostly. In general it looks excellent.

https://gerrit.ovirt.org/#/c/43583/1/vdsm/network/configurators/__init__.py
File vdsm/network/configurators/__init__.py:

Line 180:         raise ConfigNetworkError(ERR_FAILED_IFUP, 'dhclient%s failed',
Line 181:                                  family)
Line 182: 
Line 183: 
Line 184: def wait_for_bridge(name, timeout=1):
is this function specific to a bridge? I think it can operate on any device. 
"wait_for_device"?
Line 185:     """
Line 186:     Wait for a bridge to appear in a given timeout. If the bridge is 
not
Line 187:     created by then, raise a ConfigNetworkError.
Line 188:     """


Line 187:     created by then, raise a ConfigNetworkError.
Line 188:     """
Line 189:     with monitor.Monitor(timeout=timeout, groups=('link',),
Line 190:                          silent_timeout=True) as mon:
Line 191:         if name in netinfo.bridges():
Can you short-circuit before creating the monitor? Or it is a potential race?
Line 192:             return
Line 193:         for event in mon:
Line 194:             if event.get('name') == name and event.get('event') == 
'new_link':
Line 195:                 return


Line 192:             return
Line 193:         for event in mon:
Line 194:             if event.get('name') == name and event.get('event') == 
'new_link':
Line 195:                 return
Line 196:     raise ConfigNetworkError(ERR_FAILED_IFUP, 'Bridge %s was not 
created '
device


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5292e5a297ff50a0e82ba0781333e21fd9dd7f3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvob...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Ido Barkan <ibar...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček <phora...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to