Commit Graph

8574 Commits

Author SHA1 Message Date
abdosi
acb2e94475
[chassis] Added support of isolating given LC in Chassis with TSA mode (#16732)
What I did:
Added support when TSA is done on Line Card make sure it's completely
isolated from all e-BGP peer devices from this LC or remote LC

Why I did:
Currently when TSA is executed on LC routes are withdrawn from it's connected e-BGP peers only. e-BGP peers on remote LC can/will (via i-BGP) still have route pointing/attracting traffic towards this isolated LC.

How I did:

When TSA is applied on LC all the routes that are advertised via i-BGP are set with community tag of no-export so that when remote LC received these routes it does not send over to it's connected e-BGP peers.

Also once we receive the route with no-export  over iBGP match on it and and set the local preference of that route to lower value (80) so that we remove that route from the forwarding database. Below scenario explains why we do this:

- LC1 advertise R1 to LC3
- LC2 advertise R1 to LC3
- On LC3 we have multi-path/ECMP over both LC1 and LC2
- On LC3 R1 received from LC1 is consider best route over R1 over received from LC2 and is send to LC3 e-BGP peers
- Now we do TSA on LC2
- LC3 will receive R1 from LC2 with community no-export and from LC1 same as earlier (no change)
- LC3 will still get traffic for R1 since it is still advertised to e-BGP peers (since R1 from LC1 is best route)
- LC3 will forward to both LC1 and LC2 (ecmp) and this causes issue as LC2 is in TSA mode and should not receive traffic

To fix above scenario we change the preference to lower value of R1 received from LC2 so that it is removed from Multi-path/ECMP group.

How I verfiy:

UT has been added to make sure Template generation is correct
Manual Verification of the functionality
sonic-mgmt test case will be updated accordingly.
Please note this PR is on top of this :#16714 which needs to be merged first.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
2024-01-05 12:24:31 -08:00
zitingguo-ms
98c1f95a93
[YANG] Enable Yang model for BGP_BBR config entry (#17622)
Why I did it
Enable Yang model for BGP_BBR config entry.

{
        "BGP_BBR": {
            "all": {
                "status": "enabled"/"disabled"
            }
        }
}
Work item tracking
Microsoft ADO (number only): 25988660
How I did it
Add yang model and ut for BGP_BBR.

How to verify it
Use GCU cmd to change bbr status.
Create following json patch: disable_bbr.json-patch

[
 {
  "op": "replace",
  "path": "/BGP_BBR/all/status",
  "value": "disabled"
 }
]
Run sudo config apply-patch ./disable_bbr.json-patch cmd on dut. Success.
2024-01-05 23:05:29 +08:00
Dev Ojha
a0e2082efd
Update Dockerfile.j2 (#17663) 2024-01-04 09:05:42 -08:00
Junchao-Mellanox
ee49d0dfec
[Mellanox] Fix issues found for CMIS host management (#17637)
- Why I did it
1. Thermal updater should wait more time for module to be initialized
2. sfp should get temperature threshold from EEPROM because SDK sysfs is not yet supported
3. Rename sfp function to fix typo
4. sfp.get_presence should return False if module is under initialization

- How I did it
1. Thermal updater should wait more time for module to be initialized
2. sfp should get temperature threshold from EEPROM because SDK sysfs is not yet supported
3. Rename sfp function to fix typo
4. sfp.get_presence should return False if module is under initialization

- How to verify it
Manual test
Unit test
2024-01-04 09:42:33 +02:00
prabhataravind
c20abb9e28
[docker_image_ctl.j2]: swss docker initialization improvements (#17628)
* [docker_image_ctl.j2]: swss docker initialization improvements

This commit attempts to address the following:
 * Make sure swss container is indeed up and running before running any commands
   on it. In case where swss container is not fully up when swss.sh attempts to
   create swss:/ready file using "docker exec swss$DEV touch", the command can
   fail silently and can cause swssconfig to wait forever leading to missing IP
   decap configuration among other things. Add a wait so that docker commands
   are run only after swss container status is "Running"
*  Add a log when swss:/ready file is created or if the file creation fails so
   that it becomes easier to debug such scenarios in the future
* [docker_image_ctl.j2]: Use swss$DEV to accommodate multi ASIC platforms as well

Signed-off-by: Prabhat Aravind <paravind@microsoft.com>
2024-01-03 17:44:22 -08:00
bingwang-ms
977e73d370
Update backend_acl.py to specify ACL table name (#17553) 2024-01-03 14:55:38 -08:00
Xichen96
ffe292a021
[dhcp_server] add config dhcp server enable (#17605)
* add config dhcp_server enable

* fix bug

* fix bug

* fix bug

* fix bug
2024-01-03 13:39:39 -08:00
Xichen96
7011e00eba
[dhcp_server] add dhcp server show option (#17469)
* add show dhcp_server option

* Option to option id
2024-01-03 13:39:03 -08:00
prabhataravind
038ca267c8
[image_config]: Update DHCP rate-limit for mgmt TOR devices (#17630)
* [image_config]: Update DHCP rate-limit for mgmt TOR devices

    Change DHCP rate limit(queue4,group3) in SONiC copp configuration to 300 PPS
    for mgmt TORs while keeping the rate limit at 100 PPS for other topologies.

    Why I did it:
    Some mgmt TORs based on Marvell ASIC do not support 100 PPS CIR, so that led
    to these devices silently dropping DHCP packets.

    Microsoft ADO: **25820076**

    How to verify it:
    Send DHCP broadcast packets to an M0 DUT and verify that they are trapped to
    CPU at 300 PPS. On non-mgmt devices, the packets should be trapped at CIR of
    100 PPS. Also ran sonic-mgmt dhcp_relay test and confirmed that it passes.

Signed-off-by: Prabhat Aravind <paravind@microsoft.com>
2024-01-02 21:29:34 -08:00
Jon Goldberg
8ed161fec7
sonic-slave-bookworm/Dockerfile.j2 remove sudo (#17433)
PROXY variables are not available to sudo users during docker build

This patch fixes below error during builds using proxy:

Step 57/63 : RUN sudo apt-get install python3-m2crypto
 ---> Running in ebfa797ebcf8
Reading package lists...
Building dependency tree...
Reading state information...
Suggested packages:
  python-m2crypto-doc
The following NEW packages will be installed:
  python3-m2crypto
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 169 kB of archives.
After this operation, 725 kB of additional disk space will be used.
Ign:1 http://deb.debian.org/debian bookworm/main armhf python3-m2crypto armhf 0.38.0-4+b1
Ign:1 http://deb.debian.org/debian bookworm/main armhf python3-m2crypto armhf 0.38.0-4+b1
Ign:1 http://deb.debian.org/debian bookworm/main armhf python3-m2crypto armhf 0.38.0-4+b1
Err:1 http://deb.debian.org/debian bookworm/main armhf python3-m2crypto armhf 0.38.0-4+b1
  Could not connect to debian.map.fastlydns.net:80 (146.75.78.132), connection timed out Unable to connect to deb.debian.org:http:
E: Failed to fetch http://deb.debian.org/debian/pool/main/m/m2crypto/python3-m2crypto_0.38.0-4%2bb1_armhf.deb  Could not connect to debian.map.fastlydns.net:80 (146.75.78.132), connection timed out Unable to connect to deb.debian.org:http:
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
2024-01-02 21:18:25 -08:00
Yaqiang Zhu
a25b9d8ecb
[yang] Add support for smart switch in dhcp_server_ipv4 (#17320) 2024-01-02 09:08:22 -08:00
Yaqiang Zhu
b9e90c2901
[smart_switch][dhcp_server] Add related checker for smart_switch in dhcp_db_monitor (#17338) 2024-01-02 09:07:44 -08:00
Yaqiang Zhu
525e1f4874
[dhcp_server] Add field not exist checks in dhcp_cfggen (#17645)
* [dhcp_server] Add field not exist checks in dhcp_cfggen
2024-01-02 09:04:14 -08:00
Yaqiang Zhu
2824489a29
[dhcp_server] Fix ut issue in test_utils and test_dhcp_cfggen (#17646) 2024-01-02 08:59:17 -08:00
Ying Xie
a0210df43a
[YANG] update sonic DB version string format (#17608)
Old format: version_a_b_c
New format: version_<branch>_<nn>

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2024-01-02 08:38:30 -08:00
mssonicbld
c410b18f8f
[submodule] Update submodule sonic-linux-kernel to the latest HEAD automatically (#17639) 2023-12-31 15:47:15 +08:00
Ze Gan
6d3cef1a9c
[yang]: Add yang model for dpu database service (#17191)
### Why I did it
According to the design, the database instances of DPU will be kept in the NPU host.

### How I did it
Declare a new field, `has_per_dpu_scope`, in the config_db for database feature.

#### How to verify it
Check Azp
2023-12-29 14:22:23 -08:00
Ze Gan
0e58512353
[docker-databse]: Revise database_global schema for dpu (#17443)
### Why I did it
Revise DPU's database_global.json schema to achieve a more general design

### How I did it
1. Remove databse_type
2. Add a new field databse_name
2023-12-29 14:20:52 -08:00
mssonicbld
da3c6b9985
[submodule] Update submodule sonic-swss to the latest HEAD automatically (#17629) 2023-12-28 15:44:21 +08:00
mssonicbld
f7200698f1
[submodule] Update submodule sonic-platform-daemons to the latest HEAD automatically (#17594) 2023-12-27 16:00:25 +08:00
Junchao-Mellanox
7d388cd0e6
[Mellanox] wait until hw-management watchdog files ready (#17618)
- Why I did it
watchdog-control service always disarm watchdog during system startup stage. It could be the case that watchdog is not fully initialized while the watchdog-control service is accessing it. This PR adds a wait to make sure watchdog has been fully initialized.

- How I did it
adds a wait to make sure watchdog has been fully initialized.

- How to verify it
Manual test
sonic regression
2023-12-26 18:27:18 +02:00
davidpil2002
80f2f6bce1
password-hardening: Add support to disable expiration date like in Linux (PAM) (#17426)
- Why I did it
Enhance the feature to support disabling password hardening as Linux support.
-1: expiration will never occur
0: expiration will expired immediately

Opened bug:
#17427

- How I did it
Added the -1 value to be supported in hostcfgd and this value will propagate to the relevant Linux files

- How to verify it
Pls see the details in the bug description that link attached above
2023-12-25 11:14:17 +02:00
Vivek
18dd948e60
Fix kdump-tools to not overwrite MODULES conf to dep (#17490)
- Why I did it
Fix kdump-tools to not overwrite MODULES conf to dep. Problem is seen if the build is failed and the build is retriggered immediately as part of retry mechanism
This command is failing during the second run

+ for kernel_release in $(ls $FILESYSTEM_ROOT/lib/modules/)
+ sudo LANG=C chroot ./fsroot-mellanox /etc/kernel/postinst.d/kdump-tools 6.1.0-11-2-amd64
+ clean_sys
https://github.com/sonic-net/sonic-buildimage/blob/master/files/build_templates/sonic_debian_extension.j2#L311

Community Issue: https://www.mail-archive.com/kernel-packages@lists.launchpad.net/msg515013.html

- How I did it
Add a patch to revert the override

- How to verify it
vkarri@482a053c44f4:/sonic$ sudo unsquashfs -d ./fsroot-mellanox target/sonic-mellanox.bin__mellanox__rfs.squashfs

Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
2023-12-25 11:13:19 +02:00
bktsim
c0bc1d9753
[Arista] Remove aggregate port config files for multi-asic devices (#16923)
An aggregate port_config.ini file for Arista multi-asic devices was first introduced by mistake. This PR cleans up these unnecessary files.
2023-12-22 17:10:41 -08:00
Xichen96
08666100fc
[dhcp_server] add config dhcp server del (#17603)
* add config dhcp server del
2023-12-22 09:07:24 -08:00
mssonicbld
d4a78665ee
[submodule] Update submodule sonic-sairedis to the latest HEAD automatically (#17596) 2023-12-22 06:00:06 +08:00
mssonicbld
d892626253
[submodule] Update submodule sonic-linux-kernel to the latest HEAD automatically (#17591) 2023-12-21 15:47:39 +08:00
mssonicbld
d7a422e57a
[submodule] Update submodule linkmgrd to the latest HEAD automatically (#17588) 2023-12-21 15:26:40 +08:00
Xichen96
13a16cf87f
[dhcp_server] add config dhcp_server add (#17489)
* dhcp_server add
* add test dup gw nm
2023-12-20 09:09:46 -08:00
Xichen96
1e92ba24ec
[dhcp_server] add show dhcp server info (#17468)
* add show dhcp server info
2023-12-20 09:07:32 -08:00
mssonicbld
86fb9eaf06
[submodule] Update submodule dhcprelay to the latest HEAD automatically (#17572)
#### Why I did it
src/dhcprelay
```
* 5ae186f - (HEAD -> master, origin/master, origin/HEAD) [counter] Clear counter table when init (#45) (10 hours ago) [Yaqiang Zhu]
```
#### How I did it
#### How to verify it
#### Description for the changelog
2023-12-20 16:32:37 +08:00
byu343
2559d7e541
[Arista] Use port_config.ini for Arista-7050QX-32S-S4Q31 (#17253)
This change of removing hwsku.json is to correct the port index for
sfp ports (Ethernet0, Ethernet1, Ethernet2, Ethernet3) by using
port_config.ini, which should be '1, 2, 3, 4'. We could not do it
with hwsku.json, as it is defined as '5, 5, 5, 5' by platform.json
for the breakout_mode 1x40G[10G].
2023-12-20 15:29:43 +08:00
Junchao-Mellanox
f3f2972512
Optimize syslog rate limit feature for fast and warm boot (#17458)
- Why I did it
Optimize syslog rate limit feature for fast and warm boot

- How I did it
Optimize redis start time
Don't render rsyslog.conf in container startup script
Disable containercfgd by default. There is a new CLI to enable it (in another PR)

- How to verify it
Manual test
Regression test
2023-12-20 09:12:03 +02:00
Oleksandr Ivantsiv
885f1629dd
[yang][smartswitch] Add YANG model for MID_PLANE_BRIDGE and DPU tables. (#17311)
- Why I did it
Add the YANG model according to Smart Switch IP address assignment HDL.

- How I did it
Implement new YANG model containers.

- How to verify it
Run YANG model unit tests. The changes add new unit tests to cover new functionality.
2023-12-20 09:05:11 +02:00
Prince George
30ff77350f
Fix the fsck script that does filesystem repair (#17424)
Fix the fsck check which is not working. Potentially fixes #16938
Modified fsck script to run on the ext4.fsck on the appropriate disk where SONiC resides

Microsoft ADO: 26098631
2023-12-19 17:51:49 -08:00
mssonicbld
050420f444
[submodule] Update submodule sonic-platform-common to the latest HEAD automatically (#17559)
#### Why I did it
src/sonic-platform-common
```
* c82ae54 - (HEAD -> master, origin/master, origin/HEAD) Implementing set_optoe_write_timeout API (#422) (8 hours ago) [mihirpat1]
```
#### How I did it
#### How to verify it
#### Description for the changelog
2023-12-19 16:33:58 +08:00
mssonicbld
f804a6ec5a
[submodule] Update submodule sonic-sairedis to the latest HEAD automatically (#17560)
#### Why I did it
src/sonic-sairedis
```
* e849160 - (HEAD -> master, origin/master, origin/HEAD) [vslib] add support for ACL table available entry/counter attributes (#1333) (9 hours ago) [Yakiv Huryk]
```
#### How I did it
#### How to verify it
#### Description for the changelog
2023-12-19 16:33:54 +08:00
mssonicbld
ec92a6d421
[submodule] Update submodule sonic-swss to the latest HEAD automatically (#17561)
#### Why I did it
src/sonic-swss
```
* 5f367ebb - (HEAD -> master, origin/master, origin/HEAD) [dash] reduce the memory used by DASH ACL rules (#2984) (8 hours ago) [Yakiv Huryk]
```
#### How I did it
#### How to verify it
#### Description for the changelog
2023-12-19 16:33:50 +08:00
mssonicbld
2ba3c90ad4
[submodule] Update submodule sonic-utilities to the latest HEAD automatically (#17516) 2023-12-17 15:46:25 +08:00
Junchao-Mellanox
d8a1ffbace
[Mellanox] implement sfp.reset for CMIS management (#16862)
- Why I did it
For CMIS host management module, we need a different implementation for sfp.reset. This PR is to implement it

- How I did it
For SW control modules, do reset from hw_reset
For FW control modules, do reset as the original way

- How to verify it
Manual test
sonic-mgmt platform test
2023-12-17 08:02:47 +02:00
mssonicbld
37a9c25cfb
[submodule] Update submodule sonic-swss to the latest HEAD automatically (#17535) 2023-12-16 15:51:42 +08:00
mssonicbld
e0dc6def82
[submodule] Update submodule sonic-platform-daemons to the latest HEAD automatically (#17533) 2023-12-16 15:49:20 +08:00
mssonicbld
9664c201f6
[submodule] Update submodule sonic-platform-common to the latest HEAD automatically (#17532) 2023-12-16 15:34:43 +08:00
mssonicbld
ff1c8e0c24
[submodule] Update submodule sonic-sairedis to the latest HEAD automatically (#17534) 2023-12-16 15:30:37 +08:00
jingwenxie
ad90ad9fcd
Update TELEMETRY_CLIENT YANG model (#16861)
### Why I did it
Github issue: https://github.com/sonic-net/sonic-buildimage/issues/16356. The YANG definition breaks GCU feature.

We can either update sonic_yang and GCU's search algorithm to enable the same key count case or simply update YANG model to solve the issue.

The pros for update YANG model are it could solve the issue directly and we don't need to handle the complicate search algorithm in sonic_yang and GCU. This is the only YANG model that has this issue.

### How I did it
Combine two list into one. The previous YANG validation unit tests are still applicable.
#### How to verify it
Unit test and E2E test
2023-12-15 17:04:55 -08:00
Yaqiang Zhu
728df4e89d
[dhcp_relay] Optimize j2 file in dhcp_relay container (#17506) 2023-12-15 15:47:40 -08:00
spilkey-cisco
69ad1ed41a
Fix system-health hardware_checker to consume fan tolerance details (#16689)
Why I did it

Fan tolerance checking is done through new APIs, is_under_speed and is_over_speed, which populate corresponding fields into the database. speed_tolerance is no longer used and was removed, but system-health was not updated and indicates failures:

ADO: 25279165

root@sonic/# show system-health summary
System status summary

  System status LED  red_blink
  Services:
    Status: OK
  Hardware:
    Status: Not OK
    Reasons: Failed to get speed tolerance for fantray5.fan1
	     Failed to get speed tolerance for fantray5.fan0
	     Failed to get speed tolerance for fantray4.fan1
	     Failed to get speed tolerance for fantray4.fan0
	     Failed to get speed tolerance for fantray3.fan1
	     Failed to get speed tolerance for fantray3.fan0
	     Failed to get speed tolerance for fantray2.fan1
	     Failed to get speed tolerance for fantray2.fan0
	     Failed to get speed tolerance for fantray1.fan1
	     Failed to get speed tolerance for fantray1.fan0
	     Failed to get speed tolerance for fantray0.fan1
	     Failed to get speed tolerance for fantray0.fan0
	     Failed to get speed tolerance for PSU1.fan0
	     Failed to get speed tolerance for PSU0.fan0

How I did it
Updated hardware_checker.py in system-health to consume new is_under_speed and is_over_speed database entries instead of speed_tolerance and hard-coded calculations.

How to verify it
root@sonic:/# show system-health summary
System status summary

  System status LED  green
  Services:
    Status: OK
  Hardware:
    Status: OK
2023-12-15 15:33:20 -08:00
Liu Shilong
979516633d
[ci] Support pensando platform build in pipeline. (#17512)
Why I did it
Update pipeline file to support pensando's build.

Work item tracking
Microsoft ADO (number only): 26087700
How I did it
How to verify it
2023-12-15 16:52:51 +08:00
Liu Shilong
2532661cd9
[ci] Enable sonic-restapi build in PR validation. (#17397)
Why I did it
Enable sonic-restapi build in two platform to avoid build break on restapi target.

Work item tracking
Microsoft ADO (number only): 26048426
How I did it
How to verify it
2023-12-15 16:25:26 +08:00
mssonicbld
73f6e5895a
[submodule] Update submodule sonic-platform-daemons to the latest HEAD automatically (#17499) 2023-12-15 15:31:28 +08:00