You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In OpenStack neutron we have a periodic job running with pyroute2 master(currently at commit e106ce4) and since the merge of thread-unsafe branch in master the job started to fail https://bugs.launchpad.net/neutron/+bug/2092567
The failure is related to ip route show not honoring filter flags.
Reproducer:- from pyroute2 import IPRoute ip = IPRoute() routes = ip.route('show', table=255) print("Total routes: %d, Routes List: %s" % (len(routes), [route['table'] for route in routes]))
With master branch it returns:-
Total routes: 20, Routes List: [254, 254, 254, 254, 254, 254, 254, 255, 255, 255, 255, 255, 254, 254, 254, 254, 255, 255, 255, 255]
With 0.8.1 it returns:-
Total routes: 5, Routes List: [255, 255, 255, 255, 255]
Similar applies to other args like family. from pyroute2 import IPRoute ip = IPRoute() routes = ip.route('show', table=255, family=1) print("Total routes: %d, Routes List: %s" % (len(routes), [route['table'] for route in routes]))
With master it returns:-
Total routes: 20, Routes List: [254, 254, 254, 254, 254, 254, 254, 255, 255, 255, 255, 255, 254, 254, 254, 254, 255, 255, 255, 255]
With 0.8.1 it returns:-
Total routes: 0, Routes List: []
with strict_check it slightly differs. from pyroute2 import IPRoute ip = IPRoute(strict_check=True) routes = ip.route('show',table=255, family=1) print("Total routes: %d, Routes List: %s" % (len(routes), [route['table'] for route in routes]))
With master branch it returns:-
Total routes: 9, Routes List: [255, 255, 255, 255, 255, 255, 255, 255, 255]
With 0.8.1 it returns:-
Total routes: 0, Routes List: []
The text was updated successfully, but these errors were encountered:
karelyatin
changed the title
Filter args not honored since pyroute2>0.8.1
[IPRoute] Filter args not honored since pyroute2>0.8.1
Dec 30, 2024
In OpenStack neutron we have a periodic job running with pyroute2 master(currently at commit e106ce4) and since the merge of thread-unsafe branch in master the job started to fail https://bugs.launchpad.net/neutron/+bug/2092567
The failure is related to ip route show not honoring filter flags.
Reproducer:-
from pyroute2 import IPRoute
ip = IPRoute()
routes = ip.route('show', table=255)
print("Total routes: %d, Routes List: %s" % (len(routes), [route['table'] for route in routes]))
With master branch it returns:-
Total routes: 20, Routes List: [254, 254, 254, 254, 254, 254, 254, 255, 255, 255, 255, 255, 254, 254, 254, 254, 255, 255, 255, 255]
With 0.8.1 it returns:-
Total routes: 5, Routes List: [255, 255, 255, 255, 255]
Similar applies to other args like family.
from pyroute2 import IPRoute
ip = IPRoute()
routes = ip.route('show', table=255, family=1)
print("Total routes: %d, Routes List: %s" % (len(routes), [route['table'] for route in routes]))
With master it returns:-
Total routes: 20, Routes List: [254, 254, 254, 254, 254, 254, 254, 255, 255, 255, 255, 255, 254, 254, 254, 254, 255, 255, 255, 255]
With 0.8.1 it returns:-
Total routes: 0, Routes List: []
with strict_check it slightly differs.
from pyroute2 import IPRoute
ip = IPRoute(strict_check=True)
routes = ip.route('show',table=255, family=1)
print("Total routes: %d, Routes List: %s" % (len(routes), [route['table'] for route in routes]))
With master branch it returns:-
Total routes: 9, Routes List: [255, 255, 255, 255, 255, 255, 255, 255, 255]
With 0.8.1 it returns:-
Total routes: 0, Routes List: []
The text was updated successfully, but these errors were encountered: