Skip to content

Commit ad8ff72

Browse files
committed
Merge branch '202505' of https://github.com/sonic-net/sonic-buildimage into 202506
2 parents d5a0dee + 5092337 commit ad8ff72

36 files changed

+709
-50
lines changed

.azure-pipelines/azure-pipelines-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121

122122
buildSteps:
123123
- template: .azure-pipelines/template-skipvstest.yml@buildimage
124-
- template: .azure-pipelines/template-daemon.yml@buildimage
124+
- template: template-daemon.yml
125125
- bash: |
126126
set -ex
127127
if echo $(GROUP_NAME) | grep mellanox; then

.azure-pipelines/azure-pipelines-image-template.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,29 @@ jobs:
8585
BUILD_REASON=$(Build.Reason)
8686
echo "Build.Reason = $BUILD_REASON"
8787
echo "Build.DefinitionName = $BUILD_DEFINITIONNAME"
88+
89+
if [[ "$BUILD_REASON" == "PullRequest" ]]; then
90+
echo "Checking for changes to dockers/docker-ptf/Dockerfile.j2 in PR..."
91+
# Get the target branch and check for changes
92+
TARGET_BRANCH="origin/$(System.PullRequest.TargetBranch)"
93+
echo "Comparing against target branch: $TARGET_BRANCH"
94+
# Fetch target branch to ensure we have the latest
95+
git fetch origin $(System.PullRequest.TargetBranch)
96+
# Check if docker-ptf Dockerfile.j2 has changes
97+
# NOTE: The PTF_MODIFIED template parameter is of type string
98+
# Ensure to set it to "True" or "False" (not boolean true/false)
99+
if git diff --name-only $TARGET_BRANCH...HEAD | grep -q "dockers/docker-ptf/Dockerfile.j2"; then
100+
echo "docker-ptf/Dockerfile.j2 has been modified in this PR"
101+
echo "##vso[task.setvariable variable=PTF_MODIFIED;isOutput=true]True"
102+
else
103+
echo "docker-ptf/Dockerfile.j2 has not been modified in this PR"
104+
echo "##vso[task.setvariable variable=PTF_MODIFIED;isOutput=true]False"
105+
fi
106+
else
107+
echo "Not a PR build, setting PTF_MODIFIED to false"
108+
echo "##vso[task.setvariable variable=PTF_MODIFIED;isOutput=true]False"
109+
fi
110+
88111
if [[ "$BUILD_REASON" != "PullRequest" && "$BUILD_DEFINITIONNAME" == "Azure.sonic-buildimage.official.vs" ]]
89112
then
90113
PORT=443
@@ -103,6 +126,7 @@ jobs:
103126
mv target/* $(Build.ArtifactStagingDirectory)/target/
104127
env:
105128
REGISTRY_PASSWD: $(REGISTRY_PASSWD)
129+
name: PublishAndSetPtfTag
106130
displayName: Publish to Docker Registry and Copy Artifacts
107131
condition: always()
108132
- publish: $(Build.ArtifactStagingDirectory)

.azure-pipelines/template-daemon.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,14 @@ steps:
55
do
66
sleep 120
77
now=$(date +%s)
8-
pids=$(ps -C docker-buildx -o pid,etime,args | grep "docker-buildx buildx build" | awk '{print $1}')
8+
pids=$(ps -C docker -o pid,etime,args | grep "docker build" | cut -d" " -f2)
99
for pid in $pids
1010
do
11-
start_ticks=$(awk '{print $22}' /proc/$pid/stat)
12-
boot_time=$(awk '/btime/ {print $2}' /proc/stat)
13-
hertz=$(getconf CLK_TCK)
14-
start_time=$((boot_time + start_ticks / hertz))
15-
ts=$(date -d "@$((now - start_time))" +%s)
16-
17-
if [[ $ts -gt $(DOCKER_BUILD_TIMEOUT) ]]; then
11+
start=$(date --date="$(ls -dl /proc/$pid --time-style full-iso | awk '{print$6,$7}')" +%s)
12+
time_s=$(($now-$start))
13+
if [[ $time_s -gt $(DOCKER_BUILD_TIMEOUT) ]]; then
1814
echo =========== $(date +%F%T) $time_s &>> target/daemon.log
19-
ps -p $pid -o pid,etime,args ww &>> target/daemon.log
15+
ps $pid &>> target/daemon.log
2016
sudo kill $pid
2117
fi
2218
done

azure-pipelines.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,29 @@ stages:
109109
value: veos_vtb
110110
- name: testbed_file
111111
value: vtestbed.csv
112+
- name: PTF_MODIFIED
113+
value: $[ coalesce(stageDependencies.BuildVS.vs.outputs['PublishAndSetPtfTag.PTF_MODIFIED'], stageDependencies.BuildVS.vs.outputs['script.PTF_MODIFIED'], stageDependencies.BuildVS.vs.outputs['script1.PTF_MODIFIED'], 'False') ]
112114

113115
# For every test job:
114116
# continueOnError: false means it's a required test job and will block merge if it fails
115117
# continueOnError: true means it's an optional test job and will not block merge even though it fails(unless a required test job depends on its result)
116118

117119
jobs:
120+
- job: debug_variables
121+
pool: sonictest
122+
displayName: "Debug PTF_MODIFIED Variable"
123+
steps:
124+
- script: |
125+
echo "PTF_MODIFIED variable value: $(PTF_MODIFIED)"
126+
echo "Debug: Checking if PTF_MODIFIED is being passed correctly from BuildVS stage"
127+
if [ "$(PTF_MODIFIED)" = "True" ]; then
128+
echo "SUCCESS: PTF_MODIFIED is True"
129+
elif [ "$(PTF_MODIFIED)" = "False" ]; then
130+
echo "INFO: PTF_MODIFIED is False"
131+
else
132+
echo "ERROR: PTF_MODIFIED has unexpected value: $(PTF_MODIFIED)"
133+
fi
134+
displayName: "Debug PTF_MODIFIED Variable"
118135
- job:
119136
pool: sonictest
120137
displayName: "vstest"
@@ -210,6 +227,7 @@ stages:
210227
MAX_WORKER: $(INSTANCE_NUMBER)
211228
KVM_IMAGE_BRANCH: $(BUILD_BRANCH)
212229
MGMT_BRANCH: $(BUILD_BRANCH)
230+
PTF_MODIFIED: ${{ eq(variables['PTF_MODIFIED'], 'true') }}
213231

214232
- job: impacted_area_t0_2vlans_elastictest
215233
displayName: "impacted-area-kvmtest-t0-2vlans by Elastictest"
@@ -237,6 +255,7 @@ stages:
237255
DEPLOY_MG_EXTRA_PARAMS: "-e vlan_config=two_vlan_a"
238256
KVM_IMAGE_BRANCH: $(BUILD_BRANCH)
239257
MGMT_BRANCH: $(BUILD_BRANCH)
258+
PTF_MODIFIED: ${{ eq(variables['PTF_MODIFIED'], 'true') }}
240259

241260
- job: impacted_area_t1_lag_elastictest
242261
displayName: "impacted-area-kvmtest-t1-lag by Elastictest"
@@ -265,6 +284,7 @@ stages:
265284
MAX_WORKER: $(INSTANCE_NUMBER)
266285
KVM_IMAGE_BRANCH: $(BUILD_BRANCH)
267286
MGMT_BRANCH: $(BUILD_BRANCH)
287+
PTF_MODIFIED: ${{ eq(variables['PTF_MODIFIED'], 'true') }}
268288

269289
- job: impacted_area_dualtor_elastictest
270290
displayName: "impacted-area-kvmtest-dualtor by Elastictest"
@@ -294,6 +314,7 @@ stages:
294314
COMMON_EXTRA_PARAMS: "--disable_loganalyzer "
295315
KVM_IMAGE_BRANCH: $(BUILD_BRANCH)
296316
MGMT_BRANCH: $(BUILD_BRANCH)
317+
PTF_MODIFIED: ${{ eq(variables['PTF_MODIFIED'], 'true') }}
297318

298319
- job: impacted_area_multi_asic_elastictest
299320
displayName: "impacted-area-kvmtest-multi-asic-t1 by Elastictest"
@@ -321,6 +342,7 @@ stages:
321342
NUM_ASIC: 4
322343
KVM_IMAGE_BRANCH: $(BUILD_BRANCH)
323344
MGMT_BRANCH: $(BUILD_BRANCH)
345+
PTF_MODIFIED: ${{ eq(variables['PTF_MODIFIED'], 'true') }}
324346

325347
- job: impacted_area_t0_sonic_elastictest
326348
displayName: "impacted-area-kvmtest-t0-sonic by Elastictest"
@@ -354,6 +376,7 @@ stages:
354376
{"name": "bgp/test_bgp_fact.py", "param": "--neighbor_type=sonic --enable_macsec --macsec_profile=128_SCI,256_XPN_SCI"},
355377
{"name": "macsec", "param": "--neighbor_type=sonic --enable_macsec --macsec_profile=128_SCI,256_XPN_SCI"}
356378
]'
379+
PTF_MODIFIED: ${{ eq(variables['PTF_MODIFIED'], 'true') }}
357380

358381
- job: impacted_area_dpu_elastictest
359382
displayName: "impacted-area-kvmtest-dpu by Elastictest"
@@ -383,3 +406,4 @@ stages:
383406
SPECIFIC_PARAM: '[
384407
{"name": "dash/test_dash_vnet.py", "param": "--skip_dataplane_checking"}
385408
]'
409+
PTF_MODIFIED: ${{ eq(variables['PTF_MODIFIED'], 'true') }}
Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,40 @@
1+
bus "i2c-16" "SCD 0000:03:00.0 SMBus master 1 bus 3"
12
bus "i2c-19" "SCD 0000:06:00.0 SMBus master 0 bus 0"
3+
bus "i2c-35" "SCD 0000:06:00.0 SMBus master 2 bus 4"
4+
bus "i2c-37" "SCD 0000:05:00.0 SMBus master 0 bus 0"
5+
6+
chip "k10temp-pci-00c3"
7+
label temp1 "Cpu temp sensor"
28

39
chip "max6581-i2c-19-4d"
10+
label temp1 "Switch Card temp sensor"
11+
label temp2 "TH5 PCB Left"
12+
label temp3 "TH5 PCB Right"
13+
label temp4 "Inlet Ambiant Air"
414
ignore temp5
515
ignore temp6
16+
label temp7 "TH5 Diode 1"
17+
label temp8 "TH5 Diode 2"
618

719
chip "nvme-pci-0400"
8-
# TODO: sensors complaining about tempX_min and tempX_max
920
ignore temp2
1021
ignore temp3
1122
ignore temp4
1223
ignore temp5
1324
ignore temp6
1425
ignore temp7
26+
27+
chip "pmbus-i2c-35-10"
28+
label temp1 "Power supply 1 internal sensor"
29+
ignore temp2
30+
31+
chip "pmbus-i2c-35-12"
32+
label temp1 "Power supply 2 internal sensor"
33+
ignore temp2
34+
35+
chip "tmp75-i2c-16-48"
36+
label temp1 "Outlet"
37+
38+
chip "tmp75-i2c-37-4a"
39+
label temp1 "Port Card"
40+

device/arista/x86_64-arista_7060x6_16pe_384c_b/sensors.conf

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../x86_64-arista_7060x6_16pe_384c/sensors.conf

dockers/docker-base-bookworm/Dockerfile.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ RUN apt update && \
6363
libwrap0 \
6464
libatomic1
6565

66+
# Security fixes: upgrade vulnerable base packages (S360 scan remediation)
67+
RUN apt-get update && apt-get upgrade -y
68+
6669
# Add a config file to allow pip to install packages outside of apt/the Debian repos
6770
COPY ["pip.conf", "/etc/pip.conf"]
6871

dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,29 @@ dependent_startup_wait_for=rsyslogd:running {% if delay_non_critical_daemon %}de
199199

200200
{% if not skip_thermalctld %}
201201
[program:thermalctld]
202-
command={% if API_VERSION == 3 and 'thermalctld' not in python2_daemons %}python3 {% else %} python2 {% endif %}/usr/local/bin/thermalctld
202+
{% set base_command = (
203+
"python3 /usr/local/bin/thermalctld"
204+
if API_VERSION == 3 and 'thermalctld' not in python2_daemons
205+
else "python2 /usr/local/bin/thermalctld"
206+
) %}
207+
{% set options = "" -%}
208+
209+
{% if thermalctld is defined %}
210+
{% if thermalctld.thermal_monitor_initial_interval is defined and thermalctld.thermal_monitor_initial_interval is not none %}
211+
{%- set options = options + " --thermal-monitor-initial-interval " + thermalctld.thermal_monitor_initial_interval|string %}
212+
{% endif -%}
213+
214+
{% if thermalctld.thermal_monitor_update_interval is defined and thermalctld.thermal_monitor_update_interval is not none %}
215+
{%- set options = options + " --thermal-monitor-update-interval " + thermalctld.thermal_monitor_update_interval|string %}
216+
{% endif -%}
217+
218+
{% if thermalctld.thermal_monitor_update_elapsed_threshold is defined and thermalctld.thermal_monitor_update_elapsed_threshold is not none %}
219+
{%- set options = options + " --thermal-monitor-update-elapsed-threshold " + thermalctld.thermal_monitor_update_elapsed_threshold|string %}
220+
{% endif -%}
221+
{% endif -%}
222+
223+
{%- set command = base_command ~ options %}
224+
command={{ command }}
203225
priority=10
204226
autostart=false
205227
autorestart=unexpected

0 commit comments

Comments
 (0)