Skip to content

[build_template]: combine the init config write into one block#1513

Merged
yxieca merged 1 commit intosonic-net:masterfrom
sihuihan88:dev/sihan/init
Mar 20, 2018
Merged

[build_template]: combine the init config write into one block#1513
yxieca merged 1 commit intosonic-net:masterfrom
sihuihan88:dev/sihan/init

Conversation

@sihuihan88
Copy link
Contributor

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)

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"
Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

I would vote for '>'. But as it now, '>>' didn't change existing behavior, @jleveque if @taoyl-ms cannot response in time, do you mind check-in as-is and improve later?

Copy link
Contributor

@taoyl-ms taoyl-ms Mar 20, 2018

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.

Copy link
Contributor

@taoyl-ms taoyl-ms Mar 20, 2018

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.

@yxieca yxieca merged commit 6d592d8 into sonic-net:master Mar 20, 2018
@sihuihan88 sihuihan88 deleted the dev/sihan/init branch March 20, 2018 17:52
Sabareesh-Kumar-Anandan pushed a commit to Sabareesh-Kumar-Anandan/sonic-buildimage that referenced this pull request Dec 20, 2020
[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>
jleveque added a commit that referenced this pull request Dec 24, 2020
* 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)
theasianpianist pushed a commit to theasianpianist/sonic-buildimage that referenced this pull request Feb 5, 2022
…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.
mssonicbld added a commit that referenced this pull request Jan 30, 2025
…tically (#21568)

#### Why I did it
src/sonic-sairedis
```
* b39b9a60 - (HEAD -> 202411, origin/202411) Fix to not miss the entire set of counters to be added in addObject for CounterContext::updateSupportedCount (#1513) (2 days ago) [mssonicbld]
```
#### How I did it
#### How to verify it
#### Description for the changelog
vmittal-msft pushed a commit to vmittal-msft/sonic-buildimage that referenced this pull request Oct 20, 2025
Cherry-pick sonic-net#23539

<!--
Please make sure you've read and understood our contributing guidelines:
     https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

** Make sure all your commits include a signature generated with `git
commit -s` **

If this is a bug fix, make sure your description includes "fixes #xxxx",
or
     "closes #xxxx" or "resolves #xxxx"

     Please provide the following information:
-->

#### Why I did it
Upgrade Broadcom xgs SAI version to 13.2.1.2 to include the following
fixes:
- CS00012414408: Failed to set TPID 0x9100 on Arista-7060X6-64PE-B-O128
fanout
- CS00012413437: err log: SAI_API_SWITCH:sai_query_stats_capability:874
stats capablity not supported
- CS00012411717: [T5] Failed to create ACL table DYNAMIC_ACL_TABLE
- CS00012409353: BCM56274: SAI_STATUS_TABLE_FULL error for setting MTU
on SAI_API_ROUTER_INTERFACE
- CS00012408505: SRV6 MY_SIDS CRM support missing
- CS00012408944: [TH5]syncd crash in creating SAI_API_NEXT_HOP_GROUP
- CS00012371264: Pkts are trapped to queue 7 which has no policer caused
CPU utilization issue
- CS00012407534: SONiC: Rx Packets being dropped when VRF is setup for
BCM78900

##### Work item tracking
- Microsoft ADO **(number only)**: 33954225

#### How I did it
Update xgs SAI version in sai.mk file.

#### How to verify it
Install new image on 70060x6 DUT, all containers and interfaces are up.
```
admin@str4-7060x6-512-1:~$ bcmcmd -c "bsv"
bsv
BRCM SAI ver: [13.2.1.2], OCP SAI ver: [1.16.3], SDK ver: [sdk-6.5.32-SP2], LT ver: [1.16]
BRCM SAI cold boot ver:[13.2.1.2]
drivshell>
admin@str4-7060x6-512-1:~$ show ver

SONiC Software Version: SONiC.master-23539.912087-e9a01ce4b
SONiC OS Version: 12
Distribution: Debian 12.11
Kernel: 6.1.0-29-2-amd64
Build commit: e9a01ce4b
Build date: Thu Jul 31 07:48:38 UTC 2025
Built by: azureuser@f8d59677c000001

Platform: x86_64-arista_7060x6_64pe_b
HwSKU: Arista-7060X6-64PE-B-C512S2
ASIC: broadcom
ASIC Count: 1
Serial Number: HBG250902HX
Model Number: DCS-7060X6-64PE-B
Hardware Revision: 02.00
Uptime: 00:14:33 up 8 min,  1 user,  load average: 1.73, 1.82, 1.09
Date: Fri 01 Aug 2025 00:14:33

Docker images:
REPOSITORY                    TAG                             IMAGE ID       SIZE
docker-syncd-brcm             latest                          ddd49cfcb0fd   755MB
docker-syncd-brcm             master-23539.912087-e9a01ce4b   ddd49cfcb0fd   755MB
docker-gbsyncd-broncos        latest                          6c0eab9adbfc   322MB
docker-gbsyncd-broncos        master-23539.912087-e9a01ce4b   6c0eab9adbfc   322MB
docker-gbsyncd-credo          latest                          0ec8c5dc871e   297MB
docker-gbsyncd-credo          master-23539.912087-e9a01ce4b   0ec8c5dc871e   297MB
docker-sonic-restapi          latest                          ee2777eb457d   288MB
docker-sonic-restapi          master-23539.912087-e9a01ce4b   ee2777eb457d   288MB
docker-macsec                 latest                          a1045ddda5c2   302MB
docker-macsec                 master-23539.912087-e9a01ce4b   a1045ddda5c2   302MB
docker-teamd                  latest                          914072288b36   299MB
docker-teamd                  master-23539.912087-e9a01ce4b   914072288b36   299MB
docker-sflow                  latest                          73be49775b51   300MB
docker-sflow                  master-23539.912087-e9a01ce4b   73be49775b51   300MB
docker-fpm-frr                latest                          5e5e010bfb85   348MB
docker-fpm-frr                master-23539.912087-e9a01ce4b   5e5e010bfb85   348MB
docker-orchagent              latest                          448dee570d18   312MB
docker-orchagent              master-23539.912087-e9a01ce4b   448dee570d18   312MB
docker-nat                    latest                          411f1377b097   302MB
docker-nat                    master-23539.912087-e9a01ce4b   411f1377b097   302MB
docker-dash-ha                latest                          6755c4c2467c   318MB
docker-dash-ha                master-23539.912087-e9a01ce4b   6755c4c2467c   318MB
docker-dhcp-relay             latest                          ea12dfc9c67f   279MB
docker-dhcp-relay             master-23539.912087-e9a01ce4b   ea12dfc9c67f   279MB
docker-sonic-bmp              latest                          4c14ac75309a   271MB
docker-sonic-bmp              master-23539.912087-e9a01ce4b   4c14ac75309a   271MB
docker-sysmgr                 latest                          358098210d0f   281MB
docker-sysmgr                 master-23539.912087-e9a01ce4b   358098210d0f   281MB
docker-sonic-mgmt-framework   latest                          527e031d9a33   359MB
docker-sonic-mgmt-framework   master-23539.912087-e9a01ce4b   527e031d9a33   359MB
docker-platform-monitor       latest                          3f164a5a0d48   402MB
docker-platform-monitor       master-23539.912087-e9a01ce4b   3f164a5a0d48   402MB
docker-snmp                   latest                          2ff4ec0e6bb7   294MB
docker-snmp                   master-23539.912087-e9a01ce4b   2ff4ec0e6bb7   294MB
docker-router-advertiser      latest                          c7643b0d2e4b   270MB
docker-router-advertiser      master-23539.912087-e9a01ce4b   c7643b0d2e4b   270MB
docker-mux                    latest                          82b75eadc107   322MB
docker-mux                    master-23539.912087-e9a01ce4b   82b75eadc107   322MB
docker-lldp                   latest                          65a119b37de2   315MB
docker-lldp                   master-23539.912087-e9a01ce4b   65a119b37de2   315MB
docker-gnmi-watchdog          latest                          3f04d7a7d3db   276MB
docker-gnmi-watchdog          master-23539.912087-e9a01ce4b   3f04d7a7d3db   276MB
docker-sonic-gnmi             latest                          1b70d06ad68d   383MB
docker-sonic-gnmi             master-23539.912087-e9a01ce4b   1b70d06ad68d   383MB
docker-eventd                 latest                          0c55f95ce65d   270MB
docker-eventd                 master-23539.912087-e9a01ce4b   0c55f95ce65d   270MB
docker-bmp-watchdog           latest                          0347f9de4b6e   270MB
docker-bmp-watchdog           master-23539.912087-e9a01ce4b   0347f9de4b6e   270MB
docker-database               latest                          e723dd47ee86   276MB
docker-database               master-23539.912087-e9a01ce4b   e723dd47ee86   276MB
docker-auditd-watchdog        latest                          66f686c20156   272MB
docker-auditd-watchdog        master-23539.912087-e9a01ce4b   66f686c20156   272MB
docker-auditd                 latest                          391e24f25bff   269MB
docker-auditd                 master-23539.912087-e9a01ce4b   391e24f25bff   269MB

admin@str4-7060x6-512-1:~$ docker ps -a
CONTAINER ID   IMAGE                                COMMAND                  CREATED         STATUS         PORTS     NAMES
fc1129282ae0   docker-snmp:latest                   "/usr/bin/docker-snm…"   6 minutes ago   Up 6 minutes             snmp
5d52ea504713   docker-platform-monitor:latest       "/usr/bin/docker_ini…"   6 minutes ago   Up 6 minutes             pmon
dfe6d0eccbe7   docker-sonic-mgmt-framework:latest   "/usr/local/bin/supe…"   6 minutes ago   Up 6 minutes             mgmt-framework
67fd2c3d5184   docker-lldp:latest                   "/usr/bin/docker-lld…"   6 minutes ago   Up 6 minutes             lldp
73ff10021b5a   docker-sonic-gnmi:latest             "/usr/local/bin/supe…"   6 minutes ago   Up 6 minutes             gnmi
19ce54695ee2   docker-sonic-bmp:latest              "/usr/local/bin/supe…"   6 minutes ago   Up 6 minutes             bmp
25540535ba7d   docker-router-advertiser:latest      "/usr/bin/docker-ini…"   8 minutes ago   Up 8 minutes             radv
99488abd386c   docker-eventd:latest                 "/usr/local/bin/supe…"   8 minutes ago   Up 8 minutes             eventd
1114cdade30c   docker-syncd-brcm:latest             "/usr/local/bin/supe…"   8 minutes ago   Up 8 minutes             syncd
0ae909a91358   docker-teamd:latest                  "/usr/local/bin/supe…"   8 minutes ago   Up 8 minutes             teamd
e35a66f3c140   docker-fpm-frr:latest                "/usr/bin/docker_ini…"   8 minutes ago   Up 8 minutes             bgp
b7144171d909   docker-sysmgr:latest                 "/usr/local/bin/supe…"   8 minutes ago   Up 8 minutes             sysmgr
1ae60eb3aa89   docker-orchagent:latest              "/usr/bin/docker-ini…"   8 minutes ago   Up 8 minutes             swss
5e97461499fb   docker-sonic-restapi:latest          "/usr/local/bin/supe…"   8 minutes ago   Up 8 minutes             restapi
cbc9dc89237e   docker-database:latest               "/usr/local/bin/dock…"   8 minutes ago   Up 8 minutes             database
admin@str4-7060x6-512-1:~$ 
```
<!--
If PR needs to be backported, then the PR must be tested against the
base branch and the earliest backport release branch and provide tested
image version on these two branches. For example, if the PR is requested
for master, 202211 and 202012, then the requester needs to provide test
results on master and 202012.
-->

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

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->


- [x] 202412
- [x] 202505

Signed-off-by: zitingguo-ms <zitingguo@microsoft.com>
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.

4 participants