Skip to content

Commit

Permalink
Merge branch 'sonic-net:master' into 20221201_br_master_add_as9736_64…
Browse files Browse the repository at this point in the history
…d_model
  • Loading branch information
ec-michael-shih authored Jan 17, 2023
2 parents 99f11ee + 5e4a866 commit 680dba5
Show file tree
Hide file tree
Showing 300 changed files with 10,886 additions and 3,692 deletions.
6 changes: 6 additions & 0 deletions .azure-pipelines/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ jobs:
git stash
popd
fi
if [ $(GROUP_NAME) == barefoot ]; then
make $BUILD_OPTIONS SAITHRIFT_V2=y ENABLE_SYNCD_RPC=y target/docker-saiserverv2-bfn.gz
pushd ./src/sonic-sairedis/SAI
git stash
popd
fi
fi
if [ $(syncd_rpc_image) == yes ]; then
make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y target/sonic-$(GROUP_NAME).bin
Expand Down
6 changes: 6 additions & 0 deletions .azure-pipelines/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ jobs:
git stash
popd
fi
if [ ${{ parameters.platform }} == barefoot ]; then
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) SAITHRIFT_V2=y ENABLE_SYNCD_RPC=y target/docker-saiserverv2-bfn.gz
pushd ./src/sonic-sairedis/SAI
git stash
popd
fi
fi
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) target/sonic-${{ parameters.platform }}.bin
Expand Down
9 changes: 5 additions & 4 deletions .azure-pipelines/docker-sonic-mgmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,18 @@ stages:
- stage: Build
jobs:
- job: Build
pool: sonictest
pool: sonicbld
timeoutInMinutes: 360
steps:
- template: cleanup.yml
- checkout: self
clean: true
submodules: recursive
- bash: |
set -xe
make configure PLATFORM=generic
make target/docker-sonic-mgmt.gz
git submodule update --init --recursive -- src/sonic-platform-daemons src/sonic-genl-packet src/sonic-sairedis src/ptf src/sonic-device-data
make SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y configure PLATFORM=generic
make SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y target/docker-sonic-mgmt.gz
cp target -r $(Build.ArtifactStagingDirectory)/target
docker load -i target/docker-sonic-mgmt.gz
docker tag docker-sonic-mgmt $REGISTRY_SERVER/docker-sonic-mgmt:latest
Expand Down
16 changes: 11 additions & 5 deletions .azure-pipelines/docker-sonic-slave-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ parameters:
- sonicbld-armhf

jobs:
- job: Build_${{ parameters.dist }}_${{ parameters.march }}${{ parameters.arch }}
- job: sonic_slave_${{ parameters.dist }}${{ parameters.march }}
timeoutInMinutes: 360
variables:
- template: /.azure-pipelines/template-variables.yml@buildimage
Expand All @@ -46,30 +46,36 @@ jobs:
- template: /.azure-pipelines/template-clean-sonic-slave.yml@buildimage
- checkout: self
clean: true
submodules: recursive
- task: Docker@2
displayName: Login to ACR
inputs:
command: login
containerRegistry: ${{ parameters.registry_conn }}
- bash: |
set -ex
image_tag=$(BLDENV=${{ parameters.dist }} make -f Makefile.work showtag PLATFORM=generic PLATFORM_ARCH=${{ parameters.arch }} | grep sonic-slave | tail -n 1)
build_options="$(VERSION_CONTROL_OPTIONS)"
image_tag=$(BLDENV=${{ parameters.dist }} make -f Makefile.work showtag $build_options PLATFORM=generic PLATFORM_ARCH=${{ parameters.arch }} | grep sonic-slave | tail -n 1)
image_latest=$(echo $(echo $image_tag | awk -F: '{print$1}'):latest)
if echo ${{ parameters.pool }} | grep ${{ parameters.arch }};then
image_latest=$(echo ${image_latest} | sed 's/:/-${{ parameters.arch }}:/')
fi
image_branch=$(echo $(echo $image_latest | awk -F: '{print$1}'):$(Build.SourceBranchName))
docker rmi $image_tag || true
if [[ "$(Build.Reason)" =~ [a-zA-Z]*CI ]] && docker pull ${{ parameters.registry_url }}/${image_tag};then
exit 0
fi
DOCKER_DATA_ROOT_FOR_MULTIARCH=/data/march/docker BLDENV=${{ parameters.dist }} make -f Makefile.work configure PLATFORM=generic PLATFORM_ARCH=${{ parameters.arch }} $args || docker image ls $image_tag
DOCKER_DATA_ROOT_FOR_MULTIARCH=/data/march/docker BLDENV=${{ parameters.dist }} make -f Makefile.work configure $build_options PLATFORM=generic PLATFORM_ARCH=${{ parameters.arch }} $args || docker image ls $image_tag
if [[ "$(Build.Reason)" == "PullRequest" ]];then
exit 0
fi
docker tag ${image_tag} ${REGISTRY_SERVER}/${image_tag}
docker push ${REGISTRY_SERVER}/${image_tag}
if [[ "${{ parameters.arch }}" == "amd64" ]];then
docker tag ${image_tag} ${REGISTRY_SERVER}/${image_branch}
docker push ${REGISTRY_SERVER}/${image_branch}
if [[ "$(Build.SourceBranchName)" == "master" ]];then
docker tag ${image_tag} ${REGISTRY_SERVER}/${image_latest}
docker push ${REGISTRY_SERVER}/${image_latest}
fi
Expand Down
8 changes: 5 additions & 3 deletions .azure-pipelines/docker-sonic-slave.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ parameters:
default: sonicdev

stages:
- stage: Build
- stage: Build_in_amd64
jobs:
- ${{ each dist in parameters.dists }}:
- ${{ if endswith(variables['Build.DefinitionName'], dist) }}:
Expand All @@ -66,7 +66,9 @@ stages:
pool: sonicbld
arch: ${{ arch }}
dist: ${{ dist }}
- stage: Build_march
${{ if ne(arch, 'amd64') }}:
march: _march_${{ arch }}
- stage: Build_native_arm
dependsOn: []
jobs:
- ${{ each dist in parameters.dists }}:
Expand All @@ -78,4 +80,4 @@ stages:
pool: sonicbld-${{ arch }}
arch: ${{ arch }}
dist: ${{ dist }}
march: march_
march: _${{ arch }}
8 changes: 4 additions & 4 deletions .azure-pipelines/run-test-scheduler-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ steps:
echo "TestbedV2 is just online and might not be stable enough, for any issue, please send email to sonictestbedtools@microsoft.com"
echo "Runtime detailed progress at https://www.testbed-tools.org/scheduler/testplan/$TEST_PLAN_ID"
# When "LOCK_TESTBED" finish, it changes into "PREPARE_TESTBED"
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-states PREPARE_TESTBED EXECUTING KVMDUMP FINISHED CANCELLED FAILED
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-state LOCK_TESTBED
env:
TESTBED_TOOLS_URL: $(TESTBED_TOOLS_URL)
displayName: Lock testbed
Expand All @@ -94,7 +94,7 @@ steps:
echo "TestbedV2 is just online and might not be stable enough, for any issue, please send email to sonictestbedtools@microsoft.com"
echo "Runtime detailed progress at https://www.testbed-tools.org/scheduler/testplan/$TEST_PLAN_ID"
# When "PREPARE_TESTBED" finish, it changes into "EXECUTING"
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-states EXECUTING KVMDUMP FINISHED CANCELLED FAILED
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-state PREPARE_TESTBED
env:
TESTBED_TOOLS_URL: $(TESTBED_TOOLS_URL)
displayName: Prepare testbed
Expand All @@ -105,7 +105,7 @@ steps:
echo "TestbedV2 is just online and might not be stable enough, for any issue, please send email to sonictestbedtools@microsoft.com"
echo "Runtime detailed progress at https://www.testbed-tools.org/scheduler/testplan/$TEST_PLAN_ID"
# When "EXECUTING" finish, it changes into "KVMDUMP", "FAILED", "CANCELLED" or "FINISHED"
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-states KVMDUMP FINISHED CANCELLED FAILED
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-state EXECUTING
env:
TESTBED_TOOLS_URL: $(TESTBED_TOOLS_URL)
displayName: Run test
Expand All @@ -116,7 +116,7 @@ steps:
echo "TestbedV2 is just online and might not be stable enough, for any issue, please send email to sonictestbedtools@microsoft.com"
echo "Runtime detailed progress at https://www.testbed-tools.org/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-states FINISHED CANCELLED FAILED
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-state KVMDUMP
condition: succeededOrFailed()
env:
TESTBED_TOOLS_URL: $(TESTBED_TOOLS_URL)
Expand Down
87 changes: 44 additions & 43 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
/Makefile.work @qiluo-msft @xumia @lguohan
/slave.mk @qiluo-msft @xumia @lguohan
/scripts @qiluo-msft @xumia @lguohan
/src/sonic-build-hooks/ @Azure/sonic-build
/src/debootstrap/ @Azure/sonic-build
/src/sonic-fips/ @Azure/sonic-build
/src/sonic-build-hooks/ @sonic-net/sonic-build
/src/debootstrap/ @sonic-net/sonic-build
/src/sonic-fips/ @sonic-net/sonic-build

# installer
/installer/ @qiluo-msft
Expand All @@ -35,76 +35,77 @@
/dockers/docker-snmp/ @qiluo-msft

# kernel
/src/sonic-linux-kernel/ @Azure/sonic-kernel
/src/sonic-linux-kernel/ @sonic-net/sonic-kernel

# devices
/device/ @Azure/sonic-platform
/src/sonic-platform-common/ @Azure/sonic-platform
/src/sonic-platform-daemons/ @Azure/sonic-platform
/src/sonic-platform-pde/ @Azure/sonic-platform
/src/lm-sensors/ @Azure/sonic-platform
/src/flashrom/ @Azure/sonic-platform
/device/ @sonic-net/sonic-platform
/src/sonic-platform-common/ @sonic-net/sonic-platform
/src/sonic-platform-daemons/ @sonic-net/sonic-platform
/src/sonic-platform-pde/ @sonic-net/sonic-platform
/src/lm-sensors/ @sonic-net/sonic-platform
/src/flashrom/ @sonic-net/sonic-platform

# common library
/src/initramfs-tools/ @qiluo-msft
/src/redis-dump-load/ @Azure/sonic-management
/src/sonic-py-common/ @Azure/sonic-management
/src/sonic-py-swsssdk/ @Azure/sonic-management
/src/sonic-swss-common/ @Azure/sonic-management
/src/bash/ @Azure/sonic-management
/src/tacacs/ @Azure/sonic-management
/src/radius/ @Azure/sonic-management
/src/swig/ @Azure/sonic-management
/src/socat/ @Azure/sonic-management
/src/redis-dump-load/ @sonic-net/sonic-management
/src/sonic-py-common/ @sonic-net/sonic-management
/src/sonic-py-swsssdk/ @sonic-net/sonic-management
/src/sonic-swss-common/ @sonic-net/sonic-management
/src/bash/ @sonic-net/sonic-management
/src/tacacs/ @sonic-net/sonic-management
/src/radius/ @sonic-net/sonic-management
/src/swig/ @sonic-net/sonic-management
/src/socat/ @sonic-net/sonic-management

# redis
/src/redis/ @Azure/sonic-management
/src/hiredis/ @Azure/sonic-management
/src/redis/ @sonic-net/sonic-management
/src/hiredis/ @sonic-net/sonic-management

# yang
/src/sonic-yang-models/ @praveen-li @dgsudharsan @rathnasabapathyv @venkatmahalingam @qiluo-msft
/src/sonic-yang-mgmt/ @Azure/sonic-management
/src/libyang/ @Azure/sonic-management
/src/libyang1/ @Azure/sonic-management
/src/libyang2/ @Azure/sonic-management
/src/sonic-yang-mgmt/ @sonet-net/sonic-management
/src/libyang/ @sonic-net/sonic-management
/src/libyang1/ @sonic-net/sonic-management
/src/libyang2/ @sonic-net/sonic-management

# bgpcfgd
/src/sonic-bgpcfgd/ @StormLiangMS

# sonic-config-engine
/src/sonic-config-engine/ @Azure/sonic-management
/src/sonic-config-engine/ @sonic-net/sonic-management

# sonic-utilities
/src/sonic-utilities/ @Azure/sonic-management
/src/sonic-utilities/ @sonic-net/sonic-management

# sonic-telemetry
/src/sonic-telemetry/ @Azure/sonic-management
/dockers/docker-sonic-telemetry @sonic-net/sonic-management
/src/sonic-telemetry/ @sonic-net/sonic-management

# snmp
/src/sonic-snmpagent/ @Azure/sonic-management
/src/snmpd/ @Azure/sonic-management
/src/sonic-snmpagent/ @sonic-net/sonic-management
/src/snmpd/ @sonic-net/sonic-management

# dhcp relay
/src/dhcp6relay/ @Azure/sonic-fundamentals
/src/dhcpmon/ @Azure/sonic-fundamentals
/src/isc-dhcp/ @Azure/sonic-fundamentals
/src/dhcp6relay/ @sonic-net/sonic-fundamentals
/src/dhcpmon/ @sonic-net/sonic-fundamentals
/src/isc-dhcp/ @sonic-net/sonic-fundamentals

# sflow
/src/sflow/ @Azure/sonic-dataplane
/src/sflow/ @sonic-net/sonic-dataplane

# sonic restapi
/src/sonic-restapi/ @Azure/sonic-dataplane
/src/sonic-restapi/ @sonic-net/sonic-dataplane

# sonic swss
/src/sonic-swss/ @Azure/sonic-dataplane
/src/sonic-swss/ @sonic-net/sonic-dataplane

# linux networking, e.g., libnl3, iproute2, ifupdown2, ethtool
/src/libnl3/ @Azure/sonic-dataplane
/src/iproute2/ @Azure/sonic-dataplane
/src/ifupdown2/ @Azure/sonic-dataplane
/src/ethtool/ @Azure/sonic-dataplane
/src/libnl3/ @sonic-net/sonic-dataplane
/src/iproute2/ @sonic-net/sonic-dataplane
/src/ifupdown2/ @sonic-net/sonic-dataplane
/src/ethtool/ @sonic-net/sonic-dataplane

# ptf
/src/ptf/ @Azure/sonic-fundamentals
/src/ptf-py3/ @Azure/sonic-fundamentals
/src/scapy/ @Azure/sonic-fundamentals
/src/ptf/ @sonic-net/sonic-fundamentals
/src/ptf-py3/ @sonic-net/sonic-fundamentals
/src/scapy/ @sonic-net/sonic-fundamentals
2 changes: 1 addition & 1 deletion .github/workflows/pr_cherrypick_poststep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ jobs:
exit 1
fi
gh pr edit $origin_pr_url --add-label "Included in ${base_ref} Branch"
gh pr edit $origin_pr_url --remove-label "Created PR to ${base_ref} Branch,Request for ${base_ref} Branch,Approved for ${base_ref} Branch"
gh pr edit $origin_pr_url --remove-label "Created PR to ${base_ref} Branch,Approved for ${base_ref} Branch"
3 changes: 2 additions & 1 deletion Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ $(shell \
SONIC_VERSION_CACHE=$(SONIC_VERSION_CACHE) \
SONIC_VERSION_CACHE_SOURCE=$(SONIC_VERSION_CACHE_SOURCE) \
DBGOPT='$(DBGOPT)' \
MIRROR_SNAPSHOT=$(MIRROR_SNAPSHOT) \
scripts/generate_buildinfo_config.sh)

# Generate the slave Dockerfile, and prepare build info for it
Expand Down Expand Up @@ -485,7 +486,6 @@ SONIC_BUILD_INSTRUCTION := $(MAKE) \
SHUTDOWN_BGP_ON_START=$(SHUTDOWN_BGP_ON_START) \
INCLUDE_KUBERNETES=$(INCLUDE_KUBERNETES) \
KUBERNETES_VERSION=$(KUBERNETES_VERSION) \
KUBERNETES_CNI_VERSION=$(KUBERNETES_CNI_VERSION) \
K8s_GCR_IO_PAUSE_VERSION=$(K8s_GCR_IO_PAUSE_VERSION) \
INCLUDE_KUBERNETES_MASTER=$(INCLUDE_KUBERNETES_MASTER) \
SONIC_ENABLE_PFCWD_ON_START=$(ENABLE_PFCWD_ON_START) \
Expand Down Expand Up @@ -534,6 +534,7 @@ SONIC_BUILD_INSTRUCTION := $(MAKE) \
MIRROR_URLS=$(MIRROR_URLS) \
MIRROR_SECURITY_URLS=$(MIRROR_SECURITY_URLS) \
GZ_COMPRESS_PROGRAM=$(GZ_COMPRESS_PROGRAM) \
MIRROR_SNAPSHOT=$(MIRROR_SNAPSHOT) \
$(SONIC_OVERRIDE_BUILD_VARS)

.PHONY: sonic-slave-build sonic-slave-bash init reset
Expand Down
3 changes: 2 additions & 1 deletion build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ echo '[INFO] Install and setup eatmydata'
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install eatmydata
sudo LANG=C chroot $FILESYSTEM_ROOT ln -s /usr/bin/eatmydata /usr/local/bin/dpkg
echo 'Dir::Bin::dpkg "/usr/local/bin/dpkg";' | sudo tee $FILESYSTEM_ROOT/etc/apt/apt.conf.d/00image-install-eatmydata > /dev/null
## Note: dpkg hook conflict with eatmydata
sudo LANG=C chroot $FILESYSTEM_ROOT rm /usr/local/sbin/dpkg -f

echo '[INFO] Install packages for building image'
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install makedev psmisc
Expand Down Expand Up @@ -281,7 +283,6 @@ then
## Install Kubernetes
echo '[INFO] Install kubernetes'
install_kubernetes ${KUBERNETES_VERSION}
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install kubernetes-cni=${KUBERNETES_CNI_VERSION}
else
echo '[INFO] Skipping Install kubernetes'
fi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os
import struct
import subprocess
from mmap import *
from sonic_py_common import device_info
from sonic_py_common.general import getstatusoutput_noshell

HOST_CHK_CMD = ["docker"]
EMPTY_STRING = ""
Expand All @@ -14,7 +14,11 @@ def __init__(self):
(self.platform, self.hwsku) = device_info.get_platform_and_hwsku()

def is_host(self):
return subprocess.call(HOST_CHK_CMD) == 0
try:
status, output = getstatusoutput_noshell(HOST_CHK_CMD)
return status == 0
except Exception:
return False

def pci_get_value(self, resource, offset):
status = True
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os
import struct
import subprocess
from mmap import *
from sonic_py_common import device_info
from sonic_py_common.general import getstatusoutput_noshell

HOST_CHK_CMD = ["docker"]
EMPTY_STRING = ""
Expand All @@ -14,7 +14,11 @@ def __init__(self):
(self.platform, self.hwsku) = device_info.get_platform_and_hwsku()

def is_host(self):
return subprocess.call(HOST_CHK_CMD) == 0
try:
status, output = getstatusoutput_noshell(HOST_CHK_CMD)
return status == 0
except Exception:
return False

def pci_get_value(self, resource, offset):
status = True
Expand Down
Loading

0 comments on commit 680dba5

Please sign in to comment.