Skip to content
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

bfd-topo1: add basic topology test for bfdd #96

Merged
merged 4 commits into from
Sep 25, 2018

Conversation

rzalamena
Copy link
Member

This PR implements a topology test for the new bfdd daemon ( FRRouting/frr#2294 ).

The following tests are done:

  • Validate that BFD peers connect and properly detect neighbors configurations;
  • BGP connects and redistribute prefixes;
  • BFD status changes when a link fails;
  • BGP converges quickly after the link failure;

@NetDEF-CI

This comment has been minimized.

@NetDEF-CI

This comment has been minimized.

@NetDEF-CI

This comment has been minimized.

@louberger
Copy link
Member

@rzalamena can you rebase when you have the chance

if tgen.routers_have_failure():
pytest.skip(tgen.errors)

topotest.sleep(2, 'waiting for bfd peers to go up')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of sleep dependent tests -- sleep interval may vary in different test environments or even run to run in the same environment. Better to pool for a result with a max allowed time.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be a problem the BFD protocol converges in less than a second, that was added as a safety mesure but probably not needed. If it takes more than 3 seconds then bfdd already failed.

It seems that recording the time taken for a function is a repeating pattern that we should think about implementing in topotests/topogen.

if tgen.routers_have_failure():
pytest.skip(tgen.errors)

topotest.sleep(5, 'waiting for bgp peers to go up')
Copy link
Member

@louberger louberger Jul 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above, why is this sleep needed given that run_and_expect is used?


# Wait the minimum time we can before checking that BGP/BFD
# converged.
topotest.sleep(1, 'waiting for BFD to converge')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment wrt sleep

Copy link
Member

@louberger louberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rebase is needed. Would prefer sleeps removed as mentioned in specific comments - but this is a 'non-blocking;' comment.

@rzalamena
Copy link
Member Author

@louberger
rebase is needed. Would prefer sleeps removed as mentioned in specific comments - but this is a 'non-blocking;' comment.

I rebased the branch, but I'll fix the sleep as next thing. I'm thinking about something to record the time taken to converge and I'll come back later.

Thanks for the review!

@rzalamena rzalamena added the WIP label Jul 31, 2018
@NetDEF-CI

This comment has been minimized.

@NetDEF-CI

This comment has been minimized.

@NetDEF-CI

This comment has been minimized.

@NetDEF-CI

This comment has been minimized.

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-TOPOPR-328/

This is a comment from an EXPERIMENTAL automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-TOPOPR-329/

This is a comment from an EXPERIMENTAL automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

@donaldsharp
Copy link
Member

@louberger is this fixed to your satisfaction now?

Copy link
Member

@mwinter-osr mwinter-osr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Ready to merge after Lou approves changes

Allow BFDd to be configured and used.

Signed-off-by: Rafael Zalamena <[email protected]>
Test if BFD peers have found each other and if the BGP neighors have
connected.

Signed-off-by: Rafael Zalamena <[email protected]>
Test that after a link goes down BGPd will be notified and recovered
quickly. Also test that BFD show command tells us that the peer went
down.

Signed-off-by: Rafael Zalamena <[email protected]>
Import the graphviz file and the generated picture.

Signed-off-by: Rafael Zalamena <[email protected]>
@rzalamena
Copy link
Member Author

Rebased with master. FRR also has bfdd in master as well.

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-TOPOPR-356/

This is a comment from an EXPERIMENTAL automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

@louberger louberger merged commit eadd2ba into FRRouting:master Sep 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants