Commit Graph

5241 Commits

Author SHA1 Message Date
shlomibitton
d8fa3eb92f
Add a offset bound check during DHCPv6 header inspection to prevent segmentation fault issue (#10560)
Signed-off-by: Shlomi Bitton <shlomibi@nvidia.com>
2022-04-19 09:07:19 -07:00
xumia
331bc53c6f [Build]: Support reproducible build for release branches (#9426)
[Build]: Support reproducible build for release branches #9426
2022-04-18 08:19:29 +08:00
Saikrishna Arcot
b069e0921b 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-04-18 08:19:29 +08:00
xumia
10b93d9281 [Build]: Fix pip version constraint conflict issue (#10525)
Why I did it
[Build]: Fix pip version constraint conflict issue
When a version is specified in the constraint file, if upgrading the version in build script, it will have conflict issue.

How I did it
If a specified version has specified in pip command line, then the version constraint will be skipped.
2022-04-18 08:19:29 +08:00
xumia
6b88f4b33d [Bug][Build]: fix the file not found issue caused by the relative pat… (#9443)
Fix the nodesource.list cannot read issue, it is cased by the full path not used.

```
2021-12-03T06:59:26.0019306Z Removing intermediate container 77cfe980cd36
2021-12-03T06:59:26.0020872Z  ---> 528fd40e60f6
2021-12-03T06:59:26.0021457Z Step 81/81 : RUN post_run_buildinfo
2021-12-03T06:59:26.0841136Z  ---> Running in d804bd7e1b06
2021-12-03T06:59:29.1626594Z DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
2021-12-03T06:59:34.2960105Z /usr/bin/sed: can't read nodesource.list: No such file or directory
2021-12-03T06:59:34.5094880Z The command '/bin/sh -c post_run_buildinfo' returned a non-zero code: 2
```

Co-authored-by: Ubuntu <xumia@xumia-vm1.jqzc3g5pdlluxln0vevsg3s20h.xx.internal.cloudapp.net>
2022-04-18 08:19:29 +08:00
xumia
72fea76ef7
Support to build armhf/arm64 platforms on arm based system (#7731) (#10577)
Why I did it
Support to build armhf/arm64 platforms on arm based system without qemu simulator.
When building the armhf/arm64 on arm based system, it is not necessary to use qemu simulator.

How I did it
Build armhf on armhf system, or build arm64 on arm64 system, by default, qemu simulator will not be used.
When building armhf on arm64, and you have enabled armhf docker, then it will build images without simulator automatically. It is based how the docker service is run.

Docker base image change:
For amd64, change from debian:to amd64/debian:
For arm64, change from multiarch/debian-debootstrap:arm64- to arm64v8/debian:
For armhf, change from multiarch/debian-debootstrap:armhf- to arm32v7/debian:
See https://github.com/docker-library/official-images#architectures-other-than-amd64
The mapping relations:
arm32v6 --- armel
arm32v7 --- armhf
arm64v8 --- arm64

Docker image armhf deprecated info: https://hub.docker.com/r/armhf/debian, using arm32v7 instead.
2022-04-15 18:00:14 +08:00
Shilong Liu
2058147cca
[ci] Fix PR validation issue involved by cherry-pick enabling ACR.
involved un-expectec lines.
2022-04-13 11:59:57 +08:00
xumia
56be714935
[Submodule]: update sonic-restapi (#10295)
[Submodule]: update sonic-restapi
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)
e842c5f Generate code coverage for Unit Tests (#94)
f9bbed3 Convert Unit Tests from unittest framework to pytest framework (#93)
e466ac2 Reject incorrect CIDR addresses while configuring routes (#91)
07cf59d [CI] Set up Azure pipeline (#89)
47476ac Upgrade Go version to 1.14 (#90)
ee887c7 Added flag to make go/pkg/ folder writable (removable) (#87)
6cfc8fe (origin/shilongliu/azp) Default Vrf static route support (#85)
d3e8b8e Add BFD config to subinterface and neighbor (#68)
8d4fd4a Fix WS-2018-0594 potential non-random UUIDs security issue (#78)
fad87fa Update API description for default vrf and ecmp routes (#82)

Some of them have been updated in 202012 branch, should be added in 202106 as well.
2022-04-08 17:42:46 -07:00
Shilong Liu
ac9c0b5269 [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-08 13:09:58 +08:00
xumia
b1105af83c [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-04-07 09:16:02 +08:00
xumia
b93080d246 [Build][Bug]: fix the warning message not printed as expected issue (#10278)
Fix the warning message not printed as expected issue
2022-04-07 09:16:02 +08:00
xumia
92f97bddb9 [Build]: Fix installing dpkg packages in parallel issue (#10175)
Why I did it
Fix the debian packages installing in parallel issue.
Add apt hook command to support apt to print no version control info.
2022-04-07 09:16:02 +08:00
xumia
2177a68b36 [Build]: Cleanup the reproducible mirrors when build complete (#9132)
Why I did it
The reproducible build mirrors are only used during the build, the mirrors can be removed after that.
2022-04-07 09:16:02 +08:00
xumia
0cecab27fa [Build]: Fix the version not found issue (#9331)
When we update the a sai package downing from a remote server, we need to update the version file as well currently, but the reproducible build feature is not enabled in master, it can only be detected when merging the code into the release branches, such as 202106, 202012, etc.
The reproducible feature is to reduce the build failure, not need to break the build when the version not specified. If version not specified, the best choice is to accept the version from remote server.

Co-authored-by: Ubuntu <xumia@xumia-vm1.jqzc3g5pdlluxln0vevsg3s20h.xx.internal.cloudapp.net>
2022-04-07 09:16:02 +08:00
mssonicbld
04e24c0f29
[ci/build]: Upgrade SONiC package versions (#10452)
Upgrade SONiC Versions #10452
2022-04-06 19:27:26 +08:00
xumia
d354cd84d6 [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:41:13 +00:00
xumia
a4b26ce298 Update azure-pipelines-UpgrateVersion.yml for Azure Pipelines
Remove duplicate resources define in template
2022-04-02 08:29:02 +08:00
xumia
ad21d1ca74 Support dpkg cache for marvell-armhf (#9381)
Why I did it
Support marvell-armhf dpkg cache
2022-04-02 00:14:51 +00:00
Shilong Liu
e28c30d4e4 [build] Fix issues found in reproducible build. (#10407) 2022-04-01 23:58:48 +00:00
Shilong Liu
1366e0bb63 [ci] Use template from master branch in UpgrateVersion/sonic-slave pipeline (#10380) 2022-04-01 23:58:29 +00:00
xumia
32c00fb014 [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-03-31 06:24:44 +00:00
Shilong Liu
ab91b607f2
[ci] Fix remove sonic-slave-* docker image issue when building sonic-slave* (#10296) (#10381) 2022-03-30 16:08:52 +08:00
xumia
ca85c6be5e
[Unit Test]: Fix sonic config engine test not stable issue(#10147) (#10355)
Why I did it
Fix sonic config engine test not stable issue
2022-03-29 10:41:11 +08:00
Alexander Allen
b10833425c
[202106] [Mellanox] Fix DPB supported breakout modes (#10129)
Cherry pick of #10072

- Why I did it
Removing DPB breakout modes that require adjacent ports to be disabled as that is not supported by the current DPB infrastructure.

Correspondingly had to remove the hwsku.json file from any SKUs which utilized these removed modes such that the system will fall back to ports_config.ini and DPB will not be supported for those SKUs.

- How I did it
Modified the platform.json files of Mellanox devices.

- How to verify it
Execute show int break [Ethernet] on the affected platforms and ensure there are no modes present that would require an adjacent port to be disabled to function.
2022-03-27 09:15:23 +03:00
Oleksandr Ivantsiv
40265e8dde [sonic-config-engine]: Improve comparison between default and supported breakout modes. (#9278)
Closes #7958 

#### Why I did it
The previous implementation of sonic-cfggen did a simple comparison between default breakout mode in
hwsku.json and supported modes in platform.json. To set a different default speed in hwsku.json
it was required to add one more entry to supported modes in platfrom.json file:

1x10G[100G,50G] vs 1x100G[50G,10G]

The new implementation does more intelligent parsing and analysis of supported and default modes. It
allows changing default speed without adding a new entry to platform.json.

#### How I did it
Add more intelligent parsing and analysis of supported and default modes.

#### How to verify it
Run sonic-config-engine unit tests from sonic-config-engine/tests directory
2022-03-24 05:15:11 +00:00
Alexander Allen
b5849c0918 [pmon] Clean up supervisord chassis_db_init entry and fix startsecs (#10071)
Why I did it
Code review was still in progress when #9858 was merged and upon further testing I have arrived at a better solution.

How I did it
Modified supervisord configuration j2 template for pmon to require no minimum uptime for chassisd_db_init and to remove the redundant exit_codes directive

How to verify it
Boot switch and verify in syslog that there are no errors related to chassis_db_init
2022-03-24 05:14:38 +00:00
Sudharsan Dhamal Gopalarathnam
4da20e7ff9 [containerd]Fixing container commands when mode is local and state is disabled (#9986)
Why I did it
During warm-reboot and fast-reboot the below error logs appear
Feb 3 22:05:15.187408 r-lionfish-13 ERR container: docker cmd: kill for nat failed with 404 Client Error for http+docker://localhost/v1.41/containers/nat/json: Not Found ("No such container: nat")

The container command when called for local mode doesn't check if it is enabled before calling docker kill which throws the above errors.
b6ca76b482/scripts/fast-reboot (L699)

How I did it
Checking feature state if local mode and returning error exit code along with valid debug message.

How to verify it
Manually tested with warm-reboot and fast-reboot
Added UT to verify it.
2022-03-24 05:14:01 +00:00
xumia
43c32dfa5d
[Build]: Use one debian mirror config (#10274) (#10300)
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-23 22:42:52 +08:00
xumia
37aaed44bd [Build]: Support to set jobFilters (#10280)
[Build]: Support to set jobFilters
2022-03-21 02:28:54 +00:00
Samuel Angebault
01fdf5954b
[202106][Arista] Update driver submodules (#10279)
- add mechanism to power off linecard and fabrics on supervisor reboot (only lc by default)
- improve lc interface config script
- fix exception handling in logging
2022-03-20 17:32:09 -07:00
Shilong Liu
c14462c6a3
Add a config variable to override default container registry instead of dockerhub. (#10166) (#10261)
* Add variable to reset default docker registry
* fix bug in docker version control
2022-03-19 00:11:09 +08:00
Guohan Lu
fd8d80486d [ci]: build marvel armhf on sonicbld-armhf pool [Guohan Lu]
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2022-03-18 14:55:15 +00:00
Guohan Lu
2340071d4a [ci]: build centec arm64 to sonicbld-arm64 pool
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2022-03-15 12:35:50 +00:00
xumia
d75c569ef0 [Build][Ci]: Support to use the cisco sai packages built by azp (#10102)
Why I did it
Support to use the cisco sai packages built by azp
2022-03-08 02:18:58 +00:00
Marty Y. Lok
f94ce408c6 [chassis][supervisor]monit container-checker failed due to unexpected "database-chassis" docker running #9042 (#9043)
Why I did it
Fixed the monit container_checker fails due to unexpected "database-chassis" docker running on Supervisor card in the VOQ chassis. fixes #9042

How I did it
Added database-chassis to the always running docker list if platform is supervisor card.

How to verify it
Execute the CLI command "sudo monit status container_checker"


Signed-off-by: mlok <marty.lok@nokia.com>
2022-03-04 21:49:52 +00:00
wenyiz2021
05e566ed45 Update container_checker for multi-asic devices when state is 'always_enabled' (#10067)
* Update container_checker for multi-asic devices 

Update container_checker for multi-asic devices to add database containers in always_running_containers. 
Previous change was made for single-asic, and that database containers were not considered as feature when writing to state_db.

* Update container_checker

Update an indent
2022-03-04 21:48:53 +00:00
Samuel Angebault
5419e5de71 Add platform.json configs for all denali SKUs (#9717) 2022-03-01 20:17:56 +00:00
Junchao-Mellanox
bc9b39a2fe Stop PMON before swss during warm reboot (#10046)
- Why I did it
Stopping swss and syncd causes some driver module unloading. Those driver modules are depended by PMON. This could trigger ERROR logs in syslog.

- How I did it
Adjust warmboot shutdown order in make file

- How to verify it
Manual test
2022-03-01 20:13:09 +00:00
Junchao-Mellanox
74c49a7682 [system-health] Fix file handle leak (#10059)
- Why I did it
swsscommon.ConfigDBConnector does not automatically close connection when the instance is recycled by python. So, it should not create this instance each time calling check_services. It will cause error like Failed to read from file /var/run/hw-management/led/led_status_capability - OSError(24, 'Too many open files')

- How I did it
Only connect DB once in init

- How to verify it
Manual test
2022-03-01 20:12:03 +00:00
Alexander Allen
212cdfbe80 [pmon] Fix chassis_db_init exit not being expected (#9858)
- Why I did it
Error log was shown on switches during boot
pmon#supervisord 2021-12-22 04:27:16,709 INFO exited: chassis_db_init (exit status 0; not expected)

- How I did it
Add exit code zero as an expected exit code and also disable autorestart.

- How to verify it
Boot the switch and ensure the above log line does not appear.
2022-03-01 03:49:55 +00:00
Alexander Allen
127a93c201 [Mellanox] Add 2x40G support to MSN4700 platform (#9485)
- Why I did it
MSN4700 platform has 8 lanes per port and thus can support 2x40G with each lane running at 10G

- How I did it
Added 40G to 2x200G breakout mode in platform.json

- How to verify it
Run config int break Ethernet0 2x40G[200G,100G,50G,25G,10G,1G]
And verify the command runs successfully and the port speed was set to 40G with a 2x breakout.
2022-03-01 03:48:25 +00:00
Stephen Sun
84942c10d6 Fix typo and missing files in SN3800 and SN4600C's buffer templates (#9537)
Why I did it
Fix typo and missing files in SN3800 and SN4600C's buffer templates

How I did it
ingress_lossless_xoff_size => ingress_lossless_pool_xoff add missing files for SN4600C-D100C12S2

How to verify it
Deploy the fix and verify whether the device can be up.

Signed-off-by: Stephen Sun <stephens@nvidia.com>
2022-03-01 03:42:27 +00:00
noaOrMlnx
be7f31e6d2 [CoPP] Add always_enabled field (#9302)
*Add the "always_enabled" field to copp_cfg.j2 file, in order to allow traps without an entry in features table, to be installed automatically.
2022-03-01 03:40:40 +00:00
Mahesh Maddikayala
87d18eb6c3
[libsaibcm] Fix the expiry date on the libsaibcm debian packages. (#10090) 2022-02-28 08:52:11 -08:00
Shilong Liu
d05765cc06 [build] Increase vs platform kvm disk size (#10001)
Info: Attempting file://dev/vdb/onie-installer ...
Info: Attempting file://dev/vdb/onie-installer.bin ...
cp: write error: No space left on device
Failure: local_fs_run():/dev/vdb Unable to copy /tmp/tmp.CPY0ad/onie-installer.bin to tmpfs

vs image is failing. Increase kvm device space.
2022-02-25 10:26:46 -08:00
xumia
a3733384bf [Security]: Upgrade urllib3 to fix CVE-2021-33503
See https://security.archlinux.org/CVE-2021-33503
2022-02-25 09:13:48 +00:00
Mahesh Maddikayala
2153ea41a5
[libsaibcm] Update libsaibcm with PFC patches (#10066) 2022-02-23 14:24:10 -08:00
xumia
93a22d7df5 [Build]: Fix marvell sai package version parsing issue
Fix marvell sai package version parsing issue (#10009)
2022-02-19 04:23:29 +00:00
Nazarii Hnydyn
293ca0b870 [build]: Fix SAE to support debug flavor build. (#9435)
setup PACKAGE_NAME, PATH, MACHINE, VERSION info for debug docker

Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
2022-02-09 14:20:22 +08:00
Saikrishna Arcot
aa69f6b94c [docker-mgmt-framework]: Don't overwrite /etc/passwd and /etc/group with symlinks (#9375)
Fixes #9376

Because /etc/passwd and /etc/group have been overwritten with symlinks
to /host_etc/passwd and /host_etc/group, the debug container build
fails. This is because the debug container is built without /etc being
mounted at /host_etc in the container (which does happen at runtime).
Because of that, /etc/passwd and /etc/group don't exist, which causes
some package installation errors when openssh-client tries to create a
group.

This is a partial revert of 1347f29178.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2022-02-08 13:14:41 +08:00