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

Update management interface related configuration in MGMT_PORT_TABLE STATE_DB #21813

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SuvarnaMeenakshi
Copy link
Contributor

…in STATE_DB

Why I did it

Currently Management interface related data is present in CONFIG_DB and 'oper_status' is present in STATE_DB MGMT_PORT_TABLE.
This PR change is made to ensure that all telemetry data related to management interface is present in STATE_DB.

Work item tracking
  • Microsoft ADO 27597775:

How I did it

Update mgmt_oper_status monit script to update all fields from CONFIG_DB MGMT_PORT table.

How to verify it

Unit test added for the change and passed:

/sonic/files/image_config/monit$ pytest-3 tests/test_mgmt_oper_status.py 
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.11.2, pytest-7.2.1, pluggy-1.0.0+repack
rootdir: /sonic/files/image_config/monit
plugins: pyfakefs-5.6.0, cov-4.0.0
collected 4 items                                                                                                                                                                                                 

tests/test_mgmt_oper_status.py ....                                                                                                                                                                         [100%]

================================================================================================ 4 passed in 0.09s ================================================================================================

Before Change:

sonic-db-cli STATE_DB hgetall "MGMT_PORT_TABLE|eth0"
{'oper_status': 'up'}

After change:

sonic-db-cli STATE_DB hgetall "MGMT_PORT_TABLE|eth0"
{'oper_status': 'up', 'admin_status': 'up', 'alias': 'eth0'}
sonic-db-cli CONFIG_DB hgetall "MGMT_PORT|eth0"
{'admin_status': 'up', 'alias': 'eth0'}

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

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)

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

2 participants