Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Azure/sonic-buildimage in…
Browse files Browse the repository at this point in the history
…to fix_rates

Signed-off-by: Volodymyr Samotiy <[email protected]>

Conflicts:
	dockers/docker-orchagent/enable_counters.py
  • Loading branch information
volodymyrsamotiy committed Sep 15, 2020
2 parents b5eafea + 3a901ee commit 5889d86
Show file tree
Hide file tree
Showing 608 changed files with 38,946 additions and 3,886 deletions.
8 changes: 4 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!--
Please make sure you've read and understood our contributing guidelines;
Please make sure you've read and understood our contributing guidelines:
https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md
** Make sure all your commits include a signature generated with `git commit -s` **
If this is a bug fix, make sure your description includes "fixes #xxxx", or
"closes #xxxx"
"closes #xxxx" or "resolves #xxxx"
Please provide the following information:
-->
Expand All @@ -16,10 +16,10 @@ Please provide the following information:

**- How to verify it**

**- Which release branch to backport (provide reason below if seleted)**
**- Which release branch to backport (provide reason below if selected)**

<!--
- Note we only backport fixes to a release branch, not a feature!
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
Expand Down
15 changes: 1 addition & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.arch
.platform
.screen
rules/config.user

# Build artifacts
fsroot/
Expand All @@ -28,20 +29,6 @@ platform/*/docker-*/Dockerfile
# Installer-related files and directories
installer/x86_64/platforms/

# Config engine
src/sonic-config-engine/**/*.pyc
src/sonic-config-engine/build
src/sonic-config-engine/sonic_config_engine.egg-info

src/sonic-daemon-base/**/*.pyc
src/sonic-daemon-base/build
src/sonic-daemon-base/sonic_daemon_base.egg-info

src/sonic-py-common/**/*.pyc
src/sonic-py-common/build
src/sonic-py-common/dist
src/sonic-py-common/sonic_py_common.egg-info

# Misc. files
asic_config_checksum
files/Aboot/boot0
Expand Down
2 changes: 2 additions & 0 deletions Makefile.cache
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,13 @@ endif
-include $(PLATFORM_PATH)/rules.dep
endif

ifndef SONIC_BUILD_QUIETER
$(info "SONIC_DPKG_CACHE_METHOD" : "$(SONIC_DPKG_CACHE_METHOD)")
ifneq ($(SONIC_DPKG_CACHE_METHOD),none)
$(info "DPKG_CACHE_PATH" : "$(SONIC_DPKG_CACHE_SOURCE)")
endif
$(info )
endif


###############################################################################
Expand Down
25 changes: 17 additions & 8 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# through http.
# * ENABLE_ZTP: Enables zero touch provisioning.
# * SHUTDOWN_BGP_ON_START: Sets admin-down state for all bgp peerings after restart.
# * INSTALL_KUBERNETES: Allows including Kubernetes
# * INCLUDE_KUBERNETES: Allows including Kubernetes
# * ENABLE_PFCWD_ON_START: Enable PFC Watchdog (PFCWD) on server-facing ports
# * by default for TOR switch.
# * ENABLE_SYNCD_RPC: Enables rpc-based syncd builds.
Expand Down Expand Up @@ -46,6 +46,8 @@ SHELL = /bin/bash
USER := $(shell id -un)
PWD := $(shell pwd)

comma := ,

ifeq ($(USER), root)
$(error Add your user account to docker group and use your user account to make. root or sudo are not supported!)
endif
Expand Down Expand Up @@ -108,15 +110,24 @@ ifeq ($(DOCKER_BUILDER_WORKDIR),)
override DOCKER_BUILDER_WORKDIR := "/sonic"
endif

DOCKER_RUN := docker run --rm=true --privileged \
DOCKER_RUN := docker run --rm=true --privileged --init \
-v $(DOCKER_BUILDER_MOUNT) \
-w $(DOCKER_BUILDER_WORKDIR) \
-e "http_proxy=$(http_proxy)" \
-e "https_proxy=$(https_proxy)" \
-i$(if $(TERM),t,)
-i$(if $(TERM),t,) \
$(SONIC_BUILDER_EXTRA_CMDLINE)

include rules/config

ifneq ($(DOCKER_BUILDER_USER_MOUNT),)
DOCKER_RUN += $(foreach mount,$(subst $(comma), ,$(DOCKER_BUILDER_USER_MOUNT)), $(addprefix -v , $(mount)))
endif

ifdef SONIC_BUILD_QUIETER
DOCKER_RUN += -e "SONIC_BUILD_QUIETER=$(SONIC_BUILD_QUIETER)"
endif

ifneq ($(SONIC_DPKG_CACHE_SOURCE),)
DOCKER_RUN += -v "$(SONIC_DPKG_CACHE_SOURCE):/dpkg_cache:rw"
endif
Expand Down Expand Up @@ -175,19 +186,17 @@ DOCKER_BUILD = docker build --no-cache \

SONIC_BUILD_INSTRUCTION := make \
-f slave.mk \
BLDENV=$(BLDENV) \
PLATFORM=$(PLATFORM) \
PLATFORM_ARCH=$(PLATFORM_ARCH) \
BUILD_NUMBER=$(BUILD_NUMBER) \
BUILD_TIMESTAMP=$(BUILD_TIMESTAMP) \
ENABLE_DHCP_GRAPH_SERVICE=$(ENABLE_DHCP_GRAPH_SERVICE) \
ENABLE_ZTP=$(ENABLE_ZTP) \
SHUTDOWN_BGP_ON_START=$(SHUTDOWN_BGP_ON_START) \
INSTALL_KUBERNETES=$(INSTALL_KUBERNETES) \
INCLUDE_KUBERNETES=$(INCLUDE_KUBERNETES) \
KUBERNETES_VERSION=$(KUBERNETES_VERSION) \
KUBERNETES_CNI_VERSION=$(KUBERNETES_CNI_VERSION) \
K8s_GCR_IO_PAUSE_VERSION=$(K8s_GCR_IO_PAUSE_VERSION) \
K8s_CNI_FLANNEL_VERSION=$(K8s_CNI_FLANNEL_VERSION) \
SONIC_ENABLE_PFCWD_ON_START=$(ENABLE_PFCWD_ON_START) \
SONIC_ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \
SONIC_INSTALL_DEBUG_TOOLS=$(INSTALL_DEBUG_TOOLS) \
Expand All @@ -202,8 +211,8 @@ SONIC_BUILD_INSTRUCTION := make \
SONIC_DPKG_CACHE_SOURCE=$(SONIC_DPKG_CACHE_SOURCE) \
HTTP_PROXY=$(http_proxy) \
HTTPS_PROXY=$(https_proxy) \
SONIC_ENABLE_SYSTEM_TELEMETRY=$(ENABLE_SYSTEM_TELEMETRY) \
SONIC_ENABLE_RESTAPI=$(ENABLE_RESTAPI) \
SONIC_INCLUDE_SYSTEM_TELEMETRY=$(INCLUDE_SYSTEM_TELEMETRY) \
SONIC_INCLUDE_RESTAPI=$(INCLUDE_RESTAPI) \
TELEMETRY_WRITABLE=$(TELEMETRY_WRITABLE) \
EXTRA_DOCKER_TARGETS=$(EXTRA_DOCKER_TARGETS) \
BUILD_LOG_TIMESTAMP=$(BUILD_LOG_TIMESTAMP) \
Expand Down
2 changes: 1 addition & 1 deletion README.buildsystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ _Recommend: Rename image built using INSTALL_DEBUG_TOOLS=y to mark it explicit.
* To debug a core file in non-SONiC environment that supports docker
* `docker load -i docker-<name>-dbg.gz`
* copy your unzipped core file into ~/debug
* `docker run -it -entrypoint=/bin/bash -v ~/debug:/debug <image id>`
* `docker run -it --entrypoint=/bin/bash -v ~/debug:/debug <image id>`
* `gdb /usr/bin/<your binary> -c /debug/<your core>`
### Debug SONiC image
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,38 @@

*master builds*:

[![Innovium](https://sonic-jenkins.westus2.cloudapp.azure.com/job/innovium/job/buildimage-invm-all/badge/icon?subject=Innovium)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/innovium/job/buildimage-invm-all)

[![Barefoot](https://sonic-jenkins.westus2.cloudapp.azure.com/job/barefoot/job/buildimage-bf-all/badge/icon?subject=Barefoot)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/barefoot/job/buildimage-bf-all)
[![Broadcom](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all/badge/icon?subject=Broadcom)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all)
[![Centec](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-all/badge/icon?subject=Centec)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-all)
[![Innovium](https://sonic-jenkins.westus2.cloudapp.azure.com/job/innovium/job/buildimage-invm-all/badge/icon?subject=Innovium)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/innovium/job/buildimage-invm-all)
[![Mellanox](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all/badge/icon?subject=Mellanox)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all)
[![Nephos](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-all/badge/icon?subject=Nephos)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-all)
[![P4](https://sonic-jenkins.westus2.cloudapp.azure.com/job/p4/job/buildimage-p4-all/badge/icon?subject=P4)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/p4/job/buildimage-p4-all)
[![VS](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-all/badge/icon?subject=VS)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-all)

*201911 builds*:

[![Innovium](https://sonic-jenkins.westus2.cloudapp.azure.com/job/innovium/job/buildimage-invm-201911/badge/icon?subject=Innovium)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/innovium/job/buildimage-invm-201911/)
[![Barefoot](https://sonic-jenkins.westus2.cloudapp.azure.com/job/barefoot/job/buildimage-bf-201911/badge/icon?subject=Barefoot)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/barefoot/job/buildimage-bf-201911/)
[![Broadcom](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201911/badge/icon?subject=Broadcom)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201911/)
[![Innovium](https://sonic-jenkins.westus2.cloudapp.azure.com/job/innovium/job/buildimage-invm-201911/badge/icon?subject=Innovium)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/innovium/job/buildimage-invm-201911/)
[![Mellanox](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-201911/badge/icon?subject=Mellanox)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-201911/)
[![Nephos](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-201911/badge/icon?subject=Nephos)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-201911)
[![VS](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-201911/badge/icon?subject=VS)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-201911)

*201811 builds*:

[![Innovium](https://sonic-jenkins.westus2.cloudapp.azure.com/job/innovium/job/buildimage-invm-201811/badge/icon?subject=Innovium)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/innovium/job/buildimage-invm-201811/)

[![Broadcom](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201811/badge/icon?subject=Broadcom)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201811/)
[![Mellanox](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-201811/badge/icon?subject=Mellanox)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-201811/)
[![Innovium](https://sonic-jenkins.westus2.cloudapp.azure.com/job/innovium/job/buildimage-invm-201811/badge/icon?subject=Innovium)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/innovium/job/buildimage-invm-201811/)
[![Nephos](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-201811/badge/icon?subject=Nephos)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-201811)
[![VS](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-201811/badge/icon?subject=VS)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-201811)

*201807 builds*:

[![Broadcom](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201807/badge/icon?subject=Broadcom)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201807/)
[![Barefoot](https://sonic-jenkins.westus2.cloudapp.azure.com/job/barefoot/job/buildimage-bf-201807/badge/icon?subject=Barefoot)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/barefoot/job/buildimage-bf-201807/)
[![Mellanox](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-201807/badge/icon?subject=Mellanox)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-201807/)

*201803 builds*:

Expand Down
17 changes: 12 additions & 5 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ if [[ $CONFIGURED_ARCH == armhf || $CONFIGURED_ARCH == arm64 ]]; then
sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/uboot-utils
cat files/initramfs-tools/modules.arm | sudo tee -a $FILESYSTEM_ROOT/etc/initramfs-tools/modules > /dev/null
fi
# Update initramfs for load platform specific modules
if [ -f platform/$CONFIGURED_PLATFORM/modules ]; then
cat platform/$CONFIGURED_PLATFORM/modules | sudo tee -a $FILESYSTEM_ROOT/etc/initramfs-tools/modules > /dev/null
fi

## Install docker
echo '[INFO] Install docker'
Expand All @@ -212,7 +216,7 @@ fi

sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y remove software-properties-common gnupg2

if [ "$INSTALL_KUBERNETES" == "y" ]
if [ "$INCLUDE_KUBERNETES" == "y" ]
then
## Install Kubernetes
echo '[INFO] Install kubernetes'
Expand All @@ -238,9 +242,12 @@ sudo cp files/docker/docker.service.conf $_
## Fix systemd race between docker and containerd
sudo sed -i '/After=/s/$/ containerd.service/' $FILESYSTEM_ROOT/lib/systemd/system/docker.service

## Create redis group
sudo LANG=C chroot $FILESYSTEM_ROOT groupadd -f redis

## Create default user
## Note: user should be in the group with the same name, and also in sudo/docker group
sudo LANG=C chroot $FILESYSTEM_ROOT useradd -G sudo,docker $USERNAME -c "$DEFAULT_USERINFO" -m -s /bin/bash
## Note: user should be in the group with the same name, and also in sudo/docker/redis groups
sudo LANG=C chroot $FILESYSTEM_ROOT useradd -G sudo,docker,redis $USERNAME -c "$DEFAULT_USERINFO" -m -s /bin/bash
## Create password for the default user
echo "$USERNAME:$PASSWORD" | sudo LANG=C chroot $FILESYSTEM_ROOT chpasswd

Expand Down Expand Up @@ -389,7 +396,7 @@ sudo mkdir -p $FILESYSTEM_ROOT/var/core

# Config sysctl
sudo augtool --autosave "
set /files/etc/sysctl.conf/kernel.core_pattern '|/usr/bin/coredump-compress %e %t %p'
set /files/etc/sysctl.conf/kernel.core_pattern '|/usr/bin/coredump-compress %e %t %p %P'
set /files/etc/sysctl.conf/kernel.softlockup_panic 1
set /files/etc/sysctl.conf/kernel.panic 10
set /files/etc/sysctl.conf/vm.panic_on_oom 2
Expand Down Expand Up @@ -479,7 +486,7 @@ fi
sudo cp -f files/image_config/ebtables/ebtables.default $FILESYSTEM_ROOT/etc/default/ebtables
sudo cp -f files/image_config/ebtables/ebtables.init $FILESYSTEM_ROOT/etc/init.d/ebtables
sudo cp -f files/image_config/ebtables/ebtables.service $FILESYSTEM_ROOT/lib/systemd/system/ebtables.service
sudo cp files/image_config/ebtables/ebtables.filter ${FILESYSTEM_ROOT}/etc
sudo cp files/image_config/ebtables/ebtables.filter.cfg ${FILESYSTEM_ROOT}/etc
sudo LANG=C chroot $FILESYSTEM_ROOT update-alternatives --set ebtables /usr/sbin/ebtables-legacy
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable ebtables.service

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"skip_ledd": true
"skip_ledd": true,
"skip_thermalctld": true
}

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ bcm_stat_flags=0
parity_enable=0
parity_correction=0

bcm_num_cos=8
bcm_num_cos=10
l2_mem_entries=32768
l3_mem_entries=16384
l3_alpm_enable=2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"skip_ledd": true
"skip_ledd": true,
"skip_thermalctld": true
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bcm_num_cos=8
bcm_num_cos=10
bcm_stat_flags=0
bcm_stat_interval=2000000
bcm_tunnel_term_compatible_mode=1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"skip_ledd": true
"skip_ledd": true,
"skip_thermalctld": true
}

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ bcm_stat_flags=0
parity_enable=0
parity_correction=0

bcm_num_cos=8
bcm_num_cos=10
l2_mem_entries=32768
l3_mem_entries=16384
l3_alpm_enable=2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"skip_ledd": true
"skip_ledd": true,
"skip_thermalctld": true
}

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fpem_mem_entries=16384
l2xmsg_mode=1

# Platform specfic
bcm_num_cos=8
bcm_num_cos=10
bcm_stat_interval=2000000
cdma_timeout_usec=3000000
ifp_inports_support_enable=1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"skip_ledd": true
"skip_ledd": true,
"skip_thermalctld": true
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"skip_ledd": true
"skip_ledd": true,
"skip_thermalctld": true
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"skip_ledd": true
"skip_ledd": true,
"skip_thermalctld": true
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"skip_ledd": true
"skip_ledd": true,
"skip_thermalctld": true
}

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import json
import syslog
from sonic_platform_base.chassis_base import ChassisBase
from sonic_daemon_base.daemon_base import Logger
from sonic_py_common.logger import Logger
from sonic_platform.fan import Fan
from sonic_platform.psu import Psu
from sonic_platform.component import Component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import os
import time
import subprocess
import sonic_device_util
import syslog
from ctypes import create_string_buffer
from sonic_platform_base.sfp_base import SfpBase
Expand All @@ -18,7 +17,6 @@
from sonic_platform_base.sonic_sfp.sff8436 import sff8436Dom
from sonic_platform_base.sonic_sfp.sff8436 import sff8436InterfaceId
from sonic_platform_base.sonic_sfp.sfputilhelper import SfpUtilHelper
from sonic_daemon_base.daemon_base import Logger
except ImportError as e:
raise ImportError(str(e) + "- required module not found")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"skip_ledd": true
"skip_ledd": true,
"skip_thermalctld": true
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"skip_ledd": true
"skip_ledd": true,
"skip_thermalctld": true
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"skip_ledd": true
"skip_ledd": true,
"skip_thermalctld": true
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"skip_ledd": true
"skip_ledd": true,
"skip_thermalctld": true
}

Loading

0 comments on commit 5889d86

Please sign in to comment.