-
Notifications
You must be signed in to change notification settings - Fork 108
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
Replace deprecated and obsoleted IPDB
with NDB
#758
Closed
gab-arrobo
wants to merge
27
commits into
omec-project:master
from
gab-arrobo:replace-deprecated-ipdb
Closed
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
3a22664
Replace deprecated `IPDB` with `NDB`
gab-arrobo 16cc53a
Merge branch 'master' into replace-deprecated-ipdb
gab-arrobo 5664b7b
Update test file
gab-arrobo 1a4a15f
Apply suggestions from code review
gab-arrobo 526d168
Use get method
gab-arrobo e656a2e
Merge branch 'master' into replace-deprecated-ipdb
gab-arrobo 7c696da
Merge branch 'omec-project:master' into replace-deprecated-ipdb
gab-arrobo 16f68db
No need to register callbacks because NDB continuously monitors the s…
gab-arrobo 55de595
Merge branch 'omec-project:master' into replace-deprecated-ipdb
gab-arrobo 2e05e4f
Merge branch 'omec-project:master' into replace-deprecated-ipdb
gab-arrobo 094e687
Partially address issue with registrer_handler
gab-arrobo 56b95ba
Update route control script. Still need to address issue with `core` …
gab-arrobo 0982fb7
Merge branch 'omec-project:master' into replace-deprecated-ipdb
gab-arrobo 25b1a1d
Merge branch 'omec-project:master' into replace-deprecated-ipdb
gab-arrobo 1da2ecd
Merge branch 'omec-project:master' into replace-deprecated-ipdb
gab-arrobo a390989
Merge branch 'omec-project:master' into replace-deprecated-ipdb
gab-arrobo 824ed04
Merge branch 'omec-project:master' into replace-deprecated-ipdb
gab-arrobo 6b7b490
Merge branch 'omec-project:master' into replace-deprecated-ipdb
gab-arrobo 33c5cbd
Merge branch 'omec-project:master' into replace-deprecated-ipdb
gab-arrobo 5ff4806
Merge branch 'omec-project:master' into replace-deprecated-ipdb
gab-arrobo 011dd93
Merge branch 'omec-project:master' into replace-deprecated-ipdb
gab-arrobo a31d6fa
Merge branch 'omec-project:master' into replace-deprecated-ipdb
gab-arrobo 68e9893
Merge branch 'omec-project:master' into replace-deprecated-ipdb
gab-arrobo 690531e
Merge branch 'omec-project:master' into replace-deprecated-ipdb
gab-arrobo 748412e
Merge branch 'omec-project:master' into replace-deprecated-ipdb
gab-arrobo c035ec0
Merge branch 'omec-project:master' into replace-deprecated-ipdb
gab-arrobo 5cde3ce
Merge branch 'omec-project:master' into replace-deprecated-ipdb
gab-arrobo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 callback was the way that routectl was notified that a new mac address was added to the arp table so that it could configure BESS. I do not see a replacement for this.
When routectl starts, it will look for the mac address of the access gateway and core gateway, and if they are not present, it is sending pings out in the background. The mac address will be added to the arp table in the background. We need to either get notified of the change, or do some kind of polling.
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.
Correct, that is because the way
IPDB
works. However, withNDB
, that should not be needed as indicated here (also below):Moreover, as indicated here, NDB does NOT have a
register_callback
method and when I was trying to use the method indicated in the issue (ndb.register_handler()
), I got an error. I am currently running some testsThere 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.
But will we react to those changes even if they are monitored by NDB?
And if it is the case that we don't need to register callbacks anymore then we probably could remove
_netlink_event_listener
.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.
It looks like the
register_handler()
is needed because when running the UPF as part of AiaB, the E2E fails. I am planning to add theregister_handler()
and run some tests.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.
When using
regsiter_handler()
, I get an error message saying "AttributeError: 'NDB' object has no attribute 'register_handler'"Click me to see routectl logs
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.
It seems like
register_handler
is now part of the classTaskManager
. Here.And I see it being called in some places of the
ndb
code asself.ndb.task_manager.register_handler(<event>, <handler>)
Like here.
And it seems to me as if
register_handler
has been wrapped into TmpHandlerAnd it is used here in ndb objects to register handlers too.
I didn't go into details to understand how it works so I'm not sure if we can leverage
TmpHandler
or ndb objects, or if we should use the function directly and for some reason I'm unable to access the docs on https://docs.pyroute2.org.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 took a look at it and it seems really poorly documented.
TaskManager
andTmpHandler
are not mentioned at all in the documentation.TaskManager
is a public attribute ofNDB
, so I think it would be reasonable to use it, but we would have to test it out.Another approach we could take is to create a polling thread in
routectl
(or reuse the pinging thread) to trigger the BESS configuration when the MAC address is present.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.
Using the
task_manager
, then theregister_handler
works as expected and the pipeline for the N3 (access) interface is completed. However, the pipeline for the N6 (core) interface is still incomplete.