-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: multiple OSPF routers connected to a single switch #14708
tests: multiple OSPF routers connected to a single switch #14708
Conversation
I created this pull request to support the following issue report: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- https://github.com/FRRouting/frr/blob/master/doc/developer/topotests.rst (^f + "RFC 5737")
- Please drop incorrect comment symbols from frr.conf
ip address 120.0.0.1/24 | ||
ip ospf network point-to-multipoint | ||
ip ospf area 0.0.0.0 | ||
#ip ospf prefix-suppression |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect comment symbol for vtysh, use !.
@@ -0,0 +1,19 @@ | |||
! | |||
hostname r1 | |||
log file /tmp/r1-frr.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed.
@@ -0,0 +1,19 @@ | |||
! | |||
hostname r2 | |||
log file /tmp/r2-frr.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
ip address 120.0.0.2/24 | ||
ip ospf network point-to-multipoint | ||
ip ospf area 0.0.0.0 | ||
#ip ospf prefix-suppression |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
@@ -0,0 +1,19 @@ | |||
! | |||
hostname r3 | |||
log file /tmp/r3-frr.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
sys.path.append(os.path.join(CWD, "../")) | ||
|
||
# Required to instantiate the topology builder class. | ||
pytestmark = [pytest.mark.ospfd, pytest.mark.bgpd] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bgpd is not needed here
|
||
# networks advertised by each router and the expected next hops | ||
networks = { | ||
"r1": ("10.0.1.0/24", "120.0.0.1"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please use IPv4 documentation ranges or private ranges instead of 120...?
check_route(router_orig, network[0], network[1]) | ||
|
||
|
||
def check_route(router_name, network, expected_nexthop): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't this be replaced to our existing function verify_rib()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the functions verify_rib() and verify_ospf_rib(), but they don't do what is required. They only check the presence of the expected route, but they don't check if they are active. As a result, they succeed in cases where check_route() fails. For now, I am leaving verify_rib(), verify_ospf_rib(), and check_route().
), f"{router_name} (ospfd): no route {network} via {expected_nexthop}\n{dump_routes(router)}" | ||
|
||
address = network.split("/")[0] | ||
route = router.run(f"ip route get {address}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use ip -j route ...
, it's easier to parse.
), f"{router_name} (kernel): no route {address} via {expected_nexthop}\n{dump_routes(router)}" | ||
|
||
|
||
def dump_routes(router): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think verify_rib() gives enough details when failing, I doubt this is useful to have.
A large set of routers are connected to the same switch. Each router shares a single network. All shared networks must be reachable from all routers. Signed-off-by: "Adriano Marto Reis" <[email protected]>
5f9e6b5
to
3ed36c6
Compare
This is the pull request that fixes the problem uncovered here. Should I cherry-pick the changes into the current pull request? |
Oh, I've just realized this is based on dev/9.1. It should be based on the master branch. Why is this for dev/9.1? |
I created this pull request to demonstrate the issue #14709, which is present in dev/9.1 but not in the master branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks okay other than existing comments ...
@adrianomarto we need to find the commit that needs to be backported to 9.1 then instead. |
This is the commit that fixed the issue in the master branch: commit a272a2b |
Tests a large set of OSPF routers connected to the same switch. Each router shares a single network. All shared networks must be reachable from all routers. I don't expect the CI to succeed on dev/9.1 (at least until the issue is fixed).