Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into config_rel_en
Browse files Browse the repository at this point in the history
  • Loading branch information
dgsudharsan committed Apr 11, 2023
2 parents 88ad212 + 3d32008 commit 4dedaeb
Show file tree
Hide file tree
Showing 97 changed files with 12,987 additions and 99 deletions.
5 changes: 1 addition & 4 deletions .azure-pipelines/azure-pipelines-repd-build-variables.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
variables:
${{ if eq(variables['Build.Reason'],'PullRequest') }}:
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=$([[ "$(System.PullRequest.TargetBranch)" =~ ^20[2-9][0-9]{3}$ ]] && echo deb,py2,py3,web,git,docker)'
${{ else }}:
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web,git,docker'
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web,git,docker'
2 changes: 2 additions & 0 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ SONIC_BUILD_INSTRUCTION := $(MAKE) \
MIRROR_SECURITY_URLS=$(MIRROR_SECURITY_URLS) \
GZ_COMPRESS_PROGRAM=$(GZ_COMPRESS_PROGRAM) \
MIRROR_SNAPSHOT=$(MIRROR_SNAPSHOT) \
SONIC_VERSION_CONTROL_COMPONENTS=$(SONIC_VERSION_CONTROL_COMPONENTS) \
$(SONIC_OVERRIDE_BUILD_VARS)

.PHONY: sonic-slave-build sonic-slave-bash init reset
Expand All @@ -581,6 +582,7 @@ endif

export MIRROR_URLS
export MIRROR_SECURITY_URLS
export MIRROR_SNAPSHOT
export SONIC_VERSION_CONTROL_COMPONENTS

%:: | sonic-build-hooks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ libnl-genl-3-dev==3.5.0-1
libnl-nf-3-200==3.5.0-1
libnl-nf-3-dev==3.5.0-1
libnl-route-3-dev==3.5.0-1
libsai==1.11.0-1
libsai-dev==1.11.0-1
libsaimetadata==1.0.0
libsaimetadata-dev==1.0.0
libsairedis==1.0.0
Expand All @@ -30,7 +32,7 @@ libteam-utils==1.30-1
libteam5==1.30-1
libteamdctl0==1.30-1
libthrift-0.11.0==0.11.0-4
libthrift-dev==0.11.0-4
libthrift-dev==0.14.1
libthrift0==0.14.1
libyang==1.0.73
libyang-cpp==1.0.73
Expand Down Expand Up @@ -69,7 +71,7 @@ sxd-libs==1.mlnx.4.5.4206
sxd-libs-dev==1.mlnx.4.5.4206
syncd==1.0.0
syncd-vs==1.0.0
thrift-compiler==0.11.0-4
thrift-compiler==0.14.1
wjh-libs==1.mlnx.4.5.4206
wjh-libs-dev==1.mlnx.4.5.4206
wpasupplicant==2:2.9.0-14
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
libnl-3-200==3.5.0-1
libnl-route-3-200==3.5.0-1
linux-headers-5.10.0-18-2-armmp==5.10.140-1
mrvllibsai==1.10.2-1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ colorful==0.5.5
docker==6.0.1
docker-image-py==0.1.12
enlighten==1.11.2
filelock==3.10.7
filelock==3.11.0
ijson==2.6.1
ipaddress==1.0.23
jsondiff==2.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ bitarray==1.5.3
click==7.0
redis==3.5.3
requests==2.28.2
zipp==1.2.0
6 changes: 3 additions & 3 deletions files/build/versions/default/versions-git
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
https://chromium.googlesource.com/chromium/tools/depot_tools.git==61ebd177abdc56bd373fc05c0101e2e506f9d758
https://chromium.googlesource.com/chromium/tools/depot_tools.git==019e73a13bf58542f2572daba6fbc5e389c40607
https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f
https://github.com/CESNET/libyang.git==9a4e5b2ce30b9696116d6e654ee55caab5aafed8
https://github.com/daveolson53/audisp-tacplus.git==559c9f22edd4f2dea0ecedffb3ad9502b12a75b6
https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564755a1613b8b
https://github.com/dyninc/OpenBFDD.git==e35f43ad8d2b3f084e96a84c392528a90d05a287
https://github.com/flashrom/flashrom.git==3ed016f08faa011736443f3b39bf68187d974781
https://github.com/FreeRADIUS/freeradius-server.git==35fac8b271348a2e6ba24fe36e63a916f149ad9c
https://github.com/flashrom/flashrom.git==3eaef7528b622955a48611fdc0801ca853665efd
https://github.com/FreeRADIUS/freeradius-server.git==9884f1aa3847a32fd062fad51665ea98b88e83fc
https://github.com/FreeRADIUS/pam_radius.git==8d373539bb9f13b0abfe8bcae0095a930a00fad0
https://github.com/jeroennijhof/pam_tacplus.git==4284d9016e64def2bb81d5f50f96dc3b59bfdc39
https://github.com/jpirko/libteam.git==61e27812c1074a865d7e1a778c0ce442837c28d7
Expand Down
22 changes: 11 additions & 11 deletions files/build/versions/default/versions-mirror
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
deb.nodesource.com_node%5f14.x_dists_bullseye==2023-02-17T00:35:28Z
deb.nodesource.com_node%5f14.x_dists_buster==2023-02-17T00:35:28Z
debian==20230404T000134Z
debian-security==20230405T000526Z
download.docker.com_linux_debian_dists_bullseye==2023-04-04T23:38:54Z
debian==20230409T000128Z
debian-security==20230409T000248Z
download.docker.com_linux_debian_dists_bullseye==2023-04-06T18:06:41Z
download.docker.com_linux_debian_dists_buster==2023-04-04T23:38:54Z
packages.microsoft.com_repos_sonic-dev_dists_jessie==2022-10-31T19:34:29Z
packages.trafficmanager.net_snapshot_debian-security_20230405T000526Z_dists_bullseye-security==2023-04-04T23:52:40Z
packages.trafficmanager.net_snapshot_debian-security_20230405T000526Z_dists_buster_updates==2023-04-04T23:52:40Z
packages.trafficmanager.net_snapshot_debian_20230404T000134Z_dists_bullseye==2022-12-17T10:14:37Z
packages.trafficmanager.net_snapshot_debian_20230404T000134Z_dists_bullseye-backports==2023-04-03T20:15:17Z
packages.trafficmanager.net_snapshot_debian_20230404T000134Z_dists_bullseye-updates==2023-04-03T20:15:16Z
packages.trafficmanager.net_snapshot_debian_20230404T000134Z_dists_buster==2022-09-10T11:30:54Z
packages.trafficmanager.net_snapshot_debian_20230404T000134Z_dists_buster-backports==2023-04-03T20:15:17Z
packages.trafficmanager.net_snapshot_debian_20230404T000134Z_dists_buster-updates==2023-04-03T20:15:17Z
packages.trafficmanager.net_snapshot_debian-security_20230409T000248Z_dists_bullseye-security==2023-04-07T20:22:40Z
packages.trafficmanager.net_snapshot_debian-security_20230409T000248Z_dists_buster_updates==2023-04-07T20:22:40Z
packages.trafficmanager.net_snapshot_debian_20230409T000128Z_dists_bullseye==2022-12-17T10:14:37Z
packages.trafficmanager.net_snapshot_debian_20230409T000128Z_dists_bullseye-backports==2023-04-08T20:12:51Z
packages.trafficmanager.net_snapshot_debian_20230409T000128Z_dists_bullseye-updates==2023-04-08T20:12:51Z
packages.trafficmanager.net_snapshot_debian_20230409T000128Z_dists_buster==2022-09-10T11:30:54Z
packages.trafficmanager.net_snapshot_debian_20230409T000128Z_dists_buster-backports==2023-04-08T20:12:51Z
packages.trafficmanager.net_snapshot_debian_20230409T000128Z_dists_buster-updates==2023-04-08T20:12:51Z
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
async-timeout==4.0.2
bitarray==1.5.3
ijson==2.6.1
importlib-metadata==6.1.0
importlib-metadata==6.2.1
ipaddress==1.0.23
jsondiff==2.0.0
lxml==4.9.1
Expand Down
2 changes: 1 addition & 1 deletion files/build/versions/dockers/docker-sonic-vs/versions-py3
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dbus-python==1.3.2
docker==6.0.1
docker-image-py==0.1.12
enlighten==1.11.2
filelock==3.10.7
filelock==3.11.0
idna==3.4
importlib-metadata==6.1.0
jsonpatch==1.32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ gem2deb==1.4
gem2deb-test-runner==1.4
gettext==0.21-4
gettext-base==0.21-4
ghostscript==9.53.3~dfsg-7+deb11u2
ghostscript==9.53.3~dfsg-7+deb11u4
gir1.2-atk-1.0==2.36.0-2
gir1.2-atspi-2.0==2.38.0-4
gir1.2-freedesktop==1.66.1-1+b1
Expand Down Expand Up @@ -618,8 +618,8 @@ libgraphite2-3==1.3.14-1
libgraphite2-dev==1.3.14-1
libgrpc++1==1.30.2-3
libgrpc10==1.30.2-3
libgs9==9.53.3~dfsg-7+deb11u2
libgs9-common==9.53.3~dfsg-7+deb11u2
libgs9==9.53.3~dfsg-7+deb11u4
libgs9-common==9.53.3~dfsg-7+deb11u4
libgsasl7==1.10.0-4+deb11u1
libgsm1==1.0.18-2
libgssrpc4==1.18.3-6+deb11u3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ gcovr==4.1
gpg==1.12.0
idna==2.6
imagesize==1.0.0
importlib-metadata==6.1.0
importlib-metadata==6.2.1
jinja2==3.0.3
keyring==17.1.1
keyrings.alt==3.1.1
Expand Down
2 changes: 1 addition & 1 deletion files/build/versions/host-image/versions-py3
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dbus-python==1.2.16
docker==5.0.3
docker-image-py==0.1.12
enlighten==1.11.2
filelock==3.10.7
filelock==3.11.0
grpcio==1.39.0
grpcio-tools==1.39.0
idna==3.4
Expand Down
4 changes: 2 additions & 2 deletions files/image_config/ntp/ntp-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ reboot_type='cold'
function get_database_reboot_type()
{
SYSTEM_WARM_START=`sonic-db-cli STATE_DB hget "WARM_RESTART_ENABLE_TABLE|system" enable`
SYSTEM_FAST_START=`sonic-db-cli STATE_DB get "FAST_REBOOT|system"`
SYSTEM_FAST_START=`sonic-db-cli STATE_DB hget "FAST_RESTART_ENABLE_TABLE|system" enable`

if [[ x"${SYSTEM_WARM_START}" == x"true" ]]; then
reboot_type='warm'
elif [[ x"${SYSTEM_FAST_START}" == x"1" ]]; then
elif [[ x"${SYSTEM_FAST_START}" == x"true" ]]; then
reboot_type='fast'
fi
}
Expand Down
41 changes: 36 additions & 5 deletions files/image_config/warmboot-finalizer/finalize-warmboot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ function check_warm_boot()
WARM_BOOT=`sonic-db-cli STATE_DB hget "WARM_RESTART_ENABLE_TABLE|system" enable`
}

function check_fast_reboot()
{
debug "Checking if fast-reboot is enabled..."
FAST_REBOOT=`sonic-db-cli STATE_DB hget "FAST_RESTART_ENABLE_TABLE|system" enable`
if [[ x"${FAST_REBOOT}" == x"true" ]]; then
debug "Fast-reboot is enabled..."
else
debug "Fast-reboot is disabled..."
fi
}


function wait_for_database_service()
{
Expand Down Expand Up @@ -97,6 +108,12 @@ function finalize_warm_boot()
sudo config warm_restart disable
}

function finalize_fast_reboot()
{
debug "Finalizing fast-reboot..."
sonic-db-cli STATE_DB hset "FAST_RESTART_ENABLE_TABLE|system" "enable" "false" &>/dev/null
}

function stop_control_plane_assistant()
{
if [[ -x ${ASSISTANT_SCRIPT} ]]; then
Expand All @@ -119,14 +136,20 @@ function restore_counters_folder()

wait_for_database_service

check_fast_reboot
check_warm_boot

if [[ x"${WARM_BOOT}" != x"true" ]]; then
debug "warmboot is not enabled ..."
exit 0
if [[ x"${FAST_REBOOT}" != x"true" ]]; then
debug "fastboot is not enabled ..."
exit 0
fi
fi

restore_counters_folder
if [[ (x"${WARM_BOOT}" == x"true") && (x"${FAST_REBOOT}" != x"true") ]]; then
restore_counters_folder
fi

get_component_list

Expand All @@ -143,14 +166,22 @@ for i in `seq 60`; do
sleep 5
done

stop_control_plane_assistant
if [[ (x"${WARM_BOOT}" == x"true") && (x"${FAST_REBOOT}" != x"true") ]]; then
stop_control_plane_assistant
fi

# Save DB after stopped control plane assistant to avoid extra entries
debug "Save in-memory database after warm reboot ..."
debug "Save in-memory database after warm/fast reboot ..."
config save -y

if [[ -n "${list}" ]]; then
debug "Some components didn't finish reconcile: ${list} ..."
fi

finalize_warm_boot
if [ x"${FAST_REBOOT}" == x"true" ]; then
finalize_fast_reboot
fi

if [ x"${WARM_BOOT}" == x"true" ]; then
finalize_warm_boot
fi
3 changes: 2 additions & 1 deletion files/scripts/bgp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ function validate_restore_count()

function check_fast_boot ()
{
if [[ $($SONIC_DB_CLI STATE_DB GET "FAST_REBOOT|system") == "1" ]]; then
SYSTEM_FAST_REBOOT=`sonic-db-cli STATE_DB hget "FAST_RESTART_ENABLE_TABLE|system" enable`
if [[ x"${SYSTEM_FAST_REBOOT}" == x"true" ]]; then
FAST_BOOT="true"
else
FAST_BOOT="false"
Expand Down
3 changes: 2 additions & 1 deletion files/scripts/service_mgmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ function check_warm_boot()

function check_fast_boot ()
{
if [[ $($SONIC_DB_CLI STATE_DB GET "FAST_REBOOT|system") == "1" ]]; then
SYSTEM_FAST_REBOOT=`sonic-db-cli STATE_DB hget "FAST_RESTART_ENABLE_TABLE|system" enable`
if [[ x"${SYSTEM_FAST_REBOOT}" == x"true" ]]; then
FAST_BOOT="true"
else
FAST_BOOT="false"
Expand Down
7 changes: 4 additions & 3 deletions files/scripts/swss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ function check_warm_boot()

function check_fast_boot()
{
if [[ $($SONIC_DB_CLI STATE_DB GET "FAST_REBOOT|system") == "1" ]]; then
SYSTEM_FAST_REBOOT=`sonic-db-cli STATE_DB hget "FAST_RESTART_ENABLE_TABLE|system" enable`
if [[ x"${SYSTEM_FAST_REBOOT}" == x"true" ]]; then
FAST_BOOT="true"
else
FAST_BOOT="false"
Expand Down Expand Up @@ -286,8 +287,8 @@ stop() {
# encountered error, e.g. syncd crashed. And swss needs to
# be restarted.
if [[ x"$FAST_BOOT" != x"true" ]]; then
debug "Clearing FAST_REBOOT flag..."
clean_up_tables STATE_DB "'FAST_REBOOT*'"
debug "Clearing FAST_RESTART_ENABLE_TABLE flag..."
sonic-db-cli STATE_DB hset "FAST_RESTART_ENABLE_TABLE|system" "enable" "false"
fi
# Unlock has to happen before reaching out to peer service
unlock_service_state_change
Expand Down
6 changes: 4 additions & 2 deletions files/scripts/syncd_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ function check_warm_boot()

function check_fast_boot()
{
if [[ $($SONIC_DB_CLI STATE_DB GET "FAST_REBOOT|system") == "1" ]]; then
SYSTEM_FAST_REBOOT=`sonic-db-cli STATE_DB hget "FAST_RESTART_ENABLE_TABLE|system" enable`
if [[ x"${SYSTEM_FAST_REBOOT}" == x"true" ]]; then
FAST_BOOT="true"
else
FAST_BOOT="false"
Expand Down Expand Up @@ -82,7 +83,8 @@ function getBootType()
;;
*SONIC_BOOT_TYPE=fast*|*fast-reboot*)
# check that the key exists
if [[ $($SONIC_DB_CLI STATE_DB GET "FAST_REBOOT|system") == "1" ]]; then
SYSTEM_FAST_REBOOT=`sonic-db-cli STATE_DB hget "FAST_RESTART_ENABLE_TABLE|system" enable`
if [[ x"${SYSTEM_FAST_REBOOT}" == x"true" ]]; then
TYPE='fast'
else
TYPE='cold'
Expand Down
3 changes: 2 additions & 1 deletion files/scripts/teamd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ function validate_restore_count()

function check_fast_boot ()
{
if [[ $($SONIC_DB_CLI STATE_DB GET "FAST_REBOOT|system") == "1" ]]; then
SYSTEM_FAST_REBOOT=`sonic-db-cli STATE_DB hget "FAST_RESTART_ENABLE_TABLE|system" enable`
if [[ x"${SYSTEM_FAST_REBOOT}" == x"true" ]]; then
FAST_BOOT="true"
else
FAST_BOOT="false"
Expand Down
43 changes: 19 additions & 24 deletions platform/mellanox/non-upstream-patches/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
## Mellanox non-upstream linux kernel patches ##

To include non-upstream patches into the sonic-linux image during build time, this folder must contain a patch archive.

### Structure of the patch archive

1. It should contain a file named series. series should provide an order in which the patches have to be applied
```
admin@build-server:/sonic-buildimage/src/sonic-linux-kernel$ cat linux-5.10.103/non_upstream_patches/series
mlx5-Refactor-module-EEPROM-query.patch
mlx5-Implement-get_module_eeprom_by_page.patch
mlx5-Add-support-for-DSFP-module-EEPROM-dumps.patch
```
2. All the patches should be present in the same folder where series resides.
3. Developers should make sure patches apply cleanly over the existing patches present in the src/sonic-linux-kernel .
4. Name of the tarball should match with the one specified under EXTERNAL_KERNEL_PATCH_TAR
To include non-upstream patches into the sonic-linux image during build time, the `INCLUDE_EXTERNAL_PATCHES=y` flag has to be provided. By default, the directory pointed by EXTERNAL_KERNEL_PATCH_LOC will be used and it must follow the following structure. To use a publicly accessible tar of the non-upstream patches, also provide the `EXTERNAL_KERNEL_PATCH_URL` variable

### Directory Structure

#### Example
```
admin@build-server:/sonic-buildimage/platform/mellanox/non-upstream-patches$ tar -tf patches.tar.gz
./
./mlx5-Implement-get_module_eeprom_by_page.patch
./mlx5-Add-support-for-DSFP-module-EEPROM-dumps.patch
./series
./mlx5-Refactor-module-EEPROM-query.patch
EXTERNAL_KERNEL_PATCH_LOC/
├──── patches/
├── 0001-mlx5-Refactor-module-EEPROM-query.patch.patch
├── 0002-mlx5-Implement-get_module_eeprom_by_page.patch.patch
├── 0005-mlx5-Add-support-for-DSFP-module-EEPROM-dumps.patch
├── .............
├──── series.patch
```

### Include the archive while building sonic linux kernel
1. It should contain a file named series.patch. This should contain a diff that is applied on the sonic-linux-kernel/patch/series file. The diff should include all the non-upstream patches.
2. All the patches should be present in the patches folder
3. Developers should make sure patches apply cleanly over the existing patches present in the src/sonic-linux-kernel .


### Include the non upstream patches while building sonic linux kernel

Set `INCLUDE_EXTERNAL_PATCHES=y` using `SONIC_OVERRIDE_BUILD_VARS` to include these changes before building the kernel.
- Eg: `NOJESSIE=1 NOSTRETCH=1 NOBUSTER=1 make SONIC_OVERRIDE_BUILD_VARS=' INCLUDE_EXTERNAL_PATCHES=y ' target/debs/bullseye/linux-headers-5.10.0-12-2-common_5.10.103-1_all.deb`

Set `INCLUDE_EXTERNAL_PATCH_TAR=y` using `SONIC_OVERRIDE_BUILD_VARS` to include these changes before building the kernel.
- Eg: `NOJESSIE=1 NOSTRETCH=1 NOBUSTER=1 make SONIC_OVERRIDE_BUILD_VARS=' INCLUDE_EXTERNAL_PATCH_TAR=y ' target/debs/bullseye/linux-headers-5.10.0-12-2-common_5.10.103-1_all.deb`
Binary file not shown.
Loading

0 comments on commit 4dedaeb

Please sign in to comment.