Commit Graph

5095 Commits

Author SHA1 Message Date
ANISH-GOTTAPU
e858d6e346
adding snappi to docker (#7292)
For the migration of tests that involves tgen from abstract to snappi, snappi library is needed
2021-04-15 08:24:31 -07:00
xumia
ac99b8fee8
[ci] Fix no enough space issue in docker root in multi arch build (#7321)
Why I did it
Failed to build the centec-arm64 for no space in docker data root.

How I did it
Change to use the data root to the folder under /data.
See detail info about DOCKER_DATA_ROOT_FOR_MULTIARCH in the file Makefile.work.

How to verify it
Set the environment variable, then the /data used as docker root.
2021-04-15 14:32:08 +08:00
Blueve
a523be94bb
[HLX] Fix issue where HLX module failed to do postinit (#7274)
Signed-off-by: Jing Kan jika@microsoft.com
2021-04-15 14:18:13 +08:00
Qi Luo
15487f4b5e
[doc]: Fix typos in documents (#7296) 2021-04-14 18:27:24 -07:00
Lawrence Lee
39a027bceb
[l2-preset]: Add all dual ToR required fields (#7318)
- Add peer_switch field to DEVICE_METADATA table
- In PORT table:
   - Set used ports to admin status up
   - Set mux_cable to true for downlinks in use
- In MUX_CABLE table:
   - Only add entry if the downlink is in use

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
2021-04-14 17:38:14 -07:00
jostar-yang
6641a6b1a1
[as9716-32d] Add to support PDDF (#6902)
Add PDDF support for Accton as9716-32d platform

Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-04-14 14:43:52 -07:00
jostar-yang
b4b9e4234f
[as7816-64x] Add to support PDDF (#7077)
Add PDDF support for Accton as7816-64x platform

Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-04-14 14:40:52 -07:00
Aravind Mani
95fecafdf9
Dell S6100: Modify transceiver change event from interrupt to poll mode (#7309)
#### Why I did it

- xcvrd crash was seen in latest 201811 images.
- For Dell S6100,API 2.0 uses poll mode while 1.0 was still using interrupt mode.

#### How I did it

- Modified get_transceiver_change_event in 1.0 to poll mode.
2021-04-14 12:12:30 -07:00
xumia
f5703825e3
Fix the SONiC version starting with HEAD issue (#7319) 2021-04-14 21:18:43 +08:00
vdahiya12
75c29cbbb9
[sonic-platform-daemons] submodule update (#7298)
c4d4790 [xcvrd] refactor Y-Cable firmware information to conform with all vendors (#171)
be7f4e1 [voqinband]Support for inband port as regular port (#145)

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
2021-04-13 01:02:15 -07:00
Junchao-Mellanox
32b5b027f4
[sonic-platform-daemons] Update submodule (#7277)
eff5c1c [thermalctld] No need exit thermalcltd when loading invalid policy file (#172)
5b6d9c0 [syseepromd] Add unit tests; Refactor to allow for greater unit test coverage (#156)
2021-04-12 10:57:53 -07:00
Nazarii Hnydyn
6f0dbf2c44
[installer]: Prevent filesystem corruption (#7264)
This improvement reads current SONiC version directly from `/proc/cmdline`.
it supports `grub/aboot/uboot` bootloaders.

**Code snippet**:
```bash
cat /proc/cmdline | sed -n 's/^.*loop=\/*image-\(\S\+\)\/.*$/\1/p'
```

**Description**:
```
-n         don't print lines
s          substitute
^.*        matches anything before the <image_version>
loop=      matches <loop> kernel parameter
\/*image-  matches <image_version> prefix
\(\S\+\)   matches <image_version> group and assigns it to \1
\/.*$      matches anything after the <image_version>
\1         replace everything with <image_version>
p          print it
```
closes #6267

#### Why I did it
* To fix #6267

#### How I did it
* Fixed installer scripts

#### How to verify it
1. Write invalid SONiC version to sonic_version.yml
2. Run SONiC-To-SONiC update
2021-04-12 10:48:44 -07:00
anish-n
9d81524768
Add downstreamsubrole parsing to minigraph.py (#7193) 2021-04-12 10:33:41 -07:00
xumia
12ab9af4fb
[ci] Support to merge SONiC package versions change pr automatically (#7065)
Support to merge the SONiC package versions upgrade pull request automatically.

#### How I did it
Add the automerge tag in the pull request.
1. Sent by the author mssonicbld
2. Only contains changes in files/build/**/*
3. Only for the specified branch 202012

Merge the pull request.
1. Sent by the author mssonicbld
2. The Azure Pipelines checker complete and successful
3. The pull request contains label automerge
2021-04-11 21:17:28 -07:00
xumia
7df4c0ad7c
[ci] Fix the wrong build options issue (#7287)
Why I did it
Fix the wrong build options and improve display name for some tasks
1. Fix the wrong build architecture for arm64 and armhf
2. Fix the build timeout parameter
2021-04-12 07:43:06 +08:00
Joe LeVeque
e30a7eb6aa
[sonic-syseepromd] Depend on sonic-platform-common (#7279)
Unit tests for syseepromd depend on sonic-platform-common as of Azure/sonic-platform-daemons#156
2021-04-09 16:58:53 -07:00
lguohan
fd5841075d
[sonic-slave]: install nose package explicity (#7258)
nose package is required by mockredispy

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-04-09 16:58:00 -07:00
MuLin
5e17093f06
[submodule]: update sonic-telemetry submodule (#7275)
1c3f75e (HEAD -> master, origin/master, origin/HEAD) pindown the version of github.com/openconfig/gnoi (#76)
33acd5b [ci]: setup proper azp (#75)
5d82051 [CI] Set up CI with Azure Pipelines (#72)
0688cdb Remove go get commands from Makefile to prevent go.mod file from chan… (#66)
2021-04-09 06:51:50 -07:00
Shilong Liu
1c220d923a
[CI] Fix the wrong environment variable PLATFORM passing into the slave container issue (#7262)
* fix

* fix
2021-04-09 07:36:53 +08:00
Stepan Blyshchak
4351db7035
[sonic-swss] update sonic-swss submodule (#7263)
5c63670 (HEAD, origin/master, origin/HEAD) [intfmgrd] reach reconciled state at start when there are no interfaces configuration to process (#1695)
66e1aab [Dynamic Buffer Calc] Enhancement: coding style and LGTM alerts (#1693)
637e8d0 Skip Macsec test case till macsec orch code is made SAIv1.8.0 compatible (#1688)
872b5cb [ci]: archive swss pytests (#1690)
73cbd91 [Makefile] Reorder libsaimetadata and libswsscommon (#1689)
cba6576 Correct the sflow default sample rate (#1623)
aac71e6 Don't update pools when ingress_lossless_pool is created but the initialization hasn't finished yet (#1685)
ae5f051 Fix dynamic buffer bug occuring in rare condition (#1678)
691bd30 [voq/systemlag] Voq system lag functionality (#1605)

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
2021-04-08 15:37:28 -07:00
judyjoseph
1ad5dbeab6
Fixes for errors seen in staging devices (#7171)
With the latest 201911 image, the following error was seen on staging devices with TSB command ( for both single asic, multi asic ). Though this err message doesn't affect the TSB functionality, it is good to fix.

admin@STG01-0101-0102-01T1:~$ TSB
BGP0 : % Could not find route-map entry TO_TIER0_V4 20
line 1: Failure to communicate[13] to zebra, line: no route-map TO_TIER0_V4 permit 20
% Could not find route-map entry TO_TIER0_V4 30
line 2: Failure to communicate[13] to zebra, line: no route-map TO_TIER0_V4 deny 30

In addition, in this PR I am fixing the message displayed to user when there are no BGP neighbors configured on that BGP instance. In multi-asic device there could be case where there are no BGP neighbors configured on a particular ASIC.
2021-04-08 15:16:43 -07:00
Shi Su
42059ac6d7
[bgpcfgd] Add bgpcfgd support for static routes (#7233)
Why I did it
Add bgpcfgd support for static routes.

How I did it
Add bgpcfgd support to subscribe changes in STATIC_ROUTE table in CONFIG_DB and program via vtysh. The key of STATIC_ROUTE table is formatted as STATIC_ROUTE|vrf|ip_prefix, while the vrf is optional. If would be treated the same as "default" if no vrf is given.

Add unit tests.
2021-04-08 13:51:58 -07:00
Joe LeVeque
39a5efe0f4
[sonic-py-common.task_base] Provide ability to set stop timeouts (#6914)
#### Why I did it

Allowing an application to set a stop timeout for processes and threads provides the following benefits:

1. Prevents the application from hanging indefinitely in the case a process or thread does not exit
2. Allow ProcessTaskBase a chance to let the process exit gracefully before attempting to kill it

Default values are as follows:
- ProcessTaskBase: 1 second
- ThreadTaskBase: No timeout

#### How I did it

- Add optional `stop_timeout_secs` parameter to initializers of ProcessTaskBase and ThreadTaskBase
- Additionally:
    - Prefix private attributes with an underscore
    - Remove obsolete comments
2021-04-08 10:23:33 -07:00
Kebo Liu
ef98890e6e
[Mellanox] Fix incomplete platform name for MSN4600C in sfputil plugin (#7259)
The platform name for MSN4600C in sfputil pliugin is not complete: "x86_64-mlnx_msn4600c" -> "x86_64-mlnx_msn4600c-r0"

Signed-off-by: Kebo Liu <kebol@nvidia.com>
2021-04-08 10:15:31 -07:00
Aravind Mani
d027aee7df
DellEMC Z9332f change port alias (#7260) 2021-04-08 09:47:20 -07:00
Vivek Reddy
69b03fc01f
[ethtool]: disable unit test when building ethtool on armhf/arm64 (#7226)
Compiling ethtool from source is causing ethtool unit tests to fail on ARM Platforms.

These tests are failing: (By default netlink-interface is enabled while compiling ethtool)
Link: ([Test File Link](https://salsa.debian.org/kernel-team/ethtool/-/blob/debian/1%255.9-1/test-cmdline.c#L28))
```
FAIL: test-cmdline
==================

E: ethtool 16_char_devname! returns 1
E: ethtool 
127_char_devname0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde returns 1
E: ethtool --change devname xcvr external returns 0
E: ethtool --change devname speed 100 duplex half port tp autoneg on advertise 0x1 phyad 1 xcvr external wol p sopass 01:23:45:67:89:ab msglvl 1 returns 0

FAIL test-cmdline (exit status: 1)
```
Tested this on Local ARM Emulated Container:

```
(Docker Container Emulating ARM)
vkarri@3a03c70eed35:/tmp/ethtool$ ./ethtool 16_char_devname!
netlink interface initialization failed, device name longer than 15 not supported
vkarri@3a03c70eed35:/tmp/ethtool$ echo $?
1 (Expected 0)
vkarri@3a03c70eed35:~/ethtool$ ./ethtool 16_char_devnameee
netlink interface initialization failed, device name longer than 15 not supported

Checked for dependencies: (all are present)
vkarri@3a03c70eed35:~/ethtool$ apt-cache policy libmnl0
libmnl0:
  Installed: 1.0.4-2
  Candidate: 1.0.4-2
  Version table:
 *** 1.0.4-2 500
        500 http://deb.debian.org/debian buster/main armhf Packages
        500 http://packages.trafficmanager.net/debian/debian buster/main armhf Packages
        100 /var/lib/dpkg/status

vkarri@3a03c70eed35:~/ethtool$ apt-cache policy libc6  
libc6:
  Installed: 2.28-10
  Candidate: 2.28-10
  Version table:
 *** 2.28-10 500
        500 http://deb.debian.org/debian buster/main armhf Packages
        500 http://packages.trafficmanager.net/debian/debian buster/main armhf Packages
        100 /var/lib/dpkg/status
```

#### How I did it
Disabled netlink-interface for ethtool. 

Even though Netlink is not available, it doesn't seem to impact what ethtool was supposed to do. In fact the older version which was in use before this PR [#5725](https://github.com/Azure/sonic-buildimage/pull/5725) did not have netlink support and everything seemed to work well

Article on Netlink-Support for ethtool: https://lwn.net/Articles/783633/

Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
2021-04-08 09:08:22 -07:00
Joe LeVeque
ee1383791c
[sonic-py-common] Add 'general' module with load_module_from_source() function (#7167)
#### Why I did it

To eliminate the need to write duplicate code in order to import a Python module from a source file.

#### How I did it

Add `general` module to sonic-py-common, which contains a `load_module_from_source()` function which supports both Python 2 and 3.

Call this new function in:
- sonic-ctrmgrd/tests/container_test.py
- sonic-ctrmgrd/tests/ctrmgr_tools_test.py
- sonic-host-services/tests/determine-reboot-cause_test.py
- sonic-host-services/tests/hostcfgd/hostcfgd_test.py
- sonic-host-services/tests/procdockerstatsd_test.py
- sonic-py-common/sonic_py_common/daemon_base.py
2021-04-08 08:29:28 -07:00
fk410167
42d22f4953
Invoking python3 installation for PDDF 2.0 PAI package (#7100)
Adjusting the PDDF utility with python3 commands
2021-04-08 08:21:17 -07:00
Renuka Manavalan
be7897340b
[baseimage]: specify gid for redis group. (#7249)
Problem:
Default groupadd for redis, takes 1000 by default. This forces, subsequently created admin group to get 1001.
As all TACACS users are created with 1000 as their gid, they end up in redis group.

Fix:
Create redis group *after* admin group is created
Add a check that admin group id is 1000
2021-04-08 07:48:37 -07:00
Joe LeVeque
614140ebc9
[sonic-platform-daemons] Update submodule (#7251)
src/sonic-platform-daemons 450b7d7...0bd9f69 (2):
- [thermalctld] Fix 'NameError("name 'chassis' is not defined")' error in log (#170)
- [xcvrd] Gracefully handle improper 'specification_compliance' field; also fix other potential bugs (#169)
2021-04-08 00:19:51 -07:00
vdahiya12
a7c55a1db0
[sonic-platform-common] submodule update (#7253)
872f0a3 [Y-Cable] refactor get_firmware_version to comply with all vendors (#182)
cc162d6 [sonic_y_cable]: Decorate all method for mux simulator (#181)
fa02416 Change import order in Ycable helper and EEPROM read bytearray change in SFP plugin (#177)
0b60982 [thermal_base] Add setter functions for critical thresholds (#180)
10dc16f [y_cable] add support for enable/disable autoswitch feature on Y cable (#176)
c6c81a8 [fan_drawer_base.py] Fix FanDrawer get_status_led interface (#175)

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
2021-04-07 22:01:04 -07:00
Stepan Blyshchak
8f2bd48c42
[debian] install systemd version 247 from buster-backports (#7228)
Fix #7180 

Update systemd to v247 in order to pick the fix for "core: coldplug possible nop_job" systemd/systemd#13124

Install systemd, systemd-sysv from buster-backports. Pass "systemd.unified_cgroup_hierarchy=0" as kernel argument to force systemd to not use unified cgroup hierarchy, otherwise dockerd won't start moby/moby#16238.
Also, chown $FILSYSTEM_ROOT for root, otherwise apt systemd installation complains, see similar https://unix.stackexchange.com/questions/593529/can-not-configure-systemd-inside-a-chrooted-environment

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
2021-04-07 22:00:27 -07:00
Shilong Liu
dcb9ef3d44
[CI] Update sonic image official build template. (#7198)
* draft

* fix

* Update new-build-template.yml

* Update azure-pipelines-build.yml

* Update azure-pipelines-job-groups.yml

* fix

* fix

* draft

* fix

* fix

* fix

* fix

* fix

* fix

Signed-off-by: Shilong Liu <shilongliu@microsoft.com>

Co-authored-by: Sonic Automation <svc-acs@microsoft.com>
2021-04-08 07:05:31 +08:00
abdosi
8ec3bdc301
[multi-asic] Make sure Everflow tables always gets classified as Mirror table (#7241)
Make sure Everflow always gets classified as Mirror table and not as Control Plane on multi-asic platforms.

Why I did:
In Multi-asic platforms we generate Everflow acl table data from minigraph for both host and namespace.
It is possible in multi-asic minigraph if there are no external port-channel (Only Router Port IP Interface) then Everflow table will have no binded interface in host and will gets classified as Control Plane ACL while in namespace gets classified as Mirror Table.
For ACL Rule generation we read global db as source of truth for acl table information and so for everflow rule generation if tables gets classified as Control plane we can generate rules with invalid action causing orchagent to throw runtime error.

How I did:
If the table is attach to erspan interface in minigraph then it always gets classified as mirror table.
2021-04-07 13:35:34 -07:00
Stephen Sun
46a7fac1aa
Bug fix: Support dynamic buffer calculation on ACS-MSN3420 and ACS-MSN4410 (#7113)
- Why I did it
Add missed files for dynamic buffer calculation for ACS-MSN3420 and ACS-MSN4410

- How I did it
asic_table.j2: Add mapping from platform to ASIC
Add buffer_dynamic.json.j2 for ACS-MSN4410.

- How to verify it
Check whether the dynamic buffer calculation daemon starts successfully.

Signed-off-by: Stephen Sun <stephens@nvidia.com>
2021-04-07 20:33:15 +03:00
Prince Sunny
20c8dd2691
[IPinIP] Add Loopback2 interface, change dscp mode to uniform (#7234)
Co-authored-by: Ubuntu <prsunny>
2021-04-07 09:58:12 -07:00
Danny Allen
fca7b2429d
Revert "Add fabric lane mapping to vs (sai.profile) and HWSKU Force10-S6000 (#6185)" (#7250)
This reverts commit c2b5e931a2.
2021-04-07 09:57:16 -07:00
Nazarii Hnydyn
241fabd7e6
[submodule]: Advance sonic-utilities submodule. (#7246)
pull up fwutil next image mount fix

Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
2021-04-07 09:26:42 -07:00
ngoc-do
c2b5e931a2
Add fabric lane mapping to vs (sai.profile) and HWSKU Force10-S6000 (#6185)
Signed-off-by: ngocdo <ngocdo@arista.com>
2021-04-07 09:10:40 -07:00
yozhao101
0ceaf846c3
[sonic-utilities] Update submodule. (#7227)
3f2a296 - 2021-04-06 | [fast-reboot] Fix fast-reboot-dump.py SonicV2Connector after late merge (# 1546) [Shlomi Bitton]
87b2481 - 2021-04-04 | Reduce time taken by show commands on multi-asic platforms (# 1544) [Abhishek Dosi]
9bbc25f - 2021-04-04 | [config] Eliminate race condition between reloading Monit config and monitoring container_checker (# 1543) [Yong Zhao]
e0f678a - 2021-04-03 | [setup.py]: move the module to test requirement (# 1542) [Guohan Lu]
37376dd - 2021-04-02 | [ci]: download latest docker-sonic-vs from sonic-swss repo (# 1541) [Guohan Lu]
d55d406 - 2021-3-31 | [acl_loader]: add iptype match to the rules for dataplane acl (# 1540) [Guohan Lu]
12fc01e - 2021-04-03 | [reboot] No need enable the Linux magic system request key (# 1538) [Yong Zhao]
0ce6a25 - 2021-04-05 | [show][config] cli support for firmware upgrade on Y-Cable (# 1528) [Vaibhav Dahiya]
e9cfb32 - 2021-04-02 | [fast-reboot] Fix dump script to support PortChannels in a VLAN group (# 1393) [Shlomi Bitton]

Signed-off-by: Yong Zhao <yozhao@microsoft.com>
2021-04-06 19:08:00 -07:00
Stephen Sun
0b16ca4ae9
[monit] Avoid monit error log by removing "-l" from monit_swss|buffermgrd (#7236)
Avoid the following error messages while dynamic buffer calculation is enabled
```
ERR monit[491]: 'swss|buffermgrd' status failed (1) -- '/usr/bin/buffermgrd -l' is not running in host
```

Change /usr/bin/buffermgrd -l to /usr/bin/buffermgrd. The buffermgrd is started by -l for traditional model or -a for dynamic model. So we need to use the common section of both.

Signed-off-by: Stephen Sun <stephens@nvidia.com>
2021-04-06 10:12:23 -07:00
Samuel Angebault
d4209e2a50
[Arista] Update platform library submodules (#7205)
Platform API
 -  Fix Watchdog get_remaining_time logic
 -  Improve Sfp platform API implementation
 -  Improve EepromDecoder API implementation
 -  Fix mismatch between Fan name and platform.json
 -  Add PSU get_maximum_supplied_power

Internal
 - Refactor of Xcvr declaration and initialization
 - Cleanup of Resets and Gpios
 - Add platform library versioning to enhance support capabilities
 - Allow supervisor to manage cards from slot 2
 - Miscelanous cleanups and refactors

Signed-off-by: Samuel Angebault <staphylo@arista.com>
2021-04-06 09:04:47 -07:00
abdosi
9f2deae8fb
[multi-asic] optimize api that checks port/port-channel/bgp is internal (#7232)
Optimize the API's is_port_internal() , is_portchannel_internal() and is_bgp_internal ()to call get_entry(Redis hget) instead of get_table (Redis keys *)
2021-04-05 18:55:10 -07:00
Aravind Mani
6d83a424b5
[dell]: System Health: Fix ASIC key issue in Dell platform (#6556)
ASIC key used in system health daemon is not present in Dell platforms.

Fixes #6343

Got the thermal sensor list using 2.0 API and retrieved the ASIC keys.
2021-04-05 18:00:38 -07:00
Prince Sunny
7aa03bead9
Submodule update sai-redis (#7223)
1942d73 - 2021-04-02 : [vslib] Allow host interface object ID to be "VLAN" type (#804) [Volodymyr Samotiy]
2021-04-05 15:28:15 -07:00
Lawrence Lee
0a86699e73
[sonic-config-engine]: Update L2 preset for dualtor (#7215)
- When generating L2 preset, check for dual ToR setting from CLI option `-a '{"is_dualtor": true}'`
- When dual ToR is specified, add subtype field to DEVICE_METADATA table
- When dual ToR is specified, add MUX_CABLE, TUNNEL, LOOPBACK_INTERFACE, and PEER_SWITCH tables
2021-04-05 13:06:27 -07:00
Aravind Mani
e6afc5ad9a
Add DellEMC Z9332f pre-emphasis settings (#6984) 2021-04-05 09:44:37 -07:00
Nazarii Hnydyn
01b0330797
[install.sh] Fix CPU cstates configuration. (#7222)
The motivation of these changes is to fix (#6051):

- Why I did it
To fix CPU cstates configuration

- How I did it
Updated code to be POSIX compatible

- How to verify it
root@sonic:/home/admin# sonic_installer install sonic-mellanox.bin

Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
2021-04-04 10:40:53 +03:00
lguohan
9fa5a6135c
[ci]: get build logs when build fails (#7219)
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-04-03 09:28:56 -07:00
abdosi
38258acda3
[submodule update] sonic-db-syncd (#7225)
df46ed418e661a9bccdb2639d8873def356f8ba0 (HEAD -> master, origin/master, origin/HEAD) Fix the LLDP_LOC_CHASSIS not getting populated if no remote neighbors are present (#39)
e487532e11cc0e97cfce573b6b997fdd0beeb660 [CI] Set up CI&PR with Azure Pipelines (#38)
3c9f488490a1dbded20dbf2d8a88a5ab4dbda8df Replace swsssdk's SonicV2Connector with swsscommon's implementation (#35)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
2021-04-03 07:36:11 -07:00