-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[build_template]: combine the init config write into one block #1513
Conversation
Signed-off-by: Sihui Han <sihan@microsoft.com>
{% if enable_pfcwd_on_start == "y" %} | ||
sudo bash -c "echo '{ \"DEVICE_METADATA\": { \"localhost\": { \"default_pfcwd_status\": \"enable\" } } }' >> $FILESYSTEM_ROOT/etc/sonic/init_cfg.json" | ||
{% endif %} | ||
sudo bash -c "echo '{ \"DEVICE_METADATA\": { \"localhost\": { \"default_bgp_status\": {% if shutdown_bgp_on_start == "y" %}\"down\"{% else %}\"up\"{% endif %}, \"default_pfcwd_status\": {% if enable_pfcwd_on_start == "y" %}\"enable\"{% else %}\"disable\"{% endif %} } } }' >> $FILESYSTEM_ROOT/etc/sonic/init_cfg.json" |
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.
Should we continue appending (>>
) here, or should we simply write a new file (>
)?
@taoyl-ms: Do you have an opinion on this?
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.
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.
It should not matter as this file should not exist upon this moment. Personally, I prefer ">>" because if anything goes wrong, it will expose the problem by creating an illegal file, instead of hiding it by overwritting.
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.
Like, for this particular bug, if we were using '>' instead of '>>', we won't see an illegal json, but BGP startup setting will simply be missing, which will be even more difficult to identify and to debug.
[buffermgmt] more build error fixes when compiling for armhf (32-bit) (sonic-net#1559) Sflow fix to avoid NULL in field. (sonic-net#1531) [fgnhgorch] Fg Nhg link handling (sonic-net#1537) [dpb]: make sure port is in admin down state before remove port. (sonic-net#1513) [FPMSYNCD/FDBSYNCD] EVPN Type-5 route removing prefix-len for host route and removing junk character present in the mac (sonic-net#1553) Added support for EVPN L3 VXLAN as described in the PR sonic-net/SONiC#437 (sonic-net#1267) Signed-off-by: Sabareesh Kumar Anandan <sanandan@marvell.com>
* src/sonic-swss c7ee75f...cadf28f (24): > Revert "Add support for headroom pool watermark (#1453)" > [VxlanOrch] pytest for EVPN VXLAN (#1318) > [restore_neighbors] python3 support for restore_neighbors.py (#1542) > [buffermgmt] more build error fixes when compiling for armhf (32-bit) (#1559) > Sflow fix to avoid NULL in field. (#1531) > [fgnhgorch] Fg Nhg link handling (#1537) > [dpb]: make sure port is in admin down state before remove port. (#1513) > [FPMSYNCD/FDBSYNCD] EVPN Type-5 route removing prefix-len for host route and removing junk character present in the mac (#1553) > Added support for EVPN L3 VXLAN as described in the PR sonic-net/SONiC#437 (#1267) > [crm]: Typecast to unit64_t to avoid divide by 0 during overflow (#1550) > [vxlanmgr] Fix build error when compiling for armhf (32-bit) (#1552) > [Dynamic buffer calc] Support dynamic buffer calculation (#1338) > [dvs] Clean-up dvs_database and dvs_common (#1541) > [VxlanMgr] changes for EVPN VXLAN (#1266) > Statistics support for Tx and Rx counters of different frame sizes (#1536) > [orchagent/phy]: Add firmware info propagation (#1540) > [vxlanorch] Use PRI instead of %l to avoid warnings in 32-bit arch (#1539) > [FDBSYNCD] Added support for EVPN as described in the PR sonic-net/SONiC#437 (#1276) > [everflow] Add retry mechanism for mirror sessions and policers (#1486) > Enable ACL table type mirror_v6 for Innovium Platform (#1527) > [fgnhgorch] Change format specifier %lu to %zu for size_t (#1529) > [dvs] Fix issue where concurrent netns operations cause test setup to fail (#1535) > Add support for headroom pool watermark (#1453) > Change gAsicInstance to type string with max length limit (#1526)
…ic-net#1513) Bring down the port before remove. During DPB SET request to bring down the port may get replaced DEL. Make sure to bring down the port before remove.
Signed-off-by: Sihui Han sihan@microsoft.com
- What I did
Combine the init config write into one block. Otherwise it will result in wrong init config format when multiple build options are enabled.
- How I did it
- How to verify it
Test on DUT
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)