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.
Why I did it
Currently bmp can't be enabled via “sudo config feature state bmp enabled"
How I did it
Conditionally add bmp into FEATURE table of /etc/sonic/init_cfg.json
if the feature is enabled in build system.
How to verify it
Execute “sudo config feature state bmp enabled"
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
A picture of a cute animal (not mandatory but encouraged)
sonic:~$ grep -A 8 bmp /etc/sonic/init_cfg.json | more
"bmp": {
"state": "disabled",
"delayed": "False",
"has_global_scope": true,
"has_per_asic_scope": "False",
"auto_restart": "enabled",
"support_syslog_rate_limit": "true",
"high_mem_alert": "disabled"
},
sonic:~$ show feature status
Feature State AutoRestart SetOwner
bgp enabled enabled
bmp disabled enabled
...
...
sonic:~$ sudo config feature state bmp enabled
sonic:~$ show feature status
Feature State AutoRestart SetOwner
bgp enabled enabled
bmp enabled enabled
...
...
sonic:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1d09ba5dbe11 docker-sonic-bmp:latest "/usr/local/bin/supe…" 43 seconds ago Up 42 seconds bmp