[sonic-cfggen] Load JSON files before minigraph file#4202
Merged
lguohan merged 1 commit intosonic-net:masterfrom Feb 28, 2020
jleveque:fix_cfggen_order
Merged
[sonic-cfggen] Load JSON files before minigraph file#4202lguohan merged 1 commit intosonic-net:masterfrom jleveque:fix_cfggen_order
lguohan merged 1 commit intosonic-net:masterfrom
jleveque:fix_cfggen_order
Conversation
lguohan
approved these changes
Feb 28, 2020
yxieca
pushed a commit
that referenced
this pull request
Mar 2, 2020
If sonic-cfggen is passed the -m argument (to load the minigraph file) along with one or more -j <json_file> arguments, load the JSON files before loading the minigraph file. This ensures that the init_cfg.json file is loaded before the minigraph, therefore the minigraph can override any default configuration options specified in init_cfg.json. Currently, the behavior is reversed. Note: This is not an issue if loading loading multiple JSON files, because sonic-cfggen loads them in the left-to-right order they were specified on the command line, therefore providing flexibility for loading JSON files in a specific order. As long as init_cfg.json is specified before config_db.json, the values specified in config_db.json will take precedence.
rlhui
pushed a commit
that referenced
this pull request
Mar 4, 2020
If sonic-cfggen is passed the -m argument (to load the minigraph file) along with one or more -j <json_file> arguments, load the JSON files before loading the minigraph file. This ensures that the init_cfg.json file is loaded before the minigraph, therefore the minigraph can override any default configuration options specified in init_cfg.json. Currently, the behavior is reversed. Note: This is not an issue if loading loading multiple JSON files, because sonic-cfggen loads them in the left-to-right order they were specified on the command line, therefore providing flexibility for loading JSON files in a specific order. As long as init_cfg.json is specified before config_db.json, the values specified in config_db.json will take precedence.
pphuchar
pushed a commit
to SONIC-DEV/sonic-buildimage
that referenced
this pull request
Mar 9, 2020
If sonic-cfggen is passed the -m argument (to load the minigraph file) along with one or more -j <json_file> arguments, load the JSON files before loading the minigraph file. This ensures that the init_cfg.json file is loaded before the minigraph, therefore the minigraph can override any default configuration options specified in init_cfg.json. Currently, the behavior is reversed. Note: This is not an issue if loading loading multiple JSON files, because sonic-cfggen loads them in the left-to-right order they were specified on the command line, therefore providing flexibility for loading JSON files in a specific order. As long as init_cfg.json is specified before config_db.json, the values specified in config_db.json will take precedence.
tiantianlv
pushed a commit
to SONIC-DEV/sonic-buildimage
that referenced
this pull request
Apr 24, 2020
If sonic-cfggen is passed the -m argument (to load the minigraph file) along with one or more -j <json_file> arguments, load the JSON files before loading the minigraph file. This ensures that the init_cfg.json file is loaded before the minigraph, therefore the minigraph can override any default configuration options specified in init_cfg.json. Currently, the behavior is reversed. Note: This is not an issue if loading loading multiple JSON files, because sonic-cfggen loads them in the left-to-right order they were specified on the command line, therefore providing flexibility for loading JSON files in a specific order. As long as init_cfg.json is specified before config_db.json, the values specified in config_db.json will take precedence.
mssonicbld
added a commit
that referenced
this pull request
Feb 8, 2026
…lly (#25384) #### Why I did it src/sonic-swss ``` * 1339028c - (HEAD -> 202511, origin/202511) [vnet/vxlan]: Handle SAI failures without crashing swss (#4188) (28 hours ago) [mssonicbld] * 8799eac7 - [DASH] Validate ca to pa SAI attributes (#4202) (32 hours ago) [mssonicbld] * 5db5395e - [tests]: Update SRv6 test cases to use static SID configuration CLI (#4198) (34 hours ago) [Carmine Scarpitta] ``` #### How I did it #### How to verify it #### Description for the changelog
mssonicbld
added a commit
that referenced
this pull request
Feb 19, 2026
…atically (#25250) #### Why I did it src/sonic-utilities ``` * 0315da21 - (HEAD -> 202511, origin/202511) [LACP retry-count] Syntax Fix for Trixie (#4280) (6 hours ago) [Yair Raviv] * 4420954e - Fix dump port state CLI command crash on multi-asic platforms (#4276) (5 days ago) [mssonicbld] * a3ad30be - [Mellanox] Add restricted sysfs list for fw control modules (#4202) (13 days ago) [mssonicbld] * 16390921 - Fix j2 files not getting packaged (#4252) (13 days ago) [mssonicbld] * 6b9b0dce - [hft]: HFT config/show cli (#4243) (2 weeks ago) [mssonicbld] * 529b6479 - [sfputil] Fix issue: should not do low power mode or reset for non-present ports (#4241) (2 weeks ago) [mssonicbld] * ad70c8f2 - Update bash completions for sonic-utilities commands (#4234) (3 weeks ago) [mssonicbld] * 667f4b32 - [202511][GCU] Update WRED_PROFILE and BUFFER_POOL validators for GCU (#4226) (3 weeks ago) [Dev Ojha] * 88b3899d - Fix sonic-kdump-config for running commands with pipe (#4220) (3 weeks ago) [mssonicbld] * e4881b02 - Skip IP range duplicate check in validate_bgp_peer_group for different vnets (#4215) (4 weeks ago) [mssonicbld] * 9c24925a - Fix syntax and semantic errors in kdump remote feature (#4212) (4 weeks ago) [mssonicbld] ``` #### How I did it #### How to verify it #### Description for the changelog
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
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.
- What I did
If sonic-cfggen is passed the
-margument (to load the minigraph file) along with one or more-j <json_file>arguments, load the JSON files before loading the minigraph file.This ensures that the init_cfg.json file is loaded before the minigraph, therefore the minigraph can override any default configuration options specified in init_cfg.json. Currently, the behavior is reversed.
Note: This is not an issue if loading loading multiple JSON files, because sonic-cfggen loads them in the left-to-right order they were specified on the command line, therefore providing flexibility for loading JSON files in a specific order. As long as init_cfg.json is specified before config_db.json, the values specified in config_db.json will take precedence.
- How I did it
- How to verify it
sonic-cfggen -H -m -j /etc/sonic/init_cfg.json --write-to-dbconfig save -y