Change in vdsm[master]: ip route: parse unreachable routes

danken at redhat.com danken at redhat.com
Mon Dec 8 14:34:28 UTC 2014


Dan Kenigsberg has uploaded a new change for review.

Change subject: ip route: parse unreachable routes
......................................................................

ip route: parse unreachable routes

Currently I do not understand why routes like

    unreachable ::ffff:0.0.0.0/96 dev lo  metric 1024  error -101

show up on my host, but failure to parse them leads to test failures.

Change-Id: Ia0a882aa1b57dc0c7b26095205b884ae9eff0173
Signed-off-by: Dan Kenigsberg <danken at redhat.com>
---
M lib/vdsm/ipwrapper.py
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/71/35971/1

diff --git a/lib/vdsm/ipwrapper.py b/lib/vdsm/ipwrapper.py
index 31affaa..ed00fb7 100644
--- a/lib/vdsm/ipwrapper.py
+++ b/lib/vdsm/ipwrapper.py
@@ -343,6 +343,10 @@
         """
         route = text.split()
 
+        unreachable = route[0] == 'unreachable'
+        if unreachable:
+            route = route[1:]
+
         network = route[0]
         if network == 'local':
             params = route[2:]
@@ -351,6 +355,8 @@
 
         data = dict(params[i:i + 2] for i in range(0, len(params), 2))
         data['network'] = '0.0.0.0/0' if network == 'default' else network
+        if unreachable:
+            data['unreachable'] = True
         return data
 
     @classmethod


-- 
To view, visit http://gerrit.ovirt.org/35971
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia0a882aa1b57dc0c7b26095205b884ae9eff0173
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken at redhat.com>


More information about the vdsm-patches mailing list