Commit Graph

5777 Commits

Author SHA1 Message Date
xumia
b23eb1aea0 [Ci]: check if there is a sonic dirty version issue (#10445)
Why I did it
[Ci]: check if there is a sonic dirty version issue
If there is a dirty version issue in PR build, the build will be failed.
2022-04-10 23:17:58 -07:00
Stepan Blyshchak
f83d73ba29 [scapy] update scapy to 2.4.5 and patch it (#10457)
Why I did it
Running warm-reboot in a loop for 500 times leads to this error on 318-th iteration:

Apr  2 15:56:27.346747 sonic INFO swss#/supervisord: restore_neighbors Traceback (most recent call last):
Apr  2 15:56:27.346747 sonic INFO swss#/supervisord: restore_neighbors   File "/usr/bin/restore_neighbors.py", line 24, in <module>
Apr  2 15:56:27.346747 sonic INFO swss#/supervisord: restore_neighbors     from scapy.all import conf, in6_getnsma, inet_pton, inet_ntop, in6_getnsmac, get_if_hwaddr, Ether, ARP, IPv6, ICMPv6ND_NS, ICMPv6NDOptSrcLLAddr
Apr  2 15:56:27.346795 sonic INFO swss#/supervisord: restore_neighbors   File "/usr/local/lib/python3.7/dist-packages/scapy/all.py", line 25, in <module>
Apr  2 15:56:27.346956 sonic INFO swss#/supervisord: restore_neighbors     from scapy.route import *
Apr  2 15:56:27.346995 sonic INFO swss#/supervisord: restore_neighbors   File "/usr/local/lib/python3.7/dist-packages/scapy/route.py", line 205, in <module>
Apr  2 15:56:27.347089 sonic INFO swss#/supervisord: restore_neighbors     conf.iface = get_working_if()
Apr  2 15:56:27.347129 sonic INFO swss#/supervisord: restore_neighbors   File "/usr/local/lib/python3.7/dist-packages/scapy/arch/linux.py", line 128, in get_working_if
Apr  2 15:56:27.347213 sonic INFO swss#/supervisord: restore_neighbors     ifflags = struct.unpack("16xH14x", get_if(i, SIOCGIFFLAGS))[0]
Apr  2 15:56:27.347250 sonic INFO swss#/supervisord: restore_neighbors   File "/usr/local/lib/python3.7/dist-packages/scapy/arch/common.py", line 31, in get_if
Apr  2 15:56:27.347345 sonic INFO swss#/supervisord: restore_neighbors     return ioctl(sck, cmd, struct.pack("16s16x", iff.encode("utf8")))
Apr  2 15:56:27.347365 sonic INFO swss#/supervisord: restore_neighbors OSError: [Errno 19] No such device
The issue was reported to scapy devs secdev/scapy#3369, the fix is secdev/scapy#3371, however there is no released scapy version with this fix right now, thus decided to build scapy v2.4.5 from sources and apply the fix in a form of a patch.

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
2022-04-10 23:17:51 -07:00
saksarav-nokia
7d44032258 [Nokia][device] Updated the BCM config file to reduce the CPU usage (#10485)
Signed-off-by: Sakthivadivu Saravanaraj <sakthivadivu.saravanaraj@nokia.com>
2022-04-10 23:17:48 -07:00
Rajkumar-Marvell
0ace721718 [Marvell] Update armhf sai deb (#10403)
1) DHCP trap for IPV4 and IPV6
2) Interface ACL's (Ingress Everflow support)
3) 1G Autoneg support

Signed-off-by: Rajkumar Pennadam Ramamoorthy <rpennadamram@marvell.com>
2022-04-10 23:17:45 -07:00
Vivek R
4902c26bd8 [interfaces-config] "main exception: cannot find interfaces: eth0" error log avoided (#10463)
- Why I did it
Fixes #9628
During bootup, this error log is seen

Dec 22 04:26:29 sonic interfaces-config.sh[2546]: error: main exception: cannot find interfaces: eth0 (interface was probably never up ?)
This is of non-functional nature and doesn't affect the flow.

- How I did it
Dont take the ifdown if not needed

- How to verify it
Verified during reboot. Log did not appear and IP was acquired on eth0 as expected

Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
2022-04-10 23:17:30 -07:00
xumia
7c20568d43
[Unit Test]: Fix sonic config engine test not stable issue(#10147) (#10356)
Why I did it
Fix sonic config engine test not stable issue
2022-04-11 14:05:16 +08:00
Sudharsan Dhamal Gopalarathnam
7de0ea4e04
[yang][202111] Fixing Ethertype field regex in acl rule yang to accept decimal values (#10306)
Cherry-pick #10108

- Why I did it
Fixing issue #9991
The ACL RULE table field ETHER_TYPE can accept both hex as well as decimal values. However yang model didn't allow decimal values. Fixed it to allow decimal values (same pattern as in hex (1536-65535)

- How I did it
Updated yang model to handle decimal values

- How to verify it
Added UT to verify it.
2022-04-10 07:57:21 +03:00
xumia
e235513863
[Submodule]: update sonic-restapi (#10293)
bd97dfe Fix urllib3 CVE-2021-33503 issue (#104)
f159bfa Upgrade the containers to be based on Debian Buster (#103)
a1830c1 Fix OpenAPI spec to be readable by autorest (#101)
94805a3 Identify and report Vnet GUID for conflicting VNI (#99)
4832dfd Static route expiry if not specified as persistent (#98)
5cc4358 Add support for overlay ECMP (#96)
6822a46 [CI] Set diff cover threshold to 50% (#97)
dcc826a Add PR diff coverage (#95)
2022-04-08 17:45:23 -07:00
Kebo Liu
49045ba73c
[202111][Mellanox] Update hw-mgmt package to version V.7.0020.2004 (#10402)
This PR is to backport #10401 to 202111

- Why I did it
Take new hw-mgmt release to SONiC, including:
new features:

hw-mgmt: add to PSU FW upgrade tool command to show current FW version
hw-mgmt: add to PSU FW upgrade tool support for single-PSU-in-the-system FW upgrade
hw-mgmt: add attribute “/firmware” to show FW version of restricted upgradable PSUs only
hw-mgmt: Add NVME temperature reports attributes (_alarm/_crit/_min/_max)
bug fix:

psu: redundant i2c_addr attributes being created for psu 3 & 4 in system having only 2 psus.
hw-mgmt: in SPC1/2 i2c driver removal is too slow vs. ASIC reset causing non-functional log errors
PSU thresholds sysfs changed in 5.10 to “read only” preventing modification (modification required due PSU HW bug)
CPLD3 sysfs attribute missing after chip down/up flow
sysfs attributes missing when hw-mgmt is restarted (stop/start) within systemd
release notes can be found from link https://github.com/Mellanox/hw-mgmt/blob/V.7.0020.2004/debian/Release.txt

- How I did it
Update hw-mgmt make file with new version number
Update hw-mgmt submodule pointer

- How to verify it
Run platform regression on all Mellanox platform

Signed-off-by: Kebo Liu <kebol@nvidia.com>
2022-04-08 12:58:41 +03:00
mssonicbld
a90ca48e1e
[ci/build]: Upgrade SONiC package versions (#10476)
Why I did it
[ci/build]: Upgrade SONiC package versions
2022-04-08 07:28:32 +08:00
xumia
0acab757ec [Ci]: exclude innovium build and increase broadcom build timeout (#10482)
Why I did it
Exclude the innovium build in upgrading version build, currently, the builds are always failed, exclude the build temporarily.
Increase the broadcom build timeout.
2022-04-07 12:06:09 +00:00
xumia
2a97b1de44 [Build]: fix debian package not found issue (#10447)
Why I did it
[Build]: fix debian package not found issue
2022-04-06 05:53:53 +00:00
Shilong Liu
3522ac61fe [ci] Add azure pipeline to build common libs. (#10367)
Why I did it
To remove reference on Azure.sonic-buildimage artifacts.
Azure.sonic-buildimage has a higher failure rate.
2022-04-03 23:00:15 -07:00
xumia
5c526304ac [Security]: Enable hardening build options (#10369)
[Security]: Enable hardening build options
2022-04-03 23:00:12 -07:00
Marty Y. Lok
12c3940da2 [Nokia][device] Update the BCM config with Recycle ports info for Nokia IXR7250E platform (#10389)
Signed-off-by: mlok <marty.lok@nokia.com>
2022-04-03 23:00:07 -07:00
AmitKaushik7
6933485a92 Allow NULL Buffer Profile in buffer pg/queue yang files for Dynamic B… (#10353)
Why I did it
To address #10342 (Yang validation fails when Buffer profiles are configured with "NULL" values)
2022-04-03 23:00:01 -07:00
Junchao-Mellanox
b82f95cd6e [counter] Fix issue: non default counters will be delayed forever after fastboot (#10413)
- Why I did it
Fastboot will delay all counters in CONFIG DB, it relies on enable_counters.py to recover the delayed counters. However, enable_counters.py does not recover those non-default counters.

- How I did it
For non-default counters, if it is in CONFIG DB, put delay status to false after the waiting.

- How to verify it
Manual test
2022-04-03 22:59:56 -07:00
Judy Joseph
0302a86bd7 Update sonic-utilities
c5c105f (HEAD -> 202111, origin/202111) [PBH] Implement Edit Flows (#2093)
7050581 [techsupport] Handle minor fixes of TS Lock and update auto-TS (#2114)
3602f99 Fix issues in clear_qos (#2122)
4f96d3b Fixing get port speed when oper status is down (#2123)
2022-04-03 22:57:28 -07:00
Judy Joseph
16bb8777b7 Update sonic-swss
5bb99c7 Validate LAG has members before mirror session create (#2130)
ec6c8af [vxlan] Remove tunnel map objects on VNET tunnel removal (#2150)
7e7db19 [BFD]Registering BFD state change callback during session creation (#2202)
618fe07 [VNET]Fixing nexthop group delete during route change (#2198)
91b66df [portsorch]: Prevent LAG member configuration when port has active ACL binding (#2165)
29de9d0 Remove redundant and problematic code to skip "pool" field in buffer profile handling (#2197)
ded0b45 [PBH] Implement Edit Flows (#2169)
2ee0f49 [neighsyncd] increase neighsyncd timeout (#2209)
a0160c0 [QosOrch] The notifications cannot be drained in QosOrch in case the first one needs to retry (#2206)
2022-04-03 22:56:05 -07:00
xumia
c4f65f6f60 [ci] Fix the generating version file failure issue caused by artifacts folder change (#7464) (#10451)
Fix the generating version file failure issue caused by artifacts folder change.
When changing to use the same template for PR build, official build and packages version upgrade, the artifacts folder adding a "target" folder, the version upgrade task should be changed accordingly.
2022-04-02 14:39:58 +00:00
Shilong Liu
9008132871 [ci] Set default ACR in UpgrateVersion/PR/official pipeline. (#10341)
Why I did it
docker hub will limit the pull rate.
Use ACR instead to pull debian related docker image.

How I did it
Set DEFAULT_CONTAINER_REGISTRY in pipeline.
2022-04-02 00:07:22 +00:00
Shilong Liu
a3aa8041b9 [build] Fix issues found in reproducible build. (#10407) 2022-04-02 00:01:41 +00:00
xumia
7ddad86a15
[Build]: Fix armhf 202111 build broken issue (#10423)
* [Marvell] Update armhf SAI deb version 1.9.1 (#9865)

Move marvell armhf SAI deb to 1.9.1 to address build failures.

Signed-off-by: Rajkumar Pennadam Ramamoorthy <rpennadamram@marvell.com>

* [Marvell] Update armhf driver/sai deb version (#10126)

Fixed Marvell SAI deb version naming issue reported in Marvell-switching/sonic-marvell-binaries#62

Signed-off-by: Rajkumar Pennadam Ramamoorthy <rpennadamram@marvell.com>

* [Build]: only install grpc in amd64 (#10212)

[Build]: only install grpc in amd64
Unblock marvell-armhf build.

Co-authored-by: Rajkumar-Marvell <54936542+rajkumar38@users.noreply.github.com>

Why I did it
Cherry-pick commits from master to 202111 to fix build broken issue.
See detail in the commits.
2022-04-01 22:25:11 +08:00
xumia
00c13b430f [build][Bug]: Fix the command set_reproducible_mirrors not found issue (#10398)
Why I did it
Fix the command set_reproducible_mirrors not found issue during the build.
2022-04-01 01:25:16 +00:00
xumia
59af63f557 [Build]: Fix host image debian package version issue (#10358)
Why I did it
Fix host image debian package version issue.
The package dependencies may have issue, when some of debian packages of the base image are upgraded. For example, libc is installed in base image, but if the mirror has new version, when running "apt-get upgrade", the package will be upgraded unexpected. To avoid such issue, need to add the versions when building the host image.

How I did it
The package versions of host-image should contain host-base-image.
2022-03-30 09:29:19 +00:00
Shilong Liu
d6d12a0f80
[ci] Fix remove sonic-slave-* docker image issue when building sonic-slave* (#10296) (#10379) 2022-03-30 16:01:24 +08:00
Qi Luo
864e6078bc sonic-slave-buster pins the versions of Jinja2 and MarkupSafe in py3 (#10043)
#### Why I did it
Upstream breaking change, ref discussion https://github.com/pallets/markupsafe/issues/282
2022-03-29 15:58:41 -07:00
tjchadaga
5eea8e965e Update Broadcom SAI version to 6.1 (#10344) 2022-03-29 15:56:48 -07:00
tomer-israel
43b2e5eff4 Dynamic port configuration - solve lldp issues when adding/removing ports (#9386)
#### Why I did it
when adding and removing ports after init stage we saw two issues:

first:
In several cases, after removing a port, lldpmgr is continuing to try to add a port to lldp with lldpcli command. the execution of this command is continuing to fail since the port is not existing anymore.

second:
after adding a port, we sometimes see this warning messgae:
"Command failed 'lldpcli configure ports Ethernet18 lldp portidsubtype local etp5b': 2021-07-27T14:16:54 [WARN/lldpctl] cannot find port Ethernet18"

we added these changes in order to solve it.
#### How I did it
port create events are taken from app db only.
lldpcli command is executed only when linux port is up.

when delete port event is received we remove this command from  pending_cmds dictionary

#### How to verify it
manual tests and running lldp tests


#### Description for the changelog
Dynamic port configuration - solve lldp issues when adding/removing ports
2022-03-27 19:30:16 -07:00
pavannaregundi
fa1faaab54 [Marvell-armhf] Setting u-boot ftd_high to resolve kernel hung (#10204)
Why I did it
Kernel hang in during early boot is caused due overwriting of device tree with uncompressing kernel. Added the fdt_high which gives a safe offset from kernel location.

How I did it
Setting uboot environment variable fdt_high.

How to verify it
Successful boot of bullseye kernel on Marvell Armada 380/385.

Change-Id: I3e2521780f5ecdb3bdf6cbb6542250814ca11959
Signed-off-by: Pavan Naregundi <pnaregundi@marvell.com>
2022-03-27 19:30:13 -07:00
pavannaregundi
71a353c656 [Marvell-armhf] Fixing issues related to partition label (#10203)
Why I did it
Removing incorrect check in plt setup for fw_env config: This check was added before to compare 2 different types of disk. Now the check is redundant and check is not required as transition is complete.
2)Removing legacy_volume_label in create_partition: legacy_volume_label is not used in armhf install files. With legacy_volume_label initialized to NULL, current code will always return true for check, if demo_part exits.

How I did it
Change is about removing the redundant/incorrect code explained above.

How to verify it
uboot fw_printenv and fw_setenv is tested
onie-nos-install has be verified.

Signed-off-by: Pavan Naregundi <pnaregundi@marvell.com>
2022-03-27 19:30:09 -07:00
Saikrishna Arcot
409d5678c6 Check to see that the py2 and py3 version files exist before trying to sort them (#10325)
For Bullseye, Python 2 isn't present at all. This means that in certain
build cases (such as building something only for Bullseye), the version
file may not exist, and so the sort command would fail.

For most normal build commands, this probably won't be an issue, because
the SONiC build will start with Buster (which has both Python 2 and
Python 3 wheels built), and so the py2 and py3 files will be present
even during the Bullseye builds.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2022-03-27 19:30:06 -07:00
xumia
202dfb601d [Build]: Enable marvell-armhf PR check (#10259)
Why I did it
[Build]: Enable marvell-armhf PR check
Improve the azp dependencies, make the Test stage only depended on BuildVS stage. The Test stage will be triggered once the BuildVS stage finished, reduce the waiting time.
2022-03-27 19:29:59 -07:00
Kebo Liu
4090d26d9d [Mellanox] update MFT version to 4.18.0-106 (#10304)
- Why I did it
With the previous MFT 4.18.1-16 there is a bug in mstdump tool accessing wrong address. it is confirmed this issue does not exist in official 4.18.0-106.

- How I did it
Update the MFT version to 4.18.0-106

- How to verify it
Run regression on Mellanox platforms
2022-03-27 19:29:56 -07:00
xumia
c23ed56c08 [Build]: support to collect version when purging debian package (#10287)
Why I did it
support to collect version when purging debian package
Support to collect version multiple times

How I did it
Add the collection action before purging.
2022-03-27 19:29:52 -07:00
Volodymyr Boiko
43d726b5a1 [sonic-config-engine][portconfig] Do not parse JSON as Python AST (#10224)
#### Why I did it
To fix https://github.com/Azure/sonic-buildimage/issues/9643

#### How I did it
Instead of ast.literal_eval added python2 compat code for json strings unicode -> str convertion.

We need python2 compatibility since py2 sonic config engine (buster/sonic_config_engine-1.0-py2-none-any.whl target) is still included into the build (ENABLE_PY2_MODULES flag is set for buster). Once we abandon buster and python2, this compat and ast.literal_eval could be cleaned up all through the code base.

#### How to verify it
run steps from the linked issue
2022-03-27 19:29:48 -07:00
Marty Y. Lok
9c859a7674 [Nokia][IXR7250E]Update Nokia IXR7250E platform device data file (#10091)
Signed-off-by: mlok <marty.lok@nokia.com>
2022-03-27 19:29:44 -07:00
jingwenxie
8f15f2d574 [yang] support ACL ACCEPT action (#9784)
Why I did it
ACL have ACCEPT action indeed, but yang doesn't support it.

How I did it
Add 'ACCEPT' enum to sonic-types.yang.j2

How to verify it
Run the YANG model unit tests
2022-03-27 19:29:39 -07:00
Judy Joseph
d2f92eb3e0 Update sonic-utilities
6562ad3 (HEAD -> 202111, origin/202111) [sfpshow][recycle_port] sfpshow script needs to skip recycle ports (#2109)
f184a61 Update `config mirror_session` CLI to support heximal gre type value (#2095)
2022-03-27 19:27:13 -07:00
Judy Joseph
9a39913aab Update sonic-swss
17315fc (HEAD -> 202111, origin/202111) [Vxlanmgr] vnet netdev cleanup during config reload fix (#2191)
f820af3 [aclorch] Do not fail ACL rule remove flow if rule already deleted (#2183)
2022-03-27 19:24:43 -07:00
Judy Joseph
a1cf8a52dd Update sonic-py-swssdk
03936ea (HEAD -> 202111, origin/202111) define index for recirc port (#118)
d48f750 [port_util] Fix issue: port_util.get_vlan_interface_oid_map should not raise exception when DB has not RIF data (#117)
2022-03-27 19:22:34 -07:00
FuzailBrcm
b3478972ca [pddf]: Update PDDF utils and common platform APIs for Debian Bullseye (#9585)
- Why I did it
PDDF utils were python2 compliant and they needed to be migrated to Python3 (as per Bullseye)
PDDF common platform APIs file name changed as the name was already in use
Indentation issues
Dead/redundant code needed to be removed

- How I did it
Made files Python3 compliant
Indentation corrected
Redundant code removed

- How to verify it
AS7326 Accton platform uses PDDF. PDDF utils were run on this platform to verify.
2022-03-25 23:09:25 +00:00
Samuel Angebault
e10504592a
[202111][Arista] Update driver submodules (#9495)
cherry-pick of #9393 for 202111

 - Use SfpOptoeBase by default to leverage new `sonic_xcvr` refactor
 - Add support for `Woodleaf` product
 - Move `libsfp-eeprom.so` to a different `.deb` package
 - Add new logrotate configuration for arista logs
 - Improve logging mechanism for the drivers (IO loglevel, fix syslog duplicates)
 - Initialize chassis cards in parallel
 - Refactor of `get_change_event` to fix interrupts treated as presence change
2022-03-23 21:19:13 +05:30
xumia
d5354df3d8 [Build]: Fix armhf mirrors not existing issue (#10312)
Why I did it
[Build]: Fix armhf mirrors not existing issue
The mirror endpoint debian-archive.trafficmanager.net does not support armhf, change to use deb.debian.org and security.debian.org.
2022-03-22 07:28:21 +00:00
guxianghong
64f5b98caa
[centec][build] Fix docker-syncd-centec-rpc build fail (#9612) (#9964)
Why I did it
Fix docker-syncd-centec-rpc build fail. Detail fail log can be derived from https://dev.azure.com/mssonic/be1b070f-be15-4154-aade-b1d3bfb17054/_apis/build/builds/71157/logs/9.

How I did it
Merge PR #9612 from master branch.

How to verify it
make ENABLE_SYNCD_RPC=y target/docker-syncd-centec-rpc.gz
make ENABLE_SYNCD_RPC=y target/docker-saiserver-centec.gz
2022-03-21 09:56:59 -07:00
xumia
4fccda4ab9 [Build]: Use one debian mirror config (#10274)
Why I did it
Use one debian mirror config.
The empty config in https://github.com/Azure/sonic-buildimage/blob/master/files/image_config/apt/sources.list overrides the file https://github.com/Azure/sonic-buildimage/blob/master/files/apt/sources.list.amd64 (armhf/arm64), it does not make sense.
All the content in files/image_config/apt is no use, any one wants to add mirror config, please add in files/apt.

How I did it
Remove files/image_config/apt and the reference.
2022-03-21 08:56:24 +00:00
Yang Wang
6239897d25
Correct the pkg name for thrift.0.13.0 (#9688) (#10292)
Correct thrift.0.13.0 dependent package name.
In previous code, the buildout target was named as PYTHON3_THRIFT_0_13_0
But when add the prackage to LIBTHRIFT_0_13_0, it typo as PYTHON_THRIFT_0_13_0

Co-authored-by: Yang Wang<yangwang1@microsoft.com>
2022-03-21 11:18:07 +08:00
xumia
a9d9258d40 [Build]: Support to set jobFilters (#10280)
[Build]: Support to set jobFilters
2022-03-21 02:28:14 +00:00
Judy Joseph
365d456aaf Update sonic-utilities
9968d60 (HEAD -> 202111, origin/202111) [sonic-package-manager] do not mod_config for whole config db when setting init_cfg (#2055)
4b3d53f [generate_dump] exclude mft and mlx folders from /etc (#2072)
51d92ae Validation check correction while adding a member to PortChannel (#2078)
6a43306 [techsupport] Added a lock to avoid running techsupport in parallel (#2065)
44cfdd9 Try get port operational speed from STATE DB (#2030)
45ea623 Fix sonic-installer failure due to missing import
2022-03-20 15:46:09 -07:00
Junchao-Mellanox
2773d29220 [Mellanox] Fix issue: psu might use wrong voltage sysfs which causes invalid voltage value (#10231)
- Why I did it
Fix issue: psu might use wrong voltage sysfs which causes invalid voltage value. The flow is like:

1. User power off a PSU
2. All sysfs files related to this PSU are removed
3. User did a reboot/config reload
4. PSU will use wrong sysfs as voltage node

- How I did it
Always try find an existing sysfs.

- How to verify it
Manual test
2022-03-20 15:27:00 -07:00