Commit Graph

5981 Commits

Author SHA1 Message Date
Liu Shilong
e858dc0f40
[build] Add retry when make SONiC image to improve success rate. (#12325) (#13129)
Why I did it
Makefile needs some dependencies from the Internet. It will fail for network related issue.
Retries will fix most of these issues.

How I did it
Add retries when running commands which maybe related with networking.

How to verify it
2022-12-23 18:51:33 +08:00
mssonicbld
bbbc3f5c1c
[ci/build]: Upgrade SONiC package versions (#13096) 2022-12-19 00:39:24 +08:00
mssonicbld
6afa83a9a6
[ci/build]: Upgrade SONiC package versions (#13094) 2022-12-18 00:48:26 +08:00
mssonicbld
78900d83d2
[ci/build]: Upgrade SONiC package versions (#13019) 2022-12-12 01:40:02 +08:00
mssonicbld
1b1a534304
[ci/build]: Upgrade SONiC package versions (#12886) 2022-12-06 02:05:15 +08:00
mssonicbld
bc3781df8c
[ci/build]: Upgrade SONiC package versions (#12839) 2022-11-28 01:46:22 +08:00
mssonicbld
9f65069cfb
[ci/build]: Upgrade SONiC package versions (#12815) 2022-11-26 03:17:39 +08:00
xumia
d455db672a
Fix error handling when failing to install a deb package (#11846) (#12777)
Cherry-pick PR: #11846

Signed-off-by: Saikrishna Arcot sarcot@microsoft.com

Why I did it
The current error handling code for when a deb package fails to be
installed currently has a chain of commands linked together by && and
ends with exit 1. The assumption is that the commands would succeed,
and the last exit 1 would end it with a non-zero return code, thus
fully failing the target and causing the build to stop because of bash's
-e flag.

However, if one of the commands prior to exit 1 returns a non-zero
return code, then bash won't actually treat it as a terminating error.
From bash's man page:

-e      Exit immediately if a pipeline (which may consist of a single simple
	command), a list, or a compound command (see SHELL GRAMMAR above),
        exits with a non-zero status.  The shell does not exit if the
        command that fails is part of the  command  list  immediately
        following a while or until keyword, part of the test following the
        if or elif reserved words, part of any command executed in a && or
        || list except the command following the final && or ||, any
        command in a pipeline but the last, or if the command's return
        value is being inverted with !.  If a compound command other than a
        subshell returns a non-zero status because a command failed while
        -e was being ignored, the shell does not exit.
The part part of any command executed in a && or || list except the command following the final && or || says that if the failing command
is not the exit 1 that we have at the end, then bash doesn't treat it
as an error and exit immediately. Additionally, since this is a compound
command, but isn't in a subshell (subshell are marked by ( and ),
whereas { and } just tells bash to run the commands in the current
environment), bash doesn't exist. The result of this is that in the
deb-install target, if a package installation fails, it may be
infinitely stuck in that while-loop.

This was seen when the snmpd package upgrade happened, and
builds were failing to install the mismatching libsnmp-dev package,
the builds did not immediately terminate; instead, the installation
was retried again and again, suggesting it was stuck in some infinite
loop. The build jobs finally terminated only because of the timeout
specified for the jobs.

How I did it
There are two fixes for this: change to using a subshell, or use ;
instead of &&. Using a subshell would, I think, require exporting any
shell variables used in the subshell, so I chose to change the && to
;. In addition, at the start of the subshell, set +e is added in,
which removes the exit-on-error handling of bash. This makes sure that
all commands are run (the output of which may help for debugging) and
that it still exits with 1, which will then fully fail the target.

How to verify it
2022-11-24 09:37:15 +08:00
mssonicbld
a980784e91
[ci/build]: Upgrade SONiC package versions (#12693) 2022-11-21 01:26:43 +08:00
Ravindranath C K
66b6c212fc
[Innovium] Backport platform fixes from master (#12526)
Syncd container restart for Innovium:
   https://github.com/sonic-net/sonic-buildimage/pull/11497

 Innovium platform shell
   https://github.com/sonic-net/sonic-buildimage/pull/11845

Signed-off-by: rck-innovium rck@innovium.com
2022-11-04 11:29:05 -07:00
mssonicbld
10c12e12e4
[ci/build]: Upgrade SONiC package versions (#12586) 2022-11-03 02:39:43 +08:00
mssonicbld
7c13f90b59
[ci/build]: Upgrade SONiC package versions (#12552) 2022-10-31 01:24:53 +08:00
mssonicbld
17d9e21e76
[ci/build]: Upgrade SONiC package versions (#12548) 2022-10-29 02:39:20 +08:00
judyjoseph
ba3326088c
Update sonic-swss submodule with (#12521)
7f24448 [202111] cherrypick ACL fixes (#2298) and (#2351) (#2497)
2022-10-28 08:37:30 -07:00
mssonicbld
c500f5d476
[action] Use github code scan instead of LGTM. (#12402) (#12506) 2022-10-27 00:53:49 +08:00
xumia
01f8c0185b
[202111] Change submodule path from Azure to sonic-net (#12309)
Why I did it
Change the path of sonic submodules that point to "Azure" to point to "sonic-net"

How I did it
Replace "Azure" with "sonic-net" on all relevant paths of sonic submodules
2022-10-26 16:29:12 +08:00
Liu Shilong
28751cec56 [ci] Fix bug involved by PR 11810 which affect official build pipeline (#11891)
Why I did it
Fix the official build not triggered correctly issue, caused by the azp template path not existing.

How I did it
Change the azp template path.
2022-10-26 08:22:31 +08:00
Liu Shilong
fc9dee41a2 [ci] Update reproducible build related pipeline. (#11810) 2022-10-26 08:22:31 +08:00
Liu Shilong
acfb23653e [ci] Disable reproducible build in master branch official build (#11452) 2022-10-26 08:22:31 +08:00
Liu Shilong
cb4ac4285d [ci] Update azp template variable for reproducible build. (#11419) 2022-10-26 08:22:31 +08:00
mssonicbld
45b403d71d
[ci/build]: Upgrade SONiC package versions (#12422) 2022-10-18 13:57:10 +08:00
mssonicbld
ac6c4870f2
Fix dhcp option buffer issue (#12033) (#12385)
Why I did it
Current isc-dhcp uses below code to remove DHCP option:
memmove(sp, op, op[1] + 2);
sp += op[1] + 2;

sp points to the option to be stripped, we can call it as option S.
op points to the option after options S, we can call it as option O.
DHCP option is a typical type-length-value structure, the first byte is type, the second byte is length, and remain parts are value.
In this case, option O length is bigger than option S, and more than 2 bytes, after the memmove, we will get this result:

Now Option S and Option O are overwritten, op[1] was the length of Option O, and it's modified after memmove.
But current implementation is still using op[1] as length to update sp (sp+=op[1]+2), so we get the wrong sp.

How I did it
Create patch from https://github.com/isc-projects/dhcp
The new impelementation use mlen to store the length of Option O before memmove, that's how it fixed the bug.
size_t mlen = op[1] + 2;
memmove(sp, op, mlen);
sp += mlen;

How to verify it
I have a PR for sonic-mgmt to cover this issue:
sonic-net/sonic-mgmt#6330

Signed-off-by: Gang Lv ganglv@microsoft.com

Signed-off-by: Gang Lv ganglv@microsoft.com
Co-authored-by: ganglv <88995770+ganglyu@users.noreply.github.com>
2022-10-16 11:18:37 +08:00
mssonicbld
1555ec30ee
[ci/build]: Upgrade SONiC package versions (#12390) 2022-10-14 16:08:25 +08:00
mssonicbld
63ed7b75cf
[Build][Bug] Fix apt-get remove version not lock issue (#12193) (#12352)
Why I did it
Fix apt-get remove/purge version not locked issue when the apt-get options not specified.

How I did it
Add a space character before and after the command line parameters.

Co-authored-by: xumia <59720581+xumia@users.noreply.github.com>
2022-10-13 10:09:19 +08:00
mssonicbld
66fa1920bb
[ci/build]: Upgrade SONiC package versions (#12283)
Upgrade SONiC Versions
2022-10-11 07:52:14 +08:00
mssonicbld
4d9788573c
[actions] Add auto cherry-pick actions to release branch (#11496) (#12337)
* [actions] Add github actions to auto cherry-pick prs to release branches

* Add README, fix workflow

Co-authored-by: Liu Shilong <shilongliu@microsoft.com>
2022-10-10 17:24:23 +08:00
mssonicbld
ec691aa9f4
[ci/build]: Upgrade SONiC package versions (#12247) 2022-10-03 03:59:36 +08:00
mssonicbld
92780af0ce
[ci/build]: Upgrade SONiC package versions (#12194) 2022-09-28 06:40:24 +08:00
xumia
f47872446b
Fix dbus-run-session command not found issue when install dbus-python (#12009) (#12054)
Why I did it
Cherry-pick #12009, and fix code conflict.
Fix the dbus-pyhon installation failure when building docker-sonic-vs, caused by the command dbus-run-session not found.
The command "dbus-run-session" should be the new dependency introduced in dbus-python 1.3.2, the old version 1.2.18 does not have the issue.

How I did it
Install the dbus debian package which contains the command dbus-run-session.
It is not a blocking issue on release branches. The release branches with reproducible build feature can avoid such issue in official builds and PR builds, it only block the version upgrade (trying to upgrade from 1.2.18 to 1.3.2).

How to verify it
2022-09-26 20:42:51 +08:00
mssonicbld
fc04f74dc9
[ci/build]: Upgrade SONiC package versions (#11971) 2022-09-06 03:36:22 +08:00
mssonicbld
aa6a7c3f4a
[ci/build]: Upgrade SONiC package versions (#11963) 2022-09-05 04:16:35 +08:00
mssonicbld
94ebd5cfbf
[ci/build]: Upgrade SONiC package versions (#11916) 2022-09-03 04:09:38 +08:00
Kebo Liu
949b426a2a
update Mellanox SDK/FW to 4.5.2318 2010.2318 (#11774)
- Why I did it
Update SDK/FW version - 4.5.2318/2010_2318 to pick up new fixes:
1. Cr space timeout on Hold and Release GW - at warm boot
2. SPC-1 Port in stuck PHY_UP after peer side rebooted
3. memory leak in sx_api_router_ecmp_update_set

- How I did it
update the make file with the new version number
update submodule Switch-SDK-drivers pointer

- How to verify it
run sonic regression

Signed-off-by: Kebo Liu <kebol@nvidia.com>
2022-08-29 11:08:22 +03:00
mssonicbld
0356a20a61
[ci/build]: Upgrade SONiC package versions (#11856) 2022-08-29 14:08:18 +08:00
RogerX87
ad7395323f
Add Wistron SW-TO3200K and 6512-32R platform support (#11818)
Signed-off-by: RogerX87 <RogerX87@gmail.com>

Signed-off-by: RogerX87 <RogerX87@gmail.com>
2022-08-26 09:19:13 -07:00
Kebo Liu
b8dc515185
[snmpd]: Update to 5.9+dfsg-4+deb11u1 to match Debian version (#11763) (#11844)
* [snmpd]: Update to 5.9+dfsg-4+deb11u1 to match Debian version

This brings in some security fixes.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Co-authored-by: Saikrishna Arcot <sarcot@microsoft.com>
2022-08-25 09:01:43 -07:00
mssonicbld
003c8dfdef
[ci/build]: Upgrade SONiC package versions (#11719) 2022-08-15 05:47:39 +00:00
mssonicbld
1d3243221b
[ci/build]: Upgrade SONiC package versions (#11697) 2022-08-11 23:19:59 +00:00
Vivek
d14f1a63ca
[Mellanox] [202111] Add arch folder to SDK binary location (#11278) (#11598)
- Why I did it
This is for the eventual support of multiple architectures for the mellanox platform.

- How I did it
Change the location of the binaries in Switch-SDK-drivers so that the path specifies the target architecture in addition to the target distribution that the debians are built for.

This is the most straightforward way to separate binaries built against different architectures and selectively target them for installation in the mellanox SONiC image.

- How to verify it
Build SONiC for mellanox and verify it compiles successfully.
2022-08-11 08:28:49 +03:00
Liu Shilong
5506f1be8f
[actions] Fix automerge actions don't work issue. (#11675) 2022-08-10 15:50:33 +08:00
mssonicbld
d750fad2e9
[ci/build]: Upgrade SONiC package versions (#11440) 2022-08-07 16:52:48 +00:00
Liu Shilong
9d1ef336ff
[ci] Update azp reference to support transfering organization from Azure to sonic-net (#11603) 2022-08-02 16:15:33 +08:00
Liu Shilong
ffd289b1c1
[ci] Transfer organization from Azure to sonic-net for sonic-mgmt (#11559) (#11561)
Why I did it
Transfer organization from Azure to sonic-net for sonic-mgmt
2022-07-28 15:31:20 +08:00
xumia
6c9ace84ec
[Build] Fix the missing debian package for reproducible build issue (#11338)
Why I did it
Fix the missing debian package for reproducible build issue.

The gnupg2 should be added into the version file.
https://dev.azure.com/mssonic/build/_build/results?buildId=118139&view=logs&j=88ce9a53-729c-5fa9-7b6e-3d98f2488e3f&t=8d99be27-49d0-54d0-99b1-cfc0d47f0318

The following packages have unmet dependencies:
 gnupg2 : Depends: gnupg (>= 2.2.27-2+deb11u2) but 2.2.27-2+deb11u1 is to be installed
E: Unable to correct problems, you have held broken packages.

The issue was caused by the gnupg2 removed, and not detected.
sonic-buildimage/build_debian.sh

Line 250 in 4fb6cf0

 sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y remove software-properties-common gnupg2 python3-gi
2022-07-14 13:39:25 +08:00
mssonicbld
632d89a218
[ci/build]: Upgrade SONiC package versions (#11423)
Upgrade SONiC Versions
2022-07-13 07:09:27 +08:00
xumia
33c9d324a4
Upgrade openssh to 8.4p1-5+deb11u1 (#11409)
Why I did it
Fix the openssh build issue, upgrade from 8.4p1-5 to 8.4p1-5+deb11u1.

https://dev.azure.com/mssonic/build/_build/results?buildId=120209&view=logs&j=88ce9a53-729c-5fa9-7b6e-3d98f2488e3f&t=8d99be27-49d0-54d0-99b1-cfc0d47f0318

+ sudo dpkg --root=./fsroot-broadcom -i target/debs/bullseye/openssh-server_8.4p1-5_amd64.deb
dpkg: warning: downgrading openssh-server from 1:8.4p1-5+deb11u1 to 1:8.4p1-5
(Reading database ... 44818 files and directories currently installed.)
Preparing to unpack .../openssh-server_8.4p1-5_amd64.deb ...
Unpacking openssh-server (1:8.4p1-5) over (1:8.4p1-5+deb11u1) ...
dpkg: dependency problems prevent configuration of openssh-server:
 openssh-server depends on openssh-client (= 1:8.4p1-5); however:
  Version of openssh-client on system is 1:8.4p1-5+deb11u1.

dpkg: error processing package openssh-server (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 openssh-server
+ clean_sys

How I did it
Upgrade openssh from 8.4p1-5 to 8.4p1-5+deb11u1.

How to verify it
2022-07-11 22:32:16 +08:00
Liu Shilong
a8cdb62fc3
[ci] Fix test stage dependency issue. (#11386) (#11393)
Why I did it
When any of the test job failed in the test stage, the rerun will not work, the test stage will be skipped automaticall, so we do not have chance to rerun the test stage again, and the checks of the test will be always in failed status, block the PR to merge forever.

It should be caused by the condition in the Test stage, we should specify the status of the BuildVS stage.

How I did it
Fix stage dependency logic.
2022-07-11 19:03:05 +08:00
mssonicbld
2339907cf1
[ci/build]: Upgrade SONiC package versions (#11339) 2022-07-06 04:43:34 +00:00
mssonicbld
51327e6125
[ci/build]: Upgrade SONiC package versions (#11258)
Upgrade SONiC Versions
2022-07-04 20:18:21 +08:00
xumia
ae99f374fa
[Build] Add the missing debian security mirrors in slave images (#11305) (#11313)
Why I did it
Cherry-pick from #11305

The build below was broken, it was caused by one of the required debian mirror missing.
https://dev.azure.com/mssonic/build/_build/results?buildId=116719&view=logs&j=88ce9a53-729c-5fa9-7b6e-3d98f2488e3f&t=88f376cf-c35d-5783-0a48-9ad83a873284

 libpci-dev : Depends: libudev-dev (>= 196) but it is not going to be installed
 libsystemd-dev : Depends: libsystemd0 (= 232-25+deb9u14) but 232-25+deb9u13 is to be installed
How I did it
Add the missing mirrors for buster and stretch.
2022-07-04 12:57:21 +08:00