Skip to content

Commit e6e0664

Browse files
committed
Merge branch 'master' into sensormon
2 parents efa316f + 566fe1e commit e6e0664

File tree

792 files changed

+99834
-185960
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

792 files changed

+99834
-185960
lines changed

.azure-pipelines/dpkg-cache-cleanup.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,34 @@ trigger: none
1515
pr: none
1616

1717
jobs:
18-
- job: Build
18+
- job: Amd
1919
pool: sonicbld
2020
timeoutInMinutes: 5
2121
steps:
2222
- checkout: none
2323
- script: |
24-
set -xe
24+
df -h
2525
sudo find /nfs/dpkg_cache/ -name *.tgz -mtime +30 -type f -delete
26+
df -h
2627
displayName: clean dpkg cache
27-
28+
- job: Armhf
29+
pool: sonicbld-armhf
30+
timeoutInMinutes: 5
31+
steps:
32+
- checkout: none
33+
- script: |
34+
df -h
35+
sudo find /nfs/dpkg_cache/ -name *.tgz -mtime +30 -type f -delete
36+
df -h
37+
displayName: clean dpkg cache
38+
- job: Arm64
39+
pool: sonicbld-arm64
40+
timeoutInMinutes: 5
41+
steps:
42+
- checkout: none
43+
- script: |
44+
df -h
45+
sudo find /nfs/dpkg_cache/ -name *.tgz -mtime +30 -type f -delete
46+
df -h
47+
displayName: clean dpkg cache
48+

.github/workflows/automerge_scan.yml

Lines changed: 43 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,58 +16,74 @@ jobs:
1616
set -e
1717
1818
echo ${TOKEN} | gh auth login --with-token
19-
gh pr list -R sonic-net/sonic-buildimage -A mssonicbld --json additions,assignees,author,baseRefName,body,changedFiles,closed,closedAt,comments,commits,createdAt,deletions,files,headRefName,headRepository,headRepositoryOwner,id,isCrossRepository,isDraft,labels,latestReviews,maintainerCanModify,mergeCommit,mergeStateStatus,mergeable,mergedAt,mergedBy,milestone,number,potentialMergeCommit,projectCards,reactionGroups,reviewDecision,reviewRequests,reviews,state,statusCheckRollup,title,updatedAt,url > prs.log
19+
gh pr list -R sonic-net/sonic-buildimage -A mssonicbld -L 100 -S "label:automerge" --json url,body,title,createdAt,labels,statusCheckRollup > prs.log
2020
cat prs.log | jq
2121
- name: Main
2222
run: |
2323
set -e
2424
25+
# PR merge run per 2 hours
26+
# Other operation run per day.
27+
# Cherry pick PR:
28+
# more than 3 days, comment @author to check
29+
# more than 10 days, stop comment.
30+
# more than 28 days, comment @author PR will be closed
31+
# more than 30 days, close PR
32+
date_3d_ago=$(date --date "3 day ago" -u +"%FT%TZ")
33+
date_10d_ago=$(date --date "10 day ago" -u +"%FT%TZ")
34+
date_28d_ago=$(date --date "28 day ago" -u +"%FT%TZ")
35+
date_30d_ago=$(date --date "30 day ago" -u +"%FT%TZ")
36+
date_now=$(date -u +"%T")
37+
operate=false
38+
[[ "$date_now" < "02:00:00" ]] && operate=true
39+
2540
count=$(cat prs.log | jq 'length')
2641
for ((i=0;i<$count;i++))
2742
do
2843
url=$(cat prs.log | jq -r ".[$i].url")
2944
body=$(cat prs.log | jq -r ".[$i].body")
3045
title=$(cat prs.log | jq -r ".[$i].title")
46+
origin_pr_id=$(echo $title | grep -Eo "\[action\] \[PR:[0-9]*\]" | grep -Eo [0-9]* || true)
3147
created_at=$(cat prs.log | jq -r ".[$i].createdAt")
32-
echo PR: $(($i+1))/$count, URL: $url, createdAt: $created_at, now: $(date -u +"%FT%TZ")
48+
echo PR: $(($i+1))/$count, URL: $url, origin PR: $origin_pr_id, createdAt: $created_at, operate: $operate
3349
[[ "$url" == "" ]] && continue
3450
[[ $created_at > $(date --date "1 hour ago" -u +"%FT%TZ") ]] && continue
35-
# only check automerge PR.
36-
cat prs.log | jq -r ".[$i].labels[].name" | grep automerge || continue
3751
3852
checks=$(cat prs.log | jq ".[$i].statusCheckRollup")
3953
checks_count=$(echo $checks | jq 'length')
40-
echo Checks count: $checks_count
54+
pr_success=true
4155
for ((j=0;j<$checks_count;j++))
4256
do
4357
check=$(echo $checks | jq ".[$j]")
44-
state=$(echo $check | jq -r '.state')
58+
status=$(echo $check | jq -r '.status')
4559
conclusion=$(echo $check | jq -r '.conclusion')
4660
name=$(echo $check | jq -r '.name')
4761
4862
# EasyCLA success flag: state=SUCCESS
4963
# Others success flag: conclusion in SUCCESS,NEUTRAL
50-
# Ignore Azure.sonic-buildimage stage check result. It may be set continueOnError
51-
echo "$name" | grep "Azure.sonic-buildimage (" && continue
52-
# rerun Azure.sonic-buildimage per day
53-
if [[ "$name" == "Azure.sonic-buildimage" ]] && [[ "$conclusion" == "FAILURE" ]];then
54-
completedAt=$(echo $check | jq -r '.completedAt')
55-
[[ "$completedAt" < $(date --date "2 hour ago" -u +"%FT%TZ") ]] && [[ $(date -u +"%T") < "02:00:00" ]] && gh pr comment $url --body "/azp run Azure.sonic-buildimage"
56-
fi
57-
# Ignore Semgrep, it has issues.
58-
[[ "$name" == "Semgrep" ]] && continue
59-
if [[ "$state" == "SUCCESS" ]];then
60-
# check pass
61-
continue
62-
elif [[ "$conclusion" == "SUCCESS" ]] || [[ "$conclusion" == "NEUTRAL" ]];then
63-
# check pass
64-
continue
65-
else
66-
echo "$url Check failed!!!"
67-
echo $check | jq
68-
continue 2
69-
fi
64+
# only check Azure.sonic-buildimage currently
65+
echo "$name" | grep -v "Azure.sonic-buildimage" > /dev/null && continue
66+
[[ "$status" != "COMPLETED" ]] && echo "$name: $status" && continue 2
67+
68+
success=true
69+
( [[ "$conclusion" == "FAILURE" ]] || [[ "$conclusion" == "CANCELLED" ]] ) && success=false && pr_success=false
70+
! $success && echo "FAIL: $name"
7071
done
72+
73+
# rerun Azure.sonic-buildimage per day
74+
! $pr_success && $operate && gh pr comment $url --body "/azp run Azure.sonic-buildimage"
75+
76+
# If auto cherry pick PRs failed, comment in original PR and close cherry pick PR
77+
if [ -n "$origin_pr_id" ] && [[ $created_at < $date_3d_ago ]] && ! $pr_success;then
78+
origin_pr_url=https://github.com/sonic-net/sonic-buildimage/pull/$origin_pr_id
79+
author=$(gh pr view $origin_pr_url --json author | jq .author.login -r)
80+
echo "Original author will check."
81+
$operate && [[ $created_at > $date_10d_ago ]] && gh pr comment $origin_pr_url --body "@$author cherry pick PR didn't pass PR checker. Please check!!!<br>$url"
82+
$operate && [[ $created_at < $date_28d_ago ]] && gh pr comment $origin_pr_url --body "@$author cherry pick PR didn't pass PR checker. Please check!!! Auto cherry pick PR will be closed in 2 days.<br>$url"
83+
$operate && [[ $created_at < $date_30d_ago ]] && echo "$url Closed" && gh pr close $url
84+
fi
85+
86+
! $pr_success && continue
7187
# merge the PR
7288
echo ========Merging PR========
7389
if echo $title | grep "^\[submodule\]";then
@@ -77,3 +93,4 @@ jobs:
7793
fi
7894
echo ========Finished PR========
7995
done
96+

Makefile.work

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,7 @@ SONIC_BUILD_INSTRUCTION := $(MAKE) \
537537
SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD=$(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD) \
538538
SONIC_INCLUDE_SYSTEM_TELEMETRY=$(INCLUDE_SYSTEM_TELEMETRY) \
539539
INCLUDE_DHCP_RELAY=$(INCLUDE_DHCP_RELAY) \
540+
INCLUDE_DHCP_SERVER=$(INCLUDE_DHCP_SERVER) \
540541
INCLUDE_MACSEC=$(INCLUDE_MACSEC) \
541542
SONIC_INCLUDE_RESTAPI=$(INCLUDE_RESTAPI) \
542543
SONIC_INCLUDE_MUX=$(INCLUDE_MUX) \

build_debian.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ then
296296
install_kubernetes ${MASTER_KUBERNETES_VERSION}
297297

298298
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get update
299-
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install hyperv-daemons gnupg xmlstarlet
299+
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install hyperv-daemons gnupg xmlstarlet parted
300300
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y remove gnupg
301301
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT curl -o /tmp/cri-dockerd.deb -fsSL \
302302
https://github.com/Mirantis/cri-dockerd/releases/download/v${MASTER_CRI_DOCKERD}/cri-dockerd_${MASTER_CRI_DOCKERD}.3-0.debian-${IMAGE_DISTRO}_amd64.deb

build_image.sh

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,23 +139,19 @@ elif [ "$IMAGE_TYPE" = "raw" ]; then
139139
## Run the installer
140140
## The 'build' install mode of the installer is used to generate this dump.
141141
sudo chmod a+x $tmp_output_onie_image
142-
sudo ./$tmp_output_onie_image
142+
sudo ./$tmp_output_onie_image || {
143+
## Failure during 'build' install mode of the installer results in an incomplete raw image.
144+
## Delete the incomplete raw image.
145+
sudo rm -f $OUTPUT_RAW_IMAGE
146+
}
143147
rm $tmp_output_onie_image
144148

145149
[ -r $OUTPUT_RAW_IMAGE ] || {
146150
echo "Error : $OUTPUT_RAW_IMAGE not generated!"
147151
exit 1
148152
}
149153

150-
$GZ_COMPRESS_PROGRAM $OUTPUT_RAW_IMAGE
151-
152-
[ -r $OUTPUT_RAW_IMAGE.gz ] || {
153-
echo "Error : $GZ_COMPRESS_PROGRAM $OUTPUT_RAW_IMAGE failed!"
154-
exit 1
155-
}
156-
157-
mv $OUTPUT_RAW_IMAGE.gz $OUTPUT_RAW_IMAGE
158-
echo "The compressed raw image is in $OUTPUT_RAW_IMAGE"
154+
echo "The raw image is in $OUTPUT_RAW_IMAGE"
159155

160156
elif [ "$IMAGE_TYPE" = "kvm" ]; then
161157

device/arista/x86_64-arista_7050dx4_32s/pcie.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,6 @@
152152
id: '1466'
153153
name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh)
154154
Data Fabric: Device 18h; Function 6'
155-
- bus: '00'
156-
dev: '18'
157-
fn: '7'
158-
id: '0001'
159-
name: 'Host bridge: Arastra Inc. Device 0001'
160155
- bus: '01'
161156
dev: '00'
162157
fn: '0'

device/arista/x86_64-arista_7050px4_32s/pcie.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,6 @@
152152
id: '1466'
153153
name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh)
154154
Data Fabric: Device 18h; Function 6'
155-
- bus: '00'
156-
dev: '18'
157-
fn: '7'
158-
id: '0001'
159-
name: 'Host bridge: Arastra Inc. Device 0001'
160155
- bus: '01'
161156
dev: '00'
162157
fn: '0'

device/arista/x86_64-arista_7050sx3_48c8/pcie.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@
6464
id: '1578'
6565
name: 'Encryption controller: Advanced Micro Devices, Inc. [AMD] Carrizo Platform
6666
Security Processor'
67-
- bus: '00'
68-
dev: 09
69-
fn: '0'
70-
id: '0001'
71-
name: 'Host bridge: Arastra Inc. Device 0001'
7267
- bus: '00'
7368
dev: 09
7469
fn: '2'

device/arista/x86_64-arista_7050sx3_48yc8/pcie.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@
6464
id: '1578'
6565
name: 'Encryption controller: Advanced Micro Devices, Inc. [AMD] Carrizo Platform
6666
Security Processor'
67-
- bus: '00'
68-
dev: 09
69-
fn: '0'
70-
id: '0001'
71-
name: 'Host bridge: Arastra Inc. Device 0001'
7267
- bus: '00'
7368
dev: 09
7469
fn: '2'

device/arista/x86_64-arista_7060dx4_32/Arista-7060DX4-C32/th3-a7060dx4-c32-32x400G.config.bcm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ miim_intr_enable.0=0
1616
module_64ports.0=1
1717
multicast_l2_range.0=511
1818
oversubscribe_mode=1
19+
sai_tunnel_global_sip_mask_enable=1
20+
bcm_tunnel_term_compatible_mode=1
1921
parity_correction=1
2022
parity_enable=1
2123
pbmp_xport_xe.0=0x3ffffffffffffffffffffffffffffffffffffffe

0 commit comments

Comments
 (0)