Edward Haas has posted comments on this change.

Change subject: net: remove default route before adding a new one
......................................................................


Patch Set 3: Code-Review-1

(2 comments)

https://gerrit.ovirt.org/#/c/63220/3/lib/vdsm/network/ip/address.py
File lib/vdsm/network/ip/address.py:

Line 197: def _add_ipv6_address(iface, ipv6):
Line 198:     if ipv6.address:
Line 199:         ipv6addr, ipv6netmask = ipv6.address.split('/')
Line 200:         ipwrapper.addrAdd(iface, ipv6addr, ipv6netmask, family=6)
Line 201:         if ipv6.gateway:
What about ipv6.defaultRoute ?
Line 202:             _set_default_route(ipv6.gateway, family=6, dev=iface)
Line 203:     if ipv6.ipv6autoconf is not None:
Line 204:         with open('/proc/sys/net/ipv6/conf/%s/autoconf' % iface,
Line 205:                   'w') as ipv6_autoconf:


Line 212:         ipwrapper.routeAdd(['default', 'via', gateway], 
family=family, dev=dev)
Line 213:     except ipwrapper.IPRoute2Error:  # there already is a default 
route
Line 214:         ipwrapper.routeDel('default', family=family)
Line 215:         logging.warning(
Line 216:             'Existing default route was removed so a new one can be 
set.')
Better move it before the action, so we can see it in case the action fails.
Line 217:         ipwrapper.routeAdd(['default', 'via', gateway], 
family=family, dev=dev)
Line 218: 
Line 219: 
Line 220: def flush(iface, family='both'):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie59c07845898630404ce517e5cc52048e50ed2dd
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phora...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Edward Haas <edwa...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček <phora...@redhat.com>
Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org

Reply via email to