-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add bmpcfgd for monitoring config_db state change. #18940
Conversation
/azp run Azure.sonic-buildimage |
Command 'Azure.sonic-buildimage' is not supported by Azure Pipelines. Supported commands
See additional documentation. |
Commenter does not have sufficient privileges for PR 18940 in repo sonic-net/sonic-buildimage |
subprocess.call(["service", "openbmpd", "start"]) | ||
|
||
|
||
class BMPCfgDaemon: |
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.
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 daemon should be running in each bmp container, each bmp container will have 1 bmpcfgd + 1 openbmpd.
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.
LGTM
src/sonic-bmpcfgd/scripts/bmpcfgd
Outdated
self.config_db.connect(wait_for_init=True, retry_on=True) | ||
self.bmpcfg = BMPCfg(self.state_db_conn) | ||
except KeyError as error: | ||
self.log_error( |
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.
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.
updated without try/catch.
src/sonic-bmpcfgd/scripts/bmpcfgd
Outdated
|
||
class BMPCfgDaemon: | ||
def __init__(self): | ||
try: |
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.
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.
Rethink about this, we should not need try/catch in init flow, any exception should terminate and propagate the call stack, updated code.
#### Why I did it sonic-net/SONiC#1621, need dedicated daemon to monitor config_db and manage openbmpd state. #### How I did it Use swss-common lib to monitor config_db change.
Why I did it
sonic-net/SONiC#1621, need dedicated daemon to monitor config_db and manage openbmpd state.
Work item tracking
How I did it
Use swss-common lib to monitor config_db change.
How to verify it
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)