Ondřej Svoboda has uploaded a new change for review. Change subject: iproute2: Try to remove all dynamic routes even if removal of one fails ......................................................................
iproute2: Try to remove all dynamic routes even if removal of one fails When trying to remove a non-existent route (or is its table gone?) iproute2 fails (retcode=2) with RTNETLINK answers: No such process for a reason currently unknown. In this draft, deal with routes first, i.e. use the same try-except block as in the caller, DynamicSourceRoute.remove(). But I think even the removal of individual rules should be wrapped this way, in which case the try-except block could be removed in the caller. Change-Id: I6e63d5ceba72be91fdab5ffd9a71ceab398950b9 Signed-off-by: Ondřej Svoboda <[email protected]> --- M vdsm/network/configurators/iproute2.py 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/52/36652/1 diff --git a/vdsm/network/configurators/iproute2.py b/vdsm/network/configurators/iproute2.py index ed2dab5..700042c 100644 --- a/vdsm/network/configurators/iproute2.py +++ b/vdsm/network/configurators/iproute2.py @@ -213,7 +213,11 @@ @staticmethod def removeSourceRoute(routes, rules, device): for route in routes: - routeDel(route) + try: + routeDel(route) + except IPRoute2Error as e: + logging.error('ip binary failed during source route ' + 'removal: %s', e.message) for rule in rules: ruleDel(rule) -- To view, visit http://gerrit.ovirt.org/36652 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6e63d5ceba72be91fdab5ffd9a71ceab398950b9 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ondřej Svoboda <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
