Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support thermalcltd build, add default policy files as well as build-time unit test support for platform API #5

Closed
wants to merge 71 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
cf98224
Add make support for thermal control feature
Junchao-Mellanox Nov 28, 2019
f428c1c
[sonic_platform]fix issues found in thermal ctrl:
Nov 28, 2019
2b4089d
[sonic_platform]fix issues found in thermal ctrl:
Nov 28, 2019
25a3aef
[sonic_platform]add get_name for fan and psu
Nov 28, 2019
325840c
[sonic_platform]fix divide-by-zero error due to max speed for psu fan…
Dec 2, 2019
952393f
[thermal.py]handle get_high_critical_threshold
Dec 4, 2019
1d83717
Move task_base form sonic-platform-daemon to sonic-daemon-base so tha…
Junchao-Mellanox Dec 6, 2019
77a1d4b
Merge branch 'thermal-control' of https://github.com/Junchao-Mellanox…
Junchao-Mellanox Dec 12, 2019
ff562c9
Merge from stephen to fix thermal related issues
Junchao-Mellanox Dec 13, 2019
6f1e2c3
[fan.py]fix error in get_target_speed for PSU fan
Dec 13, 2019
fa8273b
Add thermal policy JSON file for mellanox devices
Junchao-Mellanox Dec 16, 2019
aeee985
Fix issue found by manual test
Junchao-Mellanox Dec 16, 2019
d27f67b
add default thermal control implementation to mellanox platform api a…
Junchao-Mellanox Dec 18, 2019
5773bb2
add unit test support for sonic thermalctld
Junchao-Mellanox Dec 18, 2019
9772e30
rename some functions to make it more readable according to Kebo comm…
Junchao-Mellanox Dec 19, 2019
d4de5d8
add check for speed value in thermal actions to avoid load invalid value
Junchao-Mellanox Dec 19, 2019
183a42b
add unit test to cover thermal conditions and actions
Junchao-Mellanox Dec 20, 2019
27803f3
Change according to stepan comment
Junchao-Mellanox Dec 23, 2019
af996c7
1. Add base class for FanConditions and PsuConditions; 2. Add default…
Junchao-Mellanox Dec 24, 2019
704228c
remove thermalctld from critical_processes
Junchao-Mellanox Dec 24, 2019
87f7010
SONiC Management Framework Release 1.0 (#3488)
PrabhuSreenivasan Dec 24, 2019
3d9bf8a
add default thermal manager getter in chassis.py
Junchao-Mellanox Dec 24, 2019
e479f4e
add implementation for start and stop thermal algorithm
Junchao-Mellanox Dec 25, 2019
c865626
add unit test for thermal algorithm related JSON config
Junchao-Mellanox Dec 26, 2019
dcc232e
adjust thermal_policy.json to make it compatible with current platfor…
Junchao-Mellanox Dec 26, 2019
baea7e2
[slave.mk] make curl follow HTTP redirects (#3947)
stepanblyschak Dec 27, 2019
86ab2ae
[swsssdk-py] submodule update for sonic-py-swsssdk (#3929)
dzhangalibaba Dec 27, 2019
18cb5c6
[swss] submodule update (#3925)
stepanblyschak Dec 27, 2019
bd72844
[kvm]: increase the kvm installer size to 2G for dbg image
lguohan Dec 28, 2019
78db080
corefile uploader: Updates per review comments offline (#3915)
renukamanavalan Dec 30, 2019
08cde06
[Juniper][QFX5210] Adding qos.json (#3946)
ciju-juniper Dec 31, 2019
24a0c46
[monit] Build from source and patch to use MemAvailable value if avai…
jleveque Dec 31, 2019
ea11287
[Mellanox] Update FW/SDK: 13/29.2000.2696 and 4.3.2904 (#3948)
noaOrMlnx Dec 31, 2019
476be91
[docker-base-stretch]: Do not check expire for stretch-backports repo…
lguohan Jan 1, 2020
0dae59a
[MultiDB]except src and dockers : replace redis-cli with sonic-db-cli…
dzhangalibaba Jan 2, 2020
1221246
Update bgpcfgd with vrf support (#3952)
pavel-shirshov Jan 4, 2020
df04809
[libnl]: Debian Packaging libnl version 3.5.0 (#3967)
tahmed-dev Jan 7, 2020
bef6699
Change PSU FAN naming rule
Junchao-Mellanox Jan 7, 2020
04b9113
[Mellanox]Update the hw-mgmt patch for simx on V.7.0000.2308 (#3957)
stephenxs Jan 7, 2020
3548587
[apt] Instruct apt-get to NOT check the "Valid Until" date in Release…
jleveque Jan 7, 2020
2658ab8
[dhcp-relay]: Add DHCP Relay Monitor (#3886)
tahmed-dev Jan 8, 2020
68499e6
[sonic-mgmt]: Install python-subnettree to sonic-mgmt container. (#3978)
iris00522 Jan 8, 2020
c475519
Fix bug: chroot command line (#3972)
qiluo-msft Jan 8, 2020
483a594
Revert "[MultiDB]except src and dockers : replace redis-cli with soni…
lguohan Jan 10, 2020
856b4b6
[reboot cause]: Delay process-reboot-cause service until network conn…
sujinmkang Jan 10, 2020
bac6615
[device/celestica]: Fix xcvrd error (#3979)
Jan 10, 2020
e45ff4e
[build] make debian package install noninteractive (#3980)
stepanblyschak Jan 10, 2020
f3b5b13
[barefoot]: Update SDK package (#3950)
akokhan Jan 10, 2020
aa67921
[Monit] Change the monitoring period from 120 seconds to 60 seconds. …
yozhao101 Jan 10, 2020
6dcc08e
[psud]: Fix for psud crash because of database connection reset (#3647)
Kalimuthu-Velappan Jan 10, 2020
3b1ee5d
Changes to build restapi docker (#3993)
sumukhatv Jan 10, 2020
b7e48b4
[Services] Allow monit system tool to monitor the critical processes …
yozhao101 Jan 11, 2020
952dfb1
[docker-sonic-mgmt]: fix installation permission issue
lguohan Jan 12, 2020
918fdc6
[sflow]: Upgrade hsflowd to v2.0.26-3 (#4020)
padmanarayana Jan 14, 2020
ebb07d9
[docker-restapi]: Avoid building RestAPI docker by default (#4018)
sumukhatv Jan 15, 2020
237835f
Change MFT version to 14.13.3 (#4022)
noaOrMlnx Jan 15, 2020
9a089c2
[mellanox] Update FW to 13/29.2000.2714. (#3998)
nazariig Jan 15, 2020
6bd17d4
[initramfs] Updated required tools for initramfs (#3734)
antony-rheneus Jan 15, 2020
5229163
[Celestica/Seastone2] Add support Seastone2 device and platform (#3761)
pphuchar Jan 16, 2020
4c526d9
[device/celestica]: Implement Silverstone platform API [THERMAL/COMPO…
Jan 16, 2020
4c46178
[device/celestica]: Implement SFP API (#3869)
Jan 16, 2020
2eda2d8
[sonic-py-swsssdk] update submodule for sonic-py-swsssdk (#4031)
dzhangalibaba Jan 17, 2020
4e3bf84
[mgmt-framework] submodule update (#4030)
tahmed-dev Jan 17, 2020
d150721
modified down rules to pre-down rules to ensure that default route is…
kannankvs Jan 17, 2020
b45d2b4
[arista]: Add support for bald eagle phy (#3922)
byu343 Jan 17, 2020
64500e1
[Arista] Update drivers and boot script (#3959)
Staphylo Jan 17, 2020
05d61b5
[bgpcfgd]: Fix bgpcfgd. Don't notify before all deps are ready. (#4027)
pavel-shirshov Jan 17, 2020
f636ae9
[barefoot]: updated SDK to 9.1.0 released debian packages (#4032)
Jan 17, 2020
1886bdf
[Mellanox] fix gearbox ambient thermal name (#4005)
stephenxs Jan 17, 2020
aca1a86
[caclmgrd] Fix application of IPv6 service ACL rules (part 2) (#4036)
jleveque Jan 18, 2020
7521051
Merge branch 'master' into thermal-policy
Junchao-Mellanox Jan 19, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ target/
# Subdirectories in src
src/bash/*
!src/bash/Makefile
src/dhcpmon/debian/*
!src/dhcpmon/debian/changelog
!src/dhcpmon/debian/compat
!src/dhcpmon/debian/control
!src/dhcpmon/debian/rules
src/ixgbe/*
!src/ixgbe/Makefile
src/isc-dhcp/*
Expand Down Expand Up @@ -50,6 +55,8 @@ src/isc-dhcp/*
!src/isc-dhcp/Makefile
!src/isc-dhcp/patch/
src/libnl3/*
!src/libnl3/debian
src/libnl3/debian/libnl-*/
!src/libnl3/Makefile
src/libteam/*
!src/libteam/Makefile
Expand All @@ -60,6 +67,9 @@ src/lldpd/*
!src/lldpd/patch/
src/lm-sensors/*
!src/lm-sensors/Makefile
src/monit/*
!src/monit/Makefile
!src/monit/patch/
src/mpdecimal/*
!src/mpdecimal/Makefile
src/python-click/*
Expand Down Expand Up @@ -101,6 +111,7 @@ src/thrift/*
# Autogenerated Dockerfiles
sonic-slave/Dockerfile
sonic-slave-stretch/Dockerfile
sonic-slave-jessie/Dockerfile
dockers/docker-base/Dockerfile
dockers/docker-base-stretch/Dockerfile
dockers/docker-config-engine/Dockerfile
Expand Down Expand Up @@ -137,3 +148,17 @@ src/sonic-daemon-base/sonic_daemon_base.egg-info
# Misc. files
files/initramfs-tools/arista-convertfs
files/initramfs-tools/union-mount

# Debian byproduct files
src/**/debian/stamp-*/
src/**/debian/*.log
src/**/debian/*.substvars
src/**/debian/.debhelper/
src/**/debian/tmp/
src/**/debian/autoreconf.*
src/**/debian/build/
src/**/debian/files
src/**/debian/stamp-autotools-files

# .o files
src/**/*.o
10 changes: 10 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,19 @@
[submodule "platform/mellanox/mlnx-sai/SAI-Implementation"]
path = platform/mellanox/mlnx-sai/SAI-Implementation
url = https://github.com/Mellanox/SAI-Implementation
[submodule "src/sonic-mgmt-framework"]
path = src/sonic-mgmt-framework
url = https://github.com/Azure/sonic-mgmt-framework
[submodule "src/sonic-telemetry"]
path = src/sonic-telemetry
url = https://github.com/Azure/sonic-telemetry
[submodule "Switch-SDK-drivers"]
path = platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers
url = https://github.com/Mellanox/Switch-SDK-drivers
[submodule "src/sonic-ztp"]
path = src/sonic-ztp
url = https://github.com/Azure/sonic-ztp
[submodule "src/sonic-restapi"]
path = src/sonic-restapi
url = https://github.com/Azure/sonic-restapi.git
branch = master
1 change: 1 addition & 0 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ SONIC_BUILD_INSTRUCTION := make \
HTTP_PROXY=$(http_proxy) \
HTTPS_PROXY=$(https_proxy) \
SONIC_ENABLE_SYSTEM_TELEMETRY=$(ENABLE_SYSTEM_TELEMETRY) \
SONIC_ENABLE_RESTAPI=$(ENABLE_RESTAPI) \
EXTRA_JESSIE_TARGETS=$(EXTRA_JESSIE_TARGETS) \
$(SONIC_OVERRIDE_BUILD_VARS)

Expand Down
29 changes: 23 additions & 6 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ sudo LANG=C chroot $FILESYSTEM_ROOT mount proc /proc -t proc

## Pointing apt to public apt mirrors and getting latest packages, needed for latest security updates
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}} $FILESYSTEM_ROOT/etc/apt/apt.conf.d/
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/
sudo LANG=C chroot $FILESYSTEM_ROOT bash -c 'apt-mark auto `apt-mark showmanual`'

## Note: set lang to prevent locale warnings in your chroot
Expand Down Expand Up @@ -176,6 +176,11 @@ sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-bottom/varlog
sudo cp files/initramfs-tools/union-fsck $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/union-fsck
sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/union-fsck
pushd $FILESYSTEM_ROOT/usr/share/initramfs-tools/scripts/init-bottom && sudo patch -p1 < $OLDPWD/files/initramfs-tools/udev.patch; popd
if [[ $CONFIGURED_ARCH == armhf || $CONFIGURED_ARCH == arm64 ]]; then
sudo cp files/initramfs-tools/uboot-utils $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/uboot-utils
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

if [[ $CONFIGURED_ARCH == amd64 ]]; then
## Install latest intel ixgbe driver
Expand Down Expand Up @@ -240,7 +245,6 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
openssh-server \
python \
python-setuptools \
monit \
python-apt \
traceroute \
iputils-ping \
Expand Down Expand Up @@ -348,10 +352,6 @@ EOF
sudo sed -i 's/^ListenAddress ::/#ListenAddress ::/' $FILESYSTEM_ROOT/etc/ssh/sshd_config
sudo sed -i 's/^#ListenAddress 0.0.0.0/ListenAddress 0.0.0.0/' $FILESYSTEM_ROOT/etc/ssh/sshd_config

## Config monit
sudo cp files/image_config/monit/monitrc $FILESYSTEM_ROOT/etc/monit/
sudo chmod 600 $FILESYSTEM_ROOT/etc/monit/monitrc

## Config sysctl
sudo mkdir -p $FILESYSTEM_ROOT/var/core
sudo augtool --autosave "
Expand Down Expand Up @@ -397,6 +397,9 @@ set /files/etc/sysctl.conf/net.ipv4.udp_l3mdev_accept 1

set /files/etc/sysctl.conf/net.core.rmem_max 2097152
set /files/etc/sysctl.conf/net.core.wmem_max 2097152

set /files/etc/sysctl.conf/net.core.somaxconn 512

" -r $FILESYSTEM_ROOT

if [[ $CONFIGURED_ARCH == amd64 ]]; then
Expand Down Expand Up @@ -496,8 +499,22 @@ fi
## Remove gcc and python dev pkgs
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y remove gcc libpython2.7-dev

## Add mtd and uboot firmware tools package
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install u-boot-tools mtd-utils
sudo LANG=C chroot $FILESYSTEM_ROOT apt-mark manual u-boot-tools mtd-utils

## Update initramfs
sudo chroot $FILESYSTEM_ROOT update-initramfs -u
## Convert initrd image to u-boot format
if [[ $CONFIGURED_ARCH == armhf || $CONFIGURED_ARCH == arm64 ]]; then
INITRD_FILE=initrd.img-${LINUX_KERNEL_VERSION}-${CONFIGURED_ARCH}
if [[ $CONFIGURED_ARCH == armhf ]]; then
INITRD_FILE=initrd.img-${LINUX_KERNEL_VERSION}-armmp
fi
sudo LANG=C chroot $FILESYSTEM_ROOT mkimage -A arm -O linux -T ramdisk -C gzip -d /boot/$INITRD_FILE /boot/u${INITRD_FILE}
## Overwriting the initrd image with uInitrd
sudo LANG=C chroot $FILESYSTEM_ROOT mv /boot/u${INITRD_FILE} /boot/$INITRD_FILE
fi

## Clean up apt
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y autoremove
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# name lanes alias index
Ethernet0 1,2,3,4 Ethernet1/1 1
Ethernet4 5,6,7,8 Ethernet2/1 2
Ethernet8 9,10,11,12 Ethernet3/1 3
Ethernet12 13,14,15,16 Ethernet4/1 4
Ethernet16 21,22,23,24 Ethernet5/1 5
Ethernet20 17,18,19,20 Ethernet6/1 6
Ethernet24 25,26,27,28 Ethernet7/1 7
Ethernet28 29,30,31,32 Ethernet8/1 8
Ethernet32 37,38,39,40 Ethernet9/1 9
Ethernet36 33,34,35,36 Ethernet10/1 10
Ethernet40 41,42,43,44 Ethernet11/1 11
Ethernet44 45,46,47,48 Ethernet12/1 12
Ethernet48 53,54,55,56 Ethernet13/1 13
Ethernet52 49,50,51,52 Ethernet14/1 14
Ethernet56 57,58,59,60 Ethernet15/1 15
Ethernet60 61,62,63,64 Ethernet16/1 16
Ethernet64 69,70,71,72 Ethernet17/1 17
Ethernet68 65,66,67,68 Ethernet18/1 18
Ethernet72 73,74,75,76 Ethernet19/1 19
Ethernet76 77,78,79,80 Ethernet20/1 20
Ethernet80 85,86,87,88 Ethernet21/1 21
Ethernet84 81,82,83,84 Ethernet22/1 22
Ethernet88 89,90,91,92 Ethernet23/1 23
Ethernet92 93,94,95,96 Ethernet24/1 24
Ethernet96 101,102,103,104 Ethernet25/1 25
Ethernet100 97,98,99,100 Ethernet26/1 26
Ethernet104 105,106,107,108 Ethernet27/1 27
Ethernet108 109,110,111,112 Ethernet28/1 28
Ethernet112 117,118,119,120 Ethernet29/1 29
Ethernet116 113,114,115,116 Ethernet30/1 30
Ethernet120 121,122,123,124 Ethernet31/1 31
Ethernet124 125,126,127,128 Ethernet32/1 32
Ethernet128 129 Ethernet33 33
Ethernet132 128 Ethernet34 34
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/td3-a7050cx3-32s-32x100G.config.bcm
Loading