Commit Graph

4352 Commits

Author SHA1 Message Date
lguohan
1c00145813
[ci]: cleanup fsroot reliably (#6431)
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-01-13 10:30:49 -08:00
Vaibhav Hemant Dixit
8b4b146760
[sonic-swss-common] Advance swss-common head to include General Protection error fix (#6436)
To include Kernel GP fault seen in *syncd processes:
Azure/sonic-swss-common#444
2021-01-13 10:18:17 -08:00
Junchao-Mellanox
0a49edb68e
[Mellanox] Fix issue: need import initialize_sdk_handle in get_sdk_handle (#6435)
Found test_sfp.py failed due to use a method without importing it.
2021-01-13 09:42:04 -08:00
Samuel Angebault
68e9b83f3e
Update swi-tools in buster Dockerfile (#6414)
Fixed swi-tools code to work with `python3`
Updated the version of swi-tools downloaded by the `sonic-slave-buster/Dockerfile.j2`
Other Dockerfiles still use the `python2` version, though swi-tools is not used within the stretch builder.
2021-01-13 08:32:22 -08:00
Vadym Hlushko
b56320ce56
[SN4410] fixed 'port_config.ini' (#6316)
Signed-off-by: Vadym Hlushko <vadymh@nvidia.com>
2021-01-13 15:45:05 +02:00
xumia
1dcab4d1e3
Fix py3 version changed even version control enabled issue (#6422)
* Fix py3 version changed even version control enabled issue

* Add some comments and simplify the script

* Add the comment to explain how to get the not hooked command
2021-01-13 18:40:39 +08:00
dflynn-Nokia
674fac21c1
[Nokia ixs7215] Add SW assist for platform entropy & fix inband mgmt support (#6417)
- Improve random number generation during early Sonic initialization by providing SW updates to Linux entropy value.
- Improve handling of platform In-Band management port

This commit provides the following updates to the Nokia ixs7215 platform

1. The Marvell Armada-38x SOC requires SW assistance to improve the system
   entropy value available early on in the Sonic boot sequence.
2. The Nokia ixs7215 platform does not have a dedicated Out-Of-Band (OOB) mgmt
   port and thus requires additional logic to optionally support configuring
   front panel port 48 as an In-Band mgmt port. This commit provides additional
   logic to manage and maintain the operation of this In-Band mgmt port.
2021-01-12 16:59:42 -08:00
carl-nokia
380edf054d
[Platform][nokia]: python3-smbus package add with python3 and jinja fixes (#6416)
fix platform driver breakage due to python3 upgrade and fix load minigraph errors with config load_minigraph -y

**- How I did it**
added python3-smbus to the pmon docker template since the previous was python2 specific 
fixed additional "ord" python2 specific code 
fixed the jinja templates used by qos reload - the template logic required data to be parsed 

**- How to verify it**
run "show platform XXX" commands and verify output
run "sudo config load_minigraph -y" and verify configuration 
run "show interfaces XXX" and verify output 

Co-authored-by: Carl Keene <keene@nokia.com>
2021-01-12 15:05:06 -08:00
guxianghong
d4f9fa56aa
[Centec] upgrade to buster docker for DOCKER_SYNCD_CENTEC_RPC, docker-saiserver-centec and platform-modules (#6423)
Centec syncd have beend upgraded to buster, docker-syncd-centec-rpc do not need generate stretch based docker.

Co-authored-by: Xianghong Gu <xgu@centecnetworks.com>
2021-01-12 12:36:10 -08:00
Kebo Liu
015b421e5e
[Mellanox] [platform API] Fix “local variable 'label_port' referenced before assignment” error (#6419)
In rare case can see that xcvrd failed due to "UnboundLocalError: local variable 'label_port' referenced before assignment"

Init "label_port" as None at the beginning of the function, to avoid the case that "label_port" not assigned.
2021-01-12 10:43:57 -08:00
jostar-yang
bbd6967c82
[as7326-54x] Remove not need executable flag (#6326)
Remove executable bit from the service files
2021-01-12 10:40:51 -08:00
gechiang
26fd52780d
Anchor the libprotobuf-dev version based on a fixed version by using debian control dependency (#6420) 2021-01-12 09:51:15 -08:00
Lawrence Lee
6e63ecfa1d
[minigraph.py]: Force /32 prefix for mux cable server IPv4 loopbacks (#6418)
Server IPv4 loopbacks do not always arrive with /32 prefix, which is a requirement for the MUX_CABLE table in config DB

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
2021-01-12 06:04:48 -08:00
Qi Luo
8b82408ba4
[sonic-slave]: Upgrade python lxml library version to 4.6.2 (#6404) 2021-01-12 06:03:59 -08:00
lguohan
ab2ae41212
[build]: fix dpkg admindir corruption issue in parallel build (#6408)
Fix #119

when parallel build is enable, multiple dpkg-buildpackage
instances are running at the same time. /var/lib/dpkg is shared
by all instances and the /var/lib/dpkg/updates could be corrupted
and cause the build failure.

the fix is to use overlay fs to mount separate /var/lib/dpkg
for each dpkg-buildpackage instance so that they are not affecting
each other.

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-01-12 06:03:12 -08:00
lguohan
6ff8d2cb10
[ci]: add mellanox build to azure-pipeline (#6409)
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-01-12 06:01:59 -08:00
xumia
4ef3f1376f
[arista]: Fix web package md5 hash not correct issue (#6411)
Need to add the follow redirection option -L when downloading the package with redirection.
2021-01-11 10:33:08 -08:00
Lawrence Lee
3dd993e019
[minigraph.py]: Add peer switch hostname to device metadata (#6405)
To make the peer switch hostname easily accessible from config DB. Add peer_switch field to DEVICE_METADATA table

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
2021-01-11 10:18:39 -08:00
Ying Xie
281651510c
[utilities] advance utilities submodule head (#6402)
- (HEAD, github/master) [storyteller] adding a grep wrapper with predefined scenarios (#1349)
- Adding global-timeout, individual command timeout, log files collection (#1249)
- Add FW dump with new SAI implementation (#1338)
- [unit test][pfcwd] Fix tests that require sudo access (#1340)

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2021-01-11 08:13:04 -08:00
Ze Gan
c22575218a
[docker-macsec]: MACsec container and wpa_supplicant component (#5700)
The HLD about MACsec feature is at :

https://github.com/Azure/SONiC/blob/master/doc/macsec/MACsec_hld.md

- How to verify it
This PR doesn't set MACsec container automatically start, You should manually start the container by docker run docker-macsec
wpa_supplicant binary can be found at MACsec container.
This PR depends on the PR, WPA_SUPPLICANT, and The MACsec container will be set as automatically start by later PR.

Signed-off-by: zegan <zegan@microsoft.com>
2021-01-10 10:39:59 -08:00
Samuel Angebault
1498408ce7
[Arista] Update driver submodules (#6396)
- Cleanup and Refactor of library internals, logic mostly unchanged.
 - Enhance debugability with `arista dump` and `arista diag` commands.
 - Fix power supply detection issue.
2021-01-10 07:42:56 -08:00
guxianghong
c64052bb28
[Centec ARM64]Upgrade Centec syncd docker to buster and Enable Telemetry on ARM64 (#6386)
* Enable telemetry for ARM64 by default

* [Centec]Upgrade Centec syncd docker to buster; libjemalloc2 have been installed in docker-base-buster, remove libjemalloc1 from docker-syncd-centec's Dockerfile.j2

Co-authored-by: Gu Xianghong <xgu@centecnetworks.com>
2021-01-09 08:07:30 -08:00
dependabot[bot]
72b635083d
Bump lxml from 4.6.1 to 4.6.2 in /src/sonic-config-engine (#6385)
Bumps [lxml](https://github.com/lxml/lxml) from 4.6.1 to 4.6.2.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.6.1...lxml-4.6.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-08 15:47:29 -08:00
Qi Luo
5b7f88abf3
[sonic-swss-common] Update submodule (#6382)
Includes sonic-swss-common commits:
```
71dc350 2021-01-07 | Lower the log level for outdated key for SubscriberStateTable notification (#441) [Qi Luo]
7e40582 2021-01-08 | Add boost dependencies (#442) [Ze Gan]
30a8ddf 2021-01-05 | Change DBConnector::hgetall return type from map to unordered_map (#440) [Qi Luo]
021108d 2021-01-02 | MCLAG Enhancements per HLD https://github.com/Azure/SONiC/pull/596 (#405) [Praveen-Brcm]
54996fc 2021-01-02 | Implement ConfigDBConnector and ConfigDBPipeConnector in C++ (#437) [Qi Luo]
8286525 2020-12-27 | Simply refactor DBConnector hgetall() [Qi Luo]
6d1d33b 2020-12-27 | Fix RedisTransactioner: handle empty deque [Qi Luo]
624e0b8 2020-12-26 | Move complex class constructor as explicit, and fix several mistaken copy constructor usage [Qi Luo]
3b983f9 2020-12-30 | [ci]: add timeout to 180 minutes for arm build (#439) [lguohan]
f2e4210 2020-12-29 | Add utility for string and redis (#434) [Ze Gan]
7a885fd 2020-12-29 | [build]: add build check for arm64 and armhf (#436) [lguohan]
47bccc4 2020-12-24 | Add missed vector header to rediscommand.h (#435) [Ze Gan]
```
2021-01-08 14:13:25 -08:00
pavel-shirshov
83715cfc49
[bgpcfgd]: Support default action for "Allow prefix" feature (#6370)
* Use 20 and 30 route-map entries instead of 2 and 3 for TSA

* Added support for dynamic "Allow list" default action.

Co-authored-by: Pavel Shirshov <pavel.contrib@gmail.com>
2021-01-08 14:03:26 -08:00
yozhao101
04cd1d61e8
[Monit] Monitoring the running status of containers. (#6251)
**- Why I did it**
This PR aims to monitor the running status of each container. Currently the auto-restart feature was enabled. If a critical process exited unexpected, the container will be restarted. If the container was restarted 3 times during 20 minutes, then it will not run anymore unless we cleared the flag using the command `sudo systemctl reset-failed <container_name>` manually. 

**- How I did it**
We will employ Monit to monitor a script. This script will generate the expected running container list and compare it with the current running containers. If there are containers which were expected to run but were not running, then an alerting message will be written into syslog.

**- How to verify it**
I tested this feature on a lab device `str-a7050-acs-3` which has single ASIC and `str2-n3164-acs-3` which has a Multi-ASIC. First I manually stopped a container by running the command `sudo systemctl stop <container_name>`, then I checked whether there was an alerting message in the syslog.

Signed-off-by: Yong Zhao <yozhao@microsoft.com>
2021-01-07 19:52:22 -08:00
lguohan
fc3cb76dcf
[ci]: Set up CI with Azure Pipelines (#6384)
[skip ci]
2021-01-07 19:50:11 -08:00
Renuka Manavalan
dbc6718408
Take a copy of existing TACACS credentials and restore it during upgrade (#6285)
In scenario where upgrade gets config from minigraph, it could miss tacacs credentials as they are not in minigraph. Hence restore explicitly upon load-minigraph, if present.

- Why I did it
Upon boot, when config migration is required, the switch could load config from minigraph. The config-load from minigraph would wipe off TACACS key and disable login via TACACS, which would disable all remote user access. This change, would re-configure the TACACS if there is a saved copy available.

- How I did it
When config is loaded from minigraph, look for a TACACS credentials back up (tacacs.json) under /etc/sonic/old_config. If present, load the credentials into running config, before config-save is called.

- How to verify it
Remove /etc/sonic/config_db.json and do an image update. Upon reboot, w/o this change, you would not be able ssh in as remote user. You may login as admin and check out, "show tacacs" & "show aaa" to verify that tacacs-key is missing and login is not enabled for tacacs.
With this change applied, remove /etc/sonic/config_db.json, but save tacacs & aaa credentials as tacacs.json in /etc/sonic/. Upon reboot, you should see remote user access possible.
2021-01-07 16:45:38 -08:00
Joe LeVeque
e52581e919
[PDDF] Build and install Python 3 package (#6286)
- Make PDDF code compliant with both Python 2 and Python 3
- Align code with PEP8 standards using autopep8
- Build and install both Python 2 and Python 3 PDDF packages
2021-01-07 10:03:29 -08:00
Danny Allen
0ad2098402
[README] Update build badges to include 202012 build status (#6373)
Signed-off-by: Danny Allen <daall@microsoft.com>
2021-01-07 10:02:39 -08:00
Joe LeVeque
2d77a36658
[system-health] Make run_command() Python 3-compliant (#6371)
Pass universal_newlines=True parameter to subprocess.Popen(); no longer use .encode('utf-8') on resulting stdout.
This was missed in #5886

Note: I would prefer to use text=True instead of universal_newlines=True, as the former is an alias only available in Python 3 and is more understandable than the latter. However, Even though the setup.py file for this package only specifies Python 3, the LGTM tool finds other Python 2 code in the repo and validates the code as Python 2 code and alerts that text=True is an invalid parameter. Will stick with universal_newlines=True for now. Once all Python code in the repo has been converted to Python 3, I will change all universal_newlines=True to text=True.
2021-01-07 05:48:13 -08:00
gechiang
a6907a7c62
[brcm]: BRCM SAI 4.2.1.5-9 Fix _brcm_sai_indexed_data_get () with unexpected queue causing _brcm_sai_switch_assert () after warm reboot (#6374)
Starting from build (master) 176 the warm reboot on BRCM Platform started to experience syncd crash. Upon further debug by Ying it was determined that the crash was related to the following new change:
[Dynamic buffer calc] Support dynamic buffer calculation (#1338)

Ying also debugged further and found The crash was caused by buffer pool profile setting operation SAI_BUFFER_PROFILE_ATTR_SHARED_DYNAMIC_TH

A case has filed with BRCM while a potential fix was tried by Ying that seems to have addressed this issue and we are making this change available in master branch so that it will allow further feature validation/testing especially in the warm reboot area.
Once an official fix is provided by BRCM, we will then remove this in house fix and apply the official fix.

- How to verify it
Just perform warm reboot with any master code 175 or above you should see this issue or issue the following cmd will also cause the crash: "mmuconfig -p egress_lossy_profile -a 0"
2021-01-07 05:46:48 -08:00
abdosi
afc87b8ccd
Updated imfile configuration for supervisord logs (#6368)
Updated imfile configuration for supervisord logs for stretch and buster.
2021-01-06 18:47:36 -08:00
carl-nokia
f99dbff722
[Nokia]: Enable Telemetry for armhf and provide required qos files (#6364)
* [platform][Nokia]: Add buffers and qos files for config qos reload

   - providing required files

* [platform][armhf]: remove hardcoded disable for Telemetry on armhf

Co-authored-by: Carl Keene <keene@nokia.com>
2021-01-06 15:09:13 -08:00
Joe LeVeque
a013b8c247
[sonic-platform-common][sonic-platform-daemons] Update submodules (#6352)
src/sonic-platform-common 9935fca...8664efc (2):

Make sonic_sfp Python2 and Python3 compatible (#157)
[sffbase.py] Fix to make Python 3-compatible (#156)

src/sonic-platform-daemons e6c786b...81318f7 (1):

[psud] Fix issue where PSU Fan info is not updated in State DB (#137)

Fixes #6341
2021-01-06 14:47:30 -08:00
sudhanshukumar22
8a3ac8ff9c
[docker-lldp]: sonic advertise meaningful SysDescription instead of debian (#6114)
Sonic devices advertise meaningful system description along with Debian package information.

before the fix:

-------------
admin@sonic:~$ show lldp neighbors
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface: Ethernet0, via: LLDP, RID: 3, Time: 0 day, 16:36:30
SysName: sonic
SysDescr: Debian GNU/Linux 9 (stretch) Linux 4.9.0-11-2-amd64 #1 SMP Debian 4.9.189-3+deb9u2 (2019-11-11) x86_64
-------------------------------------------------------------------------------

After the fix:

root@sonic:~# show lldp neighbors Ethernet16
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface:    Ethernet16, via: LLDP, RID: 10, Time: 0 day, 00:01:00
    SysName:      sonic
    SysDescr:     SONiC Software Version: SONiC.sonic_upstream_1.0_daily_201130_1501_62-dirty-20201130.203529 - HwSku: Accton-AS7816-64X - Distribution: Debian 10.6 - Kernel: 4.19.0-9-2-amd64
-------------------------------------------------------------------------------

Signed-off-by: sudhanshukumar22 <sudhanshu.kumar@broadcom.com>
2021-01-06 12:24:57 -08:00
Aravind Mani
4632e0b5b1
DellEMC: Z9332f change SFP detection logic (#6261)
- Dynamically change EEPROM driver based on media type.
- Otherwise, EEPROM INFO and DOM INFO might not be fetched properly and will result in erroneous output.
2021-01-06 11:12:04 -08:00
Ying Xie
78dae94e5e
[sairedis] advance sairedis submodule head (#6365)
To incldue following changes:

- [ci]: add build for arm64 and armhf (#757)
- Use template hgetall, because we will tune the return types of library functions (#759)
- [syncd] Fix bulk multi attrs for same key db update (#761)

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2021-01-06 06:14:25 -08:00
abdosi
afd60bdc48
[rsyslog]: Explicitly set the notify mode for rsyslog imfile module (#6351)
Enable the notify mode of rsyslogd imfile module used for supervisord
logs in docker container. 

Setup the mode="inotify" when loading imfile, made sure we are are getting 
supervisord logs in host immediately.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
2021-01-06 00:00:18 -08:00
Travis Van Duyn
d769ef2abd
[snmp]: updated to support snmp config from redis configdb (#6134)
**- Why I did it**
I'm updating the jinja2 template to support getting SNMP information from the redis configdb. 
I'm using the format approved here: 
https://github.com/Azure/SONiC/pull/718

This will pave the way for us to decrement using the snmp.yml in the future.  
Right now we will still be using both the snmp.yml and configdb to get variable information in order to create the snmpd.conf via the sonic-cfggen tool. 

**- How I did it**
I first updated the SNMP Schema in PR #718 to get that approved as a standardized format. 
Then I verified I could add snmp configs to the configdb using this standard schema.  Once the configs were added to the configdb then I updated the snmpd.conf.j2 file to support the updates via the configdb while still using the variables in the snmp.yml file in parallel.  This way we will have backward compatibility until we can fully migrate to the configdb only. 

By updating the snmpd.conf.j2 template and running the sonic-cfggen tool the snmpd.conf gets generated with using the values in both the configdb and snmp.yml file. 

Co-authored-by: trvanduy <trvanduy@microsoft.com>
2021-01-05 13:43:29 -08:00
Vaibhav Hemant Dixit
6fd78b6e3d
[determine-reboot-cause] Ignore non-hardware reboot cause (#6349)
- Why I did it - Reboot cause prints "Non-Hardware (N/A)" instead of showing the software reboot cause.
The issue is mishandling of hardware reboot cause in determine-reboot-cause script.

- How I did it
Fixed the handling for Non Hardware reboot cause. Ignore if Non-Hardware is present in the hardware_reboot_cause output. Added some code refactoring for simplicity.

- How to verify it - With fix, the hardware reboot cause is ignored (if it is non hw):
2021-01-05 10:47:42 -08:00
Junchao-Mellanox
4460076db1
[xcvrd] Remove dependency on SONIC_PLATFORM_API_PY2 and SONIC_PLATFORM_API_PY3 (#6344)
Remove the build time dependency on SONIC_PLATFORM_API_PY2 and SONIC_PLATFORM_API_PY3 from xcvrd make rule
2021-01-05 09:39:52 -08:00
Akhilesh Samineni
62e7c452d0
After first bootup, the FEATURE table is not present in CONFIG_DB (#5911)
Fix the After first bootup(onie-install), the FEATURE table is not present in CONFIG_DB. 
Fix is done by calling config reload.
2021-01-05 09:22:16 -08:00
xumia
95936805e0
Install the latest version of the sonic build hooks in slave container (#6348) 2021-01-05 19:05:13 +08:00
sudhanshukumar22
7fc2d381a9
[lldp] lldp upstream patches (#6118)
The details are as follows:

    1. 0010-Ported-fix-for-length-exceeded-from-lldp-community.patch

    Patch taken from 78243478dc

    lib: remove limit on system description length

    The limit was introduced in 9c49ced while fixing a memory leak.
    The state data is used to ensure we don't interleave operations. We
    need to handle the case where the value is truncated because it is
    larger than the allocated size.

    Fix issue https://github.com/lldpd/lldpd/issues/408

    2. 0011-fix-med-location-len.patch
    
    Patch taken from 5c3479463a

    lib: fix LLDP-MED location parsing in liblldpctl

    Some bounds were not checked correctly when parsing LLDP-MED civic
    location fields. This triggers out-of-bound reads (no write) in
    lldpcli, ultimately leading to a crash.

    Fix https://github.com/lldpd/lldpd/pull/420

Signed-off-by: sudhanshukumar22 <sudhanshu.kumar@broadcom.com>
2021-01-04 23:19:50 -08:00
lguohan
6fbd52b1c1
[docker-sonic-vs]: reduce the build steps for docker-sonic-vs (#6350)
combine multiple same operation into one operation to reduce
the build steps. this is to avoid max depth exceeded issue
in the build.

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-01-04 21:57:58 -08:00
Arun Saravanan Balachandran
19b2b44638
[DellEMC] Add platform-modules as prerequisite for determine-reboot-cause (#6322)
Add a systemd dependency to make platform-modules service as a prerequisite for determine-reboot-cause service to ensure platform initialization is complete before determine-reboot-cause.service executes.
2021-01-04 20:33:44 -08:00
sandycelestica
c38eee8294
Update udev rules to support 96 ttyUSB ports (#6334)
Signed-off-by: Jing Kan jika@microsoft.com
2021-01-05 10:26:05 +08:00
Myron Sosyak
9006b961b7
[BFN] Convert platform modules to python 3 (#6347)
Fix syntax errors during xcvrd start with Python 3 daemons
2021-01-04 15:00:48 -08:00
Sabareesh-Kumar-Anandan
d6b92da643
[libyang1] Adding LFS support for arm32 (#6346)
In the emulated armhf environment, the function readdir()returns NULL on a ext4 file system directory. When running the libyang1 test cases, it will require to load the plugins from the files (such as metadata.so), because the readdir() is failing, the plugins can’t be loaded in the emulated armhf environment, so it causes libyang1 test error. This error is a combination of the following reasons.
• Emulation of a 32-bit target from a 64-bit host –> qemu from x86_64 to armhf
• Glibc version > 2.27 – Debian buster is using glibc 2.28

- How I did it
Enabled large file support by setting _FILE_OFFSET_BITS=64 for libyang1.

Signed-off-by: Sabareesh Kumar Anandan <sanandan@marvell.com>
2021-01-04 12:28:32 -08:00