Skip to content

Commit

Permalink
Merge branch '202205' into 202205-centec
Browse files Browse the repository at this point in the history
  • Loading branch information
philo-micas committed Sep 5, 2023
2 parents 5a0a8e2 + 874ca68 commit ac1c1fd
Show file tree
Hide file tree
Showing 244 changed files with 31,768 additions and 3,366 deletions.
6 changes: 4 additions & 2 deletions .azure-pipelines/azure-pipelines-image-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ jobs:
- template: .azure-pipelines/cleanup.yml@buildimage
- ${{ parameters.preSteps }}
- script: |
BUILD_OPTIONS="$(BUILD_OPTIONS)"
[ -n "$OVERRIDE_BUILD_OPTIONS" ] && OVERRIDE_BUILD_OPTIONS=$(OVERRIDE_BUILD_OPTIONS)
BUILD_OPTIONS="$(BUILD_OPTIONS) $OVERRIDE_BUILD_OPTIONS"
if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox|marvell-armhf)$"; then
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=$(CACHE_MODE) SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/$(PLATFORM_AZP)"
BUILD_OPTIONS="$(BUILD_OPTIONS) $CACHE_OPTIONS"
BUILD_OPTIONS="$BUILD_OPTIONS $CACHE_OPTIONS"
fi
echo $BUILD_OPTIONS
echo "##vso[task.setvariable variable=BUILD_OPTIONS]$BUILD_OPTIONS"
displayName: "Set cache options"
- checkout: self
Expand Down
118 changes: 95 additions & 23 deletions .azure-pipelines/run-test-scheduler-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ parameters:
type: string
default: 1

- name: NUM_ASIC
type: number
default: 1

- name: TEST_SET
type: string
default: ""
Expand All @@ -26,25 +30,81 @@ parameters:
type: string
default: ""

- name: MGMT_BRANCH
- name: COMMON_EXTRA_PARAMS
type: string
default: master
default: ""

- name: VM_TYPE
type: string
default: "ceos"

- name: SPECIFIED_PARAMS
- name: TESTBED_NAME
type: string
default: "{}"
default: ""

- name: COMMON_EXTRA_PARAMS
- name: IMAGE_URL
type: string
default: ""

- name: NUM_ASIC
- name: HWSKU
type: string
default: ""

- name: TEST_PLAN_TYPE
type: string
default: ""

- name: PLATFORM
type: string
default: ""

- name: SCRIPTS
type: string
default: ""

- name: FEATURES
type: string
default: ""

- name: SCRIPTS_EXCLUDE
type: string
default: ""

- name: FEATURES_EXCLUDE
type: string
default: ""

- name: REPO_NAME
type: string
default: ""

- name: MGMT_BRANCH
type: string
default: ""

- name: STOP_ON_FAILURE
type: string
default: ""

- name: RETRY_TIMES
type: string
default: ""

- name: DUMP_KVM_IF_FAIL
type: string
default: "True"
values:
- "True"
- "False"

- name: REQUESTER
type: string
default: ""

- name: MAX_RUN_TEST_MINUTES
type: number
default: 1
default: 480


steps:
- script: |
Expand All @@ -58,10 +118,20 @@ steps:
set -e
pip install PyYAML
rm -f new_test_plan_id.txt
python ./.azure-pipelines/test_plan.py create -t ${{ parameters.TOPOLOGY }} -o new_test_plan_id.txt --min-worker ${{ parameters.MIN_WORKER }} --max-worker ${{ parameters.MAX_WORKER }} \
--test-set ${{ parameters.TEST_SET }} --kvm-build-id $(KVM_BUILD_ID) \
--deploy-mg-extra-params "${{ parameters.DEPLOY_MG_EXTRA_PARAMS }}" --mgmt-branch ${{ parameters.MGMT_BRANCH }} \
--vm-type ${{ parameters.VM_TYPE }} --specified-params "${{ parameters.SPECIFIED_PARAMS }}" --common-extra-params "${{ parameters.COMMON_EXTRA_PARAMS }}" --num-asic ${{ parameters.NUM_ASIC }}
python ./.azure-pipelines/test_plan.py create \
-t ${{ parameters.TOPOLOGY }} \
-o new_test_plan_id.txt \
--min-worker ${{ parameters.MIN_WORKER }} \
--max-worker ${{ parameters.MAX_WORKER }} \
--test-set ${{ parameters.TEST_SET }} \
--kvm-build-id $(KVM_BUILD_ID) \
--deploy-mg-extra-params "${{ parameters.DEPLOY_MG_EXTRA_PARAMS }}" \
--mgmt-branch ${{ parameters.MGMT_BRANCH }} \
--vm-type ${{ parameters.VM_TYPE }} \
--common-extra-params "${{ parameters.COMMON_EXTRA_PARAMS }}" \
--num-asic ${{ parameters.NUM_ASIC }}
TEST_PLAN_ID=`cat new_test_plan_id.txt`
echo "Created test plan $TEST_PLAN_ID"
Expand Down Expand Up @@ -107,18 +177,20 @@ steps:
env:
TESTBED_TOOLS_URL: $(TESTBED_TOOLS_URL)
displayName: Run test
- script: |
set -e
echo "KVM dump"
echo "SONiC PR system-level test is powered by SONiC Elastictest, for any issue, please send email to sonicelastictest@microsoft.com"
echo "Runtime detailed progress at $(FRONTEND_URL)/scheduler/testplan/$TEST_PLAN_ID "
# When "KVMDUMP" finish, it changes into "FAILED", "CANCELLED" or "FINISHED"
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-state KVMDUMP
condition: succeededOrFailed()
env:
TESTBED_TOOLS_URL: $(TESTBED_TOOLS_URL)
displayName: KVM dump
timeoutInMinutes: ${{ parameters.MAX_RUN_TEST_MINUTES }}
- ${{ if eq(parameters.DUMP_KVM_IF_FAIL, 'True') }}:
- script: |
set -e
echo "KVM dump"
echo "SONiC PR system-level test is powered by SONiC Elastictest, for any issue, please send email to sonicelastictest@microsoft.com"
echo "Runtime detailed progress at $(FRONTEND_URL)/scheduler/testplan/$TEST_PLAN_ID "
# When "KVMDUMP" finish, it changes into "FAILED", "CANCELLED" or "FINISHED"
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-state KVMDUMP
condition: succeededOrFailed()
env:
TESTBED_TOOLS_URL: $(TESTBED_TOOLS_URL)
displayName: KVM dump
- script: |
set -e
Expand Down
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ resources:
- repository: sonic-mgmt
type: github
name: sonic-net/sonic-mgmt
ref: master
endpoint: sonic-net
- repository: buildimage
type: github
Expand Down
18 changes: 15 additions & 3 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ sudo LANG=C chroot $FILESYSTEM_ROOT mount
[ -d $TRUSTED_GPG_DIR ] && [ ! -z "$(ls $TRUSTED_GPG_DIR)" ] && sudo cp $TRUSTED_GPG_DIR/* ${FILESYSTEM_ROOT}/etc/apt/trusted.gpg.d/

## Pointing apt to public apt mirrors and getting latest packages, needed for latest security updates
scripts/build_mirror_config.sh files/apt $CONFIGURED_ARCH $IMAGE_DISTRO
scripts/build_mirror_config.sh files/apt $CONFIGURED_ARCH $IMAGE_DISTRO
sudo cp files/apt/sources.list.$CONFIGURED_ARCH $FILESYSTEM_ROOT/etc/apt/sources.list
sudo cp files/apt/apt.conf.d/{81norecommends,apt-{clean,gzip-indexes,no-languages},no-check-valid-until} $FILESYSTEM_ROOT/etc/apt/apt.conf.d/

Expand Down Expand Up @@ -280,7 +280,7 @@ then
## Install Kubernetes master
echo '[INFO] Install kubernetes master'
install_kubernetes ${MASTER_KUBERNETES_VERSION}

sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT curl -fsSL \
https://packages.microsoft.com/keys/microsoft.asc | \
sudo LANG=C chroot $FILESYSTEM_ROOT apt-key add -
Expand All @@ -295,7 +295,7 @@ then
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y remove gnupg
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT curl -o /tmp/cri-dockerd.deb -fsSL \
https://github.com/Mirantis/cri-dockerd/releases/download/v${MASTER_CRI_DOCKERD}/cri-dockerd_${MASTER_CRI_DOCKERD}.3-0.debian-${IMAGE_DISTRO}_amd64.deb
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install -f /tmp/cri-dockerd.deb
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install -f /tmp/cri-dockerd.deb
sudo LANG=C chroot $FILESYSTEM_ROOT rm -f /tmp/cri-dockerd.deb
else
echo '[INFO] Skipping Install kubernetes master'
Expand Down Expand Up @@ -430,6 +430,15 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
systemd-sysv \
ntp

# Workaround for issue: The udev rule may fail to be executed because the
# daemon-reload command is executed in parallel
# Github issue: https://github.com/systemd/systemd/issues/24668
# Github PR: https://github.com/systemd/systemd/pull/24673
# This workaround should be removed after a upstream already contains the fixes
sudo patch $FILESYSTEM_ROOT/lib/systemd/system/systemd-udevd.service \
files/image_config/systemd/systemd-udevd/fix-udev-rule-may-fail-if-daemon-reload-command-runs.patch


if [[ $CONFIGURED_ARCH == amd64 ]]; then
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y download \
grub-pc-bin
Expand Down Expand Up @@ -512,6 +521,9 @@ sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'docke
# Install scapy
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'scapy==2.4.4'

# The option --no-build-isolation can be removed when upgrading PyYAML to 6.0.1
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'PyYAML==5.4.1' --no-build-isolation

## Note: keep pip installed for maintainance purpose

# Install GCC, needed for building/installing some Python packages
Expand Down
54 changes: 35 additions & 19 deletions device/arista/x86_64-arista_7050_qx32/platform.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{
"chassis": {
"name": "DCS-7050QX-32",
"components": [],
"components": [
{
"name": "Scd(addr=0000:04:00.0)"
},
{
"name": "Ucd90120A(addr=6-004e)"
},
{
"name": "Ucd90160(addr=10-004e)"
}
],
"fans": [
{
"name": "fan1"
Expand Down Expand Up @@ -53,37 +63,43 @@
"psus": [
{
"name": "psu1",
"fans": []
"fans": [
{
"name": "psu1/1",
"speed": {
"controllable": false
}
}
]
},
{
"name": "psu2",
"fans": []
"fans": [
{
"name": "psu2/1",
"speed": {
"controllable": false
}
}
]
}
],
"thermals": [
{
"name": "Cpu temp sensor"
},
{
"name": "Board sensor"
},
{
"name": "Front-panel temp sensor"
},
{
"name": "Rear temp sensor"
},
{
"name": "Power supply 1 inlet temp sensor"
"name": "Cpu temp sensor",
"controllable": false
},
{
"name": "Power supply 1 internal sensor"
"name": "Board sensor",
"controllable": false
},
{
"name": "Power supply 2 inlet temp sensor"
"name": "Front-panel temp sensor",
"controllable": false
},
{
"name": "Power supply 2 internal sensor"
"name": "Rear temp sensor",
"controllable": false
}
],
"sfps": [
Expand Down
Loading

0 comments on commit ac1c1fd

Please sign in to comment.