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

Add BMP to init config in default disabled state #21863

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

Conversation

vivekverma-arista
Copy link
Contributor

@vivekverma-arista vivekverma-arista commented Feb 26, 2025

Why I did it

The new feature was introduced in the this set of pull requests: sonic-net/SONiC#1621

This feature runs inside a new docker container. In order to enable it through CLI sudo config feature state it should be a part of base config or init_cfg.json at /etc/sonic.

Some sonic-mgmt tests were added in sonic-net/sonic-mgmt#15749 which are currently failing in full test suite runs. We need this so that we can enable BMP while running them.

Work item tracking
  • Microsoft ADO (number only):
    #459

How I did it

Update files/build_templates/init_cfg.json.j2

How to verify it

Ran all BMP sonic-mgmt tests with changes in this PR as well as sonic-net/sonic-mgmt#17179.

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

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

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).

@@ -67,7 +67,8 @@
("pmon", "enabled", "{% if 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'SpineRouter' %}False{% else %}True{% endif %}", "enabled"),
("snmp", "enabled", true, "enabled"),
("swss", "enabled", false, "enabled"),
("syncd", "enabled", false, "enabled")] %}
("syncd", "enabled", false, "enabled"),
("bmp", "disabled", "False", "enabled")] %}
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we move to golden config, instead of init_cfg.json change in the future? @qiluo-msft

Copy link
Contributor Author

@vivekverma-arista vivekverma-arista Feb 28, 2025

Choose a reason for hiding this comment

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

As far as I understand, golden config is not an alternative to init_cfg. https://github.com/sonic-net/sonic-mgmt/blob/master/ansible/library/generate_golden_config_db.py

It possibly just keeps track of last known sane config in sonic-mgmt. (the one put by deploy-mg)

I understand ini_cfg.json.j2 is protected and we want to exercise discretion while updating it but I believe this change is necessary. In case I am missing something please point me to the appropriate file where I should put this.

StormLiangMS pushed a commit to sonic-net/sonic-mgmt that referenced this pull request Mar 6, 2025
What is the motivation for this PR?
bmp/test_bmp_statedb.py and bmp/test_docker_restart.py are failing as they try to test BMP without enabling it.

How did you do it?
Created a fixture to enable BMP. For the CLI to work we also need: sonic-net/sonic-buildimage#21863

How did you verify/test it?
Ran all tests in the BMP directory.
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Mar 6, 2025
What is the motivation for this PR?
bmp/test_bmp_statedb.py and bmp/test_docker_restart.py are failing as they try to test BMP without enabling it.

How did you do it?
Created a fixture to enable BMP. For the CLI to work we also need: sonic-net/sonic-buildimage#21863

How did you verify/test it?
Ran all tests in the BMP directory.
mssonicbld pushed a commit to sonic-net/sonic-mgmt that referenced this pull request Mar 11, 2025
What is the motivation for this PR?
bmp/test_bmp_statedb.py and bmp/test_docker_restart.py are failing as they try to test BMP without enabling it.

How did you do it?
Created a fixture to enable BMP. For the CLI to work we also need: sonic-net/sonic-buildimage#21863

How did you verify/test it?
Ran all tests in the BMP directory.
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.

3 participants