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

merge from azure to fork #9

Merged
merged 25 commits into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
52b3494
[BFN] Add support pcied daemon for Montara and Newport (#5199)
bratashX Aug 18, 2020
f840013
[cfggen] Allow Write To Redis DB With Template/Batch Mode (#5203)
tahmed-dev Aug 19, 2020
f5746f3
[submodule]: Advance sonic-snmpagent. (#5213)
SuvarnaMeenakshi Aug 19, 2020
ec11308
[cfggen] Conform With Python 3 Syntax (#5154)
tahmed-dev Aug 19, 2020
da69d57
[redis-dump-load] Update submodule (#5215)
jleveque Aug 19, 2020
e484ae9
[services] Fix Delay Start of SNMP And Telemetry (#5211)
tahmed-dev Aug 20, 2020
fdea6fb
[sonic-py-common][multi ASIC] API to get a list of frontend ports (#5…
smaheshm Aug 20, 2020
ce2c078
[sonic-config-engine] Update .gitignore (#5223)
jleveque Aug 20, 2020
ba3f5ca
Advance swss-common submodule. (#5222)
judyjoseph Aug 20, 2020
74d8b4a
[caclmgrd] Add support for multi-ASIC platforms (#5022)
abdosi Aug 20, 2020
a273e56
Add support to VS platform for platform.json and DPB CLI Tests (#5192)
samaity Aug 21, 2020
570dbf5
[iccpd] Fix uninitialized variable. (#5112)
chenkelly Aug 21, 2020
1a805e7
Fix unwanted python exception in syslog during database container (#5…
abdosi Aug 21, 2020
90cbb4d
[hostcfgd] Handle Both Service And Timer Units (#5228)
tahmed-dev Aug 21, 2020
6f4ef03
[arista] Update driver submodules (#5147)
Staphylo Aug 21, 2020
97d4421
[docker-radv] Fix startup issues (#5230)
jleveque Aug 21, 2020
a1335aa
[sonic-utilities] Update submodule (#5233)
jleveque Aug 21, 2020
bb57cce
[sonic-host-service]: Add SONiC Host Services infrastructure (#4840)
nirenjan Aug 21, 2020
cbb46e4
Add common functions applicable to single/multi asic platforms (#5224)
judyjoseph Aug 22, 2020
87713aa
[sonic-swss] Update submodule (#5231)
jleveque Aug 23, 2020
cd486a8
[arista/aboot]: Zero out 1st MB before repartitioning (#5220)
Nakrez Aug 23, 2020
58db2d5
[sonic-py-common] Add unit test framework (#5238)
jleveque Aug 24, 2020
f3feb56
Add switch for synchronous mode (#5237)
shi-su Aug 24, 2020
834a29c
[enable counters] Enable port buffer drops by default and update MLNX…
mykolaf Aug 25, 2020
394aa5f
Platform monitor changes in daemon_base for multi_asic (#4932)
judyjoseph Aug 25, 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
13 changes: 2 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,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-py-common/**/*.pyc
src/sonic-py-common/.eggs/
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 Expand Up @@ -71,3 +60,5 @@ platform/broadcom/sonic-platform-modules-dell/s6100/modules/dell_s6100_lpc.c
platform/broadcom/sonic-platform-modules-dell/z9100/modules/dell_ich.c
platform/broadcom/sonic-platform-modules-dell/z9100/modules/dell_mailbox.c
platform/broadcom/sonic-platform-modules-dell/z9264f/sonic_platform/ipmihelper.py
platform/vs/docker-sonic-vs/init_cfg.json
platform/p4/docker-sonic-p4/init_cfg.json
2 changes: 2 additions & 0 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
# * SONIC_DPKG_CACHE_METHOD: Specifying method of obtaining the Debian packages from cache: none or cache
# * SONIC_DPKG_CACHE_SOURCE: Debian package cache location when cache enabled for debian packages
# * BUILD_LOG_TIMESTAMP: Set timestamp in the build log (simple/none)
# * ENABLE_SYNCHRONOUS_MODE: Enable synchronous mode between orchagent and syncd
#
###############################################################################

Expand Down Expand Up @@ -212,6 +213,7 @@ SONIC_BUILD_INSTRUCTION := make \
EXTRA_DOCKER_TARGETS=$(EXTRA_DOCKER_TARGETS) \
BUILD_LOG_TIMESTAMP=$(BUILD_LOG_TIMESTAMP) \
SONIC_ENABLE_IMAGE_SIGNATURE=$(ENABLE_IMAGE_SIGNATURE) \
ENABLE_SYNCHRONOUS_MODE=$(ENABLE_SYNCHRONOUS_MODE) \
$(SONIC_OVERRIDE_BUILD_VARS)

.PHONY: sonic-slave-build sonic-slave-bash init reset
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"skip_pcied": true,
"skip_pcied": false,
"skip_fancontrol": true,
"skip_thermalctld": true,
"skip_ledd": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"skip_pcied": true,
"skip_pcied": false,
"skip_fancontrol": true,
"skip_thermalctld": true,
"skip_ledd": true,
Expand Down
1 change: 1 addition & 0 deletions dockers/docker-orchagent/enable_counters.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def enable_counters():
enable_counter_group(db, 'PG_WATERMARK')
enable_counter_group(db, 'QUEUE_WATERMARK')
enable_counter_group(db, 'BUFFER_POOL_WATERMARK')
enable_counter_group(db, 'PORT_BUFFER_DROP')

def get_uptime():
with open('/proc/uptime') as fp:
Expand Down
6 changes: 6 additions & 0 deletions dockers/docker-orchagent/orchagent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ ORCHAGENT_ARGS="-d /var/log/swss "
# Set orchagent pop batch size to 8192
ORCHAGENT_ARGS+="-b 8192 "

# Set synchronous mode if it is enabled in CONFIG_DB
SYNC_MODE=$(echo $SWSS_VARS | jq -r '.synchronous_mode')
if [ "$SYNC_MODE" == "enable" ]; then
ORCHAGENT_ARGS+="-s "
fi

# Check if there is an "asic_id field" in the DEVICE_METADATA in configDB.
#"DEVICE_METADATA": {
# "localhost": {
Expand Down
3 changes: 2 additions & 1 deletion dockers/docker-orchagent/swss_vars.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"asic_type": "{{ asic_type }}",
"asic_id": "{{ DEVICE_METADATA.localhost.asic_id }}",
"mac": "{{ DEVICE_METADATA.localhost.mac }}"
"mac": "{{ DEVICE_METADATA.localhost.mac }}",
"synchronous_mode": "{{ DEVICE_METADATA.localhost.synchronous_mode }}"
}

2 changes: 1 addition & 1 deletion dockers/docker-router-advertiser/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN apt-get clean -y && \
rm -rf /debs

COPY ["docker-init.sh", "/usr/bin/"]
COPY ["radvd.conf.j2", "wait_for_intf.sh.j2", "docker-router-advertiser.supervisord.conf.j2", "/usr/share/sonic/templates/"]
COPY ["radvd.conf.j2", "wait_for_link.sh.j2", "docker-router-advertiser.supervisord.conf.j2", "/usr/share/sonic/templates/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"]

Expand Down
4 changes: 2 additions & 2 deletions dockers/docker-router-advertiser/docker-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ CFGGEN_PARAMS=" \
-d \
-t /usr/share/sonic/templates/docker-router-advertiser.supervisord.conf.j2,/etc/supervisor/conf.d/supervisord.conf \
-t /usr/share/sonic/templates/radvd.conf.j2,/etc/radvd.conf \
-t /usr/share/sonic/templates/wait_for_intf.sh.j2,/usr/bin/wait_for_intf.sh \
-t /usr/share/sonic/templates/wait_for_link.sh.j2,/usr/bin/wait_for_link.sh \
"
sonic-cfggen $CFGGEN_PARAMS

chmod +x /usr/bin/wait_for_intf.sh
chmod +x /usr/bin/wait_for_link.sh

exec /usr/bin/supervisord
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,21 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true

{# Router advertiser should only run on ToR (T0) devices #}
{% if DEVICE_METADATA.localhost.type == "ToRRouter" %}

{% if VLAN_INTERFACE %}
{% for (name, prefix) in VLAN_INTERFACE|pfx_filter %}
{# Router advertiser should only run on ToR (T0) devices which have #}
{# at least one VLAN interface which has an IPv6 address asigned #}
{%- set vlan_v6 = namespace(count=0) -%}
{%- if DEVICE_METADATA.localhost.type == "ToRRouter" -%}
{%- if VLAN_INTERFACE -%}
{%- for (name, prefix) in VLAN_INTERFACE|pfx_filter -%}
{# If this VLAN has an IPv6 address... #}
{% if prefix | ipv6 %}
{% set ipv6_found = true %}
{% endif %}
{% endfor %}
{% endif %}
{%- if prefix | ipv6 -%}
{%- set vlan_v6.count = vlan_v6.count + 1 -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endif -%}

{# Enusre at least one ipv6 vlan interface #}
{% if ipv6_found == true %}
{%- if vlan_v6.count > 0 %}
[program:wait_for_link]
command=/usr/bin/wait_for_link.sh
priority=3
Expand All @@ -60,6 +61,4 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=wait_for_link:exited
{% endif %}

{% endif %}
{% endif -%}
9 changes: 7 additions & 2 deletions files/build_templates/docker_image_ctl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,13 @@ function postStartAction()
link_namespace $DEV
fi

# Wait until redis starts
until [[ $($SONIC_DB_CLI PING | grep -c PONG) -gt 0 ]]; do
# Wait until supervisord and redis starts. This change is needed
# because now database_config.json is jinja2 templated based
# and by the time file gets generated if we do redis ping
# then we catch python exception of file not valid
# that comes to syslog which is unwanted so wait till database
# config is ready and then ping
until [[ ($(docker exec -i database$DEV pgrep -x -c supervisord) -gt 0) && ($($SONIC_DB_CLI PING | grep -c PONG) -gt 0) ]]; do
sleep 1;
done

Expand Down
39 changes: 21 additions & 18 deletions files/build_templates/init_cfg.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"DEVICE_METADATA": {
"localhost": {
"default_bgp_status": {% if shutdown_bgp_on_start == "y" %}"down"{% else %}"up"{% endif %},
"default_pfcwd_status": {% if enable_pfcwd_on_start == "y" %}"enable"{% else %}"disable"{% endif %}
"default_pfcwd_status": {% if enable_pfcwd_on_start == "y" %}"enable"{% else %}"disable"{% endif %},
"synchronous_mode": {% if enable_synchronous_mode == "y" %}"enable"{% else %}"disable"{% endif %}
}
},
"CRM": {
Expand All @@ -17,26 +18,28 @@
{% endfor %}
}
},
{%- set features = [("bgp", "enabled", "enabled"),
("database", "enabled", "disabled"),
("dhcp_relay", "enabled", "enabled"),
("lldp", "enabled", "enabled"),
("pmon", "enabled", "enabled"),
("radv", "enabled", "enabled"),
("snmp", "enabled", "enabled"),
("swss", "enabled", "enabled"),
("syncd", "enabled", "enabled"),
("teamd", "enabled", "enabled")] %}
{%- if include_iccpd == "y" %}{% do features.append(("iccpd", "disabled", "enabled")) %}{% endif %}
{%- if include_mgmt_framework == "y" %}{% do features.append(("mgmt-framework", "enabled", "enabled")) %}{% endif %}
{%- if include_nat == "y" %}{% do features.append(("nat", "disabled", "enabled")) %}{% endif %}
{%- if include_restapi == "y" %}{% do features.append(("restapi", "enabled", "enabled")) %}{% endif %}
{%- if include_sflow == "y" %}{% do features.append(("sflow", "disabled", "enabled")) %}{% endif %}
{%- if include_system_telemetry == "y" %}{% do features.append(("telemetry", "enabled", "enabled")) %}{% endif %}
{%- set features = [("bgp", "enabled", false, "enabled"),
("database", "enabled", false, "disabled"),
("dhcp_relay", "enabled", false, "enabled"),
("lldp", "enabled", false, "enabled"),
("pmon", "enabled", false, "enabled"),
("radv", "enabled", false, "enabled"),
("snmp", "enabled", true, "enabled"),
("swss", "enabled", false, "enabled"),
("syncd", "enabled", false, "enabled"),
("teamd", "enabled", false, "enabled")] %}
{%- if include_iccpd == "y" %}{% do features.append(("iccpd", "disabled", false, "enabled")) %}{% endif %}
{%- if include_mgmt_framework == "y" %}{% do features.append(("mgmt-framework", "enabled", false, "enabled")) %}{% endif %}
{%- if include_nat == "y" %}{% do features.append(("nat", "disabled", false, "enabled")) %}{% endif %}
{%- if include_restapi == "y" %}{% do features.append(("restapi", "enabled", false, "enabled")) %}{% endif %}
{%- if include_sflow == "y" %}{% do features.append(("sflow", "disabled", false, "enabled")) %}{% endif %}
{%- if include_system_telemetry == "y" %}{% do features.append(("telemetry", "enabled", true, "enabled")) %}{% endif %}
"FEATURE": {
{%- for feature, state, autorestart in features %}
{# has_timer field if set, will start the feature systemd .timer unit instead of .service unit #}
{%- for feature, state, has_timer, autorestart in features %}
"{{feature}}": {
"state": "{{state}}",
"has_timer" : {{has_timer | lower()}},
"auto_restart": "{{autorestart}}",
"high_mem_alert": "disabled"
}{% if not loop.last %},{% endif -%}
Expand Down
13 changes: 13 additions & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/sonic-ztp_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
{% endif %}

{% if include_host_service == "y" %}
# Install SONiC Host Service (and its dependencies via 'apt-get -y install -f')
sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/sonic-host-service_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
{% endif %}

# SONiC utilities installs bash-completion as a dependency. However, it is disabled by default
# in bash.bashrc, so we copy a version of the file with it enabled here.
sudo cp -f $IMAGE_CONFIGS/bash/bash.bashrc $FILESYSTEM_ROOT/etc/
Expand All @@ -221,6 +227,13 @@ sudo DEBIAN_FRONTEND=noninteractive dpkg --root=$FILESYSTEM_ROOT -i $debs_path/k
sudo LANG=C DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true chroot $FILESYSTEM_ROOT apt-get -q --no-install-suggests --no-install-recommends --force-no install
fi

# Install python-swss-common package and all its dependent packages
{% if python_swss_debs.strip() -%}
{% for deb in python_swss_debs.strip().split(' ') -%}
sudo dpkg --root=$FILESYSTEM_ROOT -i {{deb}} || sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
{% endfor %}
{% endif %}

# Install custom-built monit package and SONiC configuration files
sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/monit_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
Expand Down
Loading