-
Notifications
You must be signed in to change notification settings - Fork 580
[portsyncd]: Store eth0 oper status into state DB #630
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
Merged
Conversation
This file contains hidden or 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
qiluo-msft
reviewed
Sep 28, 2018
qiluo-msft
reviewed
Sep 28, 2018
qiluo-msft
reviewed
Sep 28, 2018
qiluo-msft
reviewed
Sep 28, 2018
qiluo-msft
requested changes
Sep 28, 2018
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.
As comments
qiluo-msft
reviewed
Sep 28, 2018
qiluo-msft
reviewed
Sep 28, 2018
qiluo-msft
approved these changes
Sep 28, 2018
portsyncd listens to the netlink messages. In order for SNMP to get the current oper status of the managemnt interface, portsyncd will store eth0 oper status explicitly into the state database. Signed-off-by: Shu0T1an ChenG <[email protected]>
qiluo-msft
pushed a commit
that referenced
this pull request
Oct 1, 2018
portsyncd listens to the netlink messages. In order for SNMP to get the current oper status of the managemnt interface, portsyncd will store eth0 oper status explicitly into the state database.
EdenGri
pushed a commit
to EdenGri/sonic-swss
that referenced
this pull request
Feb 28, 2022
oleksandrivantsiv
pushed a commit
to oleksandrivantsiv/sonic-swss
that referenced
this pull request
Mar 1, 2023
sonic-net#624)" (sonic-net#630) This reverts commit 2772f15.
SuvarnaMeenakshi
added a commit
to SuvarnaMeenakshi/sonic-swss
that referenced
this pull request
Jan 8, 2025
in PR sonic-net#630 Signed-off-by: Suvarna Meenakshi <[email protected]>
rlhui
pushed a commit
that referenced
this pull request
Jan 10, 2025
Currently operational status of mgmt interface is not present or correct for multi-asic devices. Why I did it Initial PR that added mgmt oper status feature in swss: #630 sonic-net/sonic-buildimage#21245 adds a script to update oper status of management interface periodically. In doing so, we no longer need to update oper status of mgmt interface in swss. --------- Signed-off-by: Suvarna Meenakshi <[email protected]>
mssonicbld
added a commit
to mssonicbld/sonic-swss.msft
that referenced
this pull request
Jan 10, 2025
<!-- Please make sure you have read and understood the contribution guildlines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md 1. Make sure your commit includes a signature generted with `git commit -s` 2. Make sure your commit title follows the correct format: [component]: description 3. Make sure your commit message contains enough details about the change and related tests 4. Make sure your pull request adds related reviewers, asignees, labels Please also provide the following information in this pull request: --> **What I did** Issue to be fix: Currently operational status of mgmt interface is not present or correct for multi-asic devices. **Why I did it** Initial PR that added mgmt oper status feature in swss: sonic-net/sonic-swss#630 sonic-net/sonic-buildimage#21245 adds a script to update oper status of management interface periodically. In doing so, we no longer need to update oper status of mgmt interface in swss. **How I verified it** Verified on single-asic platform 1. verified on single-asic platform and multi-asic Chassis platfrom. Single ASIC Arista device verification along with sonic-net/sonic-buildimage#21245 changes Ran the below bash script to verify the state of STATE_DB: MGMT_OPER_STATUS table and also execute config_reload, verify if STATE_DB is flushed out and repopulated after monit starts periodic script. ``` #!/bin/bash CUR_STATUS=`sonic-db-cli STATE_DB hgetall "MGMT_PORT_TABLE|eth0"` echo "current status in STATE_DB is $CUR_STATUS :: expected to have up state" snmp_result=`docker exec snmp snmpwalk -v2c -c <comm> <IP> 1.3.6.1.2.1.2.2.1.8.10000` echo "snmp result before config reload 5min $snmp_result :: expected to have 1 in snmp result" sudo config reload -y CUR_STATUS=`sonic-db-cli STATE_DB hgetall "MGMT_PORT_TABLE|eth0"` echo "current status in STATE_DB after config_reload is $CUR_STATUS :: expected to have empty" # sleep for snmp to start sleep 60 snmp_result=`docker exec snmp snmpwalk -v2c -c <comm> <IP> 1.3.6.1.2.1.2.2.1.8.10000` echo "snmp result after config reload $snmp_result :: expected to return error since STATE_DB is not yet populated" # monit will populate mgmt oper status after each 5min cycle sleep 240 CUR_STATUS=`sonic-db-cli STATE_DB hgetall "MGMT_PORT_TABLE|eth0"` echo "current status in STATE_DB after config_reload after 5min $CUR_STATUS :: expected to have up state" snmp_result=`docker exec snmp snmpwalk -v2c -c <comm> <IP> 1.3.6.1.2.1.2.2.1.8.10000` echo "snmp result after config reload after 5min $snmp_result :: expected to have 1 in snmp result" ``` Result of above script: ``` current status in STATE_DB is {'oper_status': 'up'} :: expected to have up state snmp result before config reload 5min iso.3.6.1.2.1.2.2.1.8.10000 = INTEGER: 1 :: expected to have 1 in snmp result Acquired lock on /etc/sonic/reload.lock Disabling container and routeCheck monitoring ... Stopping SONiC target ... Running command: /usr/local/bin/sonic-cfggen -j /etc/sonic/init_cfg.json -j /etc/sonic/config_db.json --write-to-db Running command: /usr/local/bin/db_migrator.py -o migrate Running command: /usr/local/bin/sonic-cfggen -d -y /etc/sonic/sonic_version.yml -t /usr/share/sonic/templates/sonic-environment.j2,/etc/sonic/sonic-environment Restarting SONiC target ... Enabling container and routeCheck monitoring ... Reloading Monit configuration ... Reinitializing monit daemon Released lock on /etc/sonic/reload.lock current status in STATE_DB after config_reload is {} :: expected to have empty snmp result after config reload iso.3.6.1.2.1.2.2.1.8.10000 = No Such Object available on this agent at this OID :: expected to return error since STATE_DB is not yet populated current status in STATE_DB after config_reload after 5min {'oper_status': 'up'} :: expected to have up state snmp result after config reload after 5min iso.3.6.1.2.1.2.2.1.8.10000 = INTEGER: 1 :: expected to have 1 in snmp result ``` **Details if related**
arlakshm
added a commit
to Azure/sonic-swss.msft
that referenced
this pull request
Jan 10, 2025
What I did Issue to be fix: Currently operational status of mgmt interface is not present or correct for multi-asic devices. Why I did it Initial PR that added mgmt oper status feature in swss: sonic-net/sonic-swss#630 sonic-net/sonic-buildimage#21245 adds a script to update oper status of management interface periodically. In doing so, we no longer need to update oper status of mgmt interface in swss. How I verified it Verified on single-asic platform verified on single-asic platform and multi-asic Chassis platfrom. Single ASIC Arista device verification along with Add script to periodically update oper status of management interface sonic-net/sonic-buildimage#21245 changes Ran the below bash script to verify the state of STATE_DB: MGMT_OPER_STATUS table and also execute config_reload, verify if STATE_DB is flushed out and repopulated after monit starts periodic script. #!/bin/bash CUR_STATUS=`sonic-db-cli STATE_DB hgetall "MGMT_PORT_TABLE|eth0"` echo "current status in STATE_DB is $CUR_STATUS :: expected to have up state" snmp_result=`docker exec snmp snmpwalk -v2c -c <comm> <IP> 1.3.6.1.2.1.2.2.1.8.10000` echo "snmp result before config reload 5min $snmp_result :: expected to have 1 in snmp result" sudo config reload -y CUR_STATUS=`sonic-db-cli STATE_DB hgetall "MGMT_PORT_TABLE|eth0"` echo "current status in STATE_DB after config_reload is $CUR_STATUS :: expected to have empty" # sleep for snmp to start sleep 60 snmp_result=`docker exec snmp snmpwalk -v2c -c <comm> <IP> 1.3.6.1.2.1.2.2.1.8.10000` echo "snmp result after config reload $snmp_result :: expected to return error since STATE_DB is not yet populated" # monit will populate mgmt oper status after each 5min cycle sleep 240 CUR_STATUS=`sonic-db-cli STATE_DB hgetall "MGMT_PORT_TABLE|eth0"` echo "current status in STATE_DB after config_reload after 5min $CUR_STATUS :: expected to have up state" snmp_result=`docker exec snmp snmpwalk -v2c -c <comm> <IP> 1.3.6.1.2.1.2.2.1.8.10000` echo "snmp result after config reload after 5min $snmp_result :: expected to have 1 in snmp result" Result of above script: current status in STATE_DB is {'oper_status': 'up'} :: expected to have up state snmp result before config reload 5min iso.3.6.1.2.1.2.2.1.8.10000 = INTEGER: 1 :: expected to have 1 in snmp result Acquired lock on /etc/sonic/reload.lock Disabling container and routeCheck monitoring ... Stopping SONiC target ... Running command: /usr/local/bin/sonic-cfggen -j /etc/sonic/init_cfg.json -j /etc/sonic/config_db.json --write-to-db Running command: /usr/local/bin/db_migrator.py -o migrate Running command: /usr/local/bin/sonic-cfggen -d -y /etc/sonic/sonic_version.yml -t /usr/share/sonic/templates/sonic-environment.j2,/etc/sonic/sonic-environment Restarting SONiC target ... Enabling container and routeCheck monitoring ... Reloading Monit configuration ... Reinitializing monit daemon Released lock on /etc/sonic/reload.lock current status in STATE_DB after config_reload is {} :: expected to have empty snmp result after config reload iso.3.6.1.2.1.2.2.1.8.10000 = No Such Object available on this agent at this OID :: expected to return error since STATE_DB is not yet populated current status in STATE_DB after config_reload after 5min {'oper_status': 'up'} :: expected to have up state snmp result after config reload after 5min iso.3.6.1.2.1.2.2.1.8.10000 = INTEGER: 1 :: expected to have 1 in snmp result
shiraez
pushed a commit
to Marvell-switching/sonic-swss
that referenced
this pull request
Feb 17, 2025
Currently operational status of mgmt interface is not present or correct for multi-asic devices. Why I did it Initial PR that added mgmt oper status feature in swss: sonic-net#630 sonic-net/sonic-buildimage#21245 adds a script to update oper status of management interface periodically. In doing so, we no longer need to update oper status of mgmt interface in swss. --------- Signed-off-by: Suvarna Meenakshi <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
portsyncd listens to the netlink messages. In order for SNMP
to get the current oper status of the managemnt interface,
portsyncd will store eth0 oper status explicitly into the
state database.
Signed-off-by: Shu0T1an ChenG [email protected]