Commit Graph

3589 Commits

Author SHA1 Message Date
Samuel Angebault
6f4ef03b29
[arista] Update driver submodules (#5147)
- fix watchdog timeout units
- fix import path for thermal_manager
- remove arista bind mounts for docker-snmp
- improve arista bind mounts for pmon
2020-08-21 10:38:35 -07:00
Tamer Ahmed
90cbb4d78c
[hostcfgd] Handle Both Service And Timer Units (#5228)
Commit e484ae9dd introduced systemd .timer unit to hostcfgd.
However, when stopping service that has timer, there is possibility that
timer is not running and the service would not be stopped. This PR
address this situation by handling both .timer and .service units.

signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-08-21 09:51:41 -07:00
abdosi
1a805e7409
Fix unwanted python exception in syslog during database container (#5227)
startup when doing redis PING since database_config.json getting
generated from jinja2 template is still not ready.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
2020-08-21 07:33:19 -07:00
Kelly Chen
570dbf52f6
[iccpd] Fix uninitialized variable. (#5112)
To declare *tb[] but do not initialize it, it might be very risky. We get iccpd exception during processing arp/nd event. Initialize it to {0};
2020-08-21 00:27:04 -07:00
Sangita Maity
a273e56bc6
Add support to VS platform for platform.json and DPB CLI Tests (#5192)
- Reverts commit 457674c
- Creates "platform.json" for vs docker
- Adds test case for port breakout CLI
- Explicitly sets admin status of all the VS interfaces to down to be compatible with SWSS test cases, specifically vnet tests and sflow tests

Signed-off-by: Sangita Maity <sangitamaity0211@gmail.com>
2020-08-20 17:10:58 -07:00
abdosi
74d8b4a6be
[caclmgrd] Add support for multi-ASIC platforms (#5022)
* Support for Control Plane ACL's for Multi-asic Platforms.
Following changes were done:
 1) Moved from using blocking listen() on Config DB to the select() model
 via python-swsscommon since we have to wait on event from multiple
 config db's
 2) Since  python-swsscommon is not available on host added libswsscommon and python-swsscommon
    and dependent packages in the base image (host enviroment)
 3) Made iptables programmed in all namespace using ip netns exec

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>

* Address Review Comments

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>

* Fix Review Comments

* Fix Comments

* Added Change for Multi-asic to have iptables
rules to accept internal docker tcp/udp traffic
needed for syslog and redis-tcp connection.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>

* Fix Review Comments

* Added more comments on logic.

* Fixed all warning/errors reported by http://pep8online.com/
other than line > 80 characters.

* Fix Comment
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>

* Verified with swsscommon package. Fix issue for single asic platforms.

* Moved to new python package

* Address Review Comments.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>

* Address Review Comments.
2020-08-20 15:11:42 -07:00
judyjoseph
ba3f5ca094
Advance swss-common submodule. (#5222)
9a7c9d Dbconnector namespace support (#376)
c32f0b5 add state db entry for fgnhg route entry (#374)
2020-08-20 15:10:19 -07:00
Joe LeVeque
ce2c0781ab
[sonic-config-engine] Update .gitignore (#5223)
- Ignore directories generated by building Python wheel package
- Move all sonic-config-engine ignores from the root .gitignore to src/sonic-config-engine/.gitignore
2020-08-20 11:09:10 -07:00
Mahesh Maddikayala
fdea6fb439
[sonic-py-common][multi ASIC] API to get a list of frontend ports (#5221)
* [sonic-py-common][multi ASIC] utility to get a list of frontend ports from a given list of ports
2020-08-20 09:14:00 -07:00
Tamer Ahmed
e484ae9dda
[services] Fix Delay Start of SNMP And Telemetry (#5211)
SNMP and Telemetry services are not critical to switch startup.
They also cause fast-reboot not to meet timing requirements.
In order to delay start those service are associated with systemd
timer units, however when hostcfgd initiate service start, it start
the service and not the timer. This PR fixes this issue by
starting the timer associated with systemd unit.

signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-08-19 19:27:59 -07:00
Joe LeVeque
da69d57a8d
[redis-dump-load] Update submodule (#5215)
* src/redis-dump-load 832a645...7585497 (2):
  > Merge pull request #63 from jleveque/update_gitignore
  > Merge pull request #59 from breser/redis-load-empty
2020-08-19 11:23:42 -07:00
Tamer Ahmed
ec11308a66
[cfggen] Conform With Python 3 Syntax (#5154)
Preparing sonic-cfggen for migration to Python 3.

signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-08-19 09:29:40 -07:00
SuvarnaMeenakshi
f5746f3189
[submodule]: Advance sonic-snmpagent. (#5213)
Update sonic-snmpagent submodule to include below commits:
1a2b62a [Namespace]: Fix SAI_ID key used in cpfcIfTable and csqIfQosGroupStatsTable implementation (#138)
d06f00c [pytest/coverage]: add coverage support (#156)
90e9f2e [Namespace]: Simplify sync_d functions to use higher order (#154)
b5815d9 [LLDP]: Modify OID index of LLDPRemTableUpdater MIB (#155)
d5f2b92 [Multiasic]: Provide namespace support for ipNetToMediaPhysAddress (#129)
166c221 [Namespace]: Fix interface counters in RFC 1213 (#145)

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
2020-08-19 04:27:09 -07:00
Tamer Ahmed
f840013ed9
[cfggen] Allow Write To Redis DB With Template/Batch Mode (#5203)
Argument to write to config-db is not allowed when using template.
This PR allows cfggen to write to redis db when using template
mode.

signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-08-18 18:24:36 -07:00
Petro Bratash
52b349442d
[BFN] Add support pcied daemon for Montara and Newport (#5199)
Signed-off-by: Petro Bratash <petrox.bratash@intel.com>
2020-08-18 14:32:48 -07:00
judyjoseph
52fe7ae365
[sonic-py-common] Add interface utilities (#5113)
* Add sonic_interface.py in sonic-py-common for sonic interface utilities to keep this SONIC PREFIX naming convention in one place in py-common and all modules/applications use the functions defined here.
2020-08-18 10:20:26 -07:00
arlakshm
4487abdfcb
Fix to prevent classification all portchannels is External (#5202)
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
Fix the checks in the API is_port_channel_internal
2020-08-17 17:22:30 -07:00
Tamer Ahmed
adcca53b8d
[radv] Reduce Calls to SONiC Cfggen (#5178)
Calls to sonic-cfggen is CPU expensive. This PR reduces calls to
sonic-cfggen to one call during startup when starting radv service.

singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-08-17 15:48:04 -07:00
Tamer Ahmed
89f3206a3f
[swss] Reduce Calls to SONiC Cfggen (#5177)
Calls to sonic-cfggen is CPU expensive. This PR reduces calls to
sonic-cfggen to one call during startup when starting swss service.

singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-08-17 15:47:52 -07:00
Tamer Ahmed
a10c5bfd02
[frr] Reduce Calls to SONiC Cfggen (#5176)
Calls to sonic-cfggen is CPU expensive. This PR reduces calls to
sonic-cfggen to two calls during startup when starting frr service.

singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-08-17 15:47:42 -07:00
Tamer Ahmed
3a10e9c6fa
[dhcp-relay] Reduce Calls to SONiC Cfggen (#5175)
Calls to sonic-cfggen is CPU expensive. This PR reduces calls to
sonic-cfggen to one call during startup when starting dhcp-relay
service.

singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-08-17 15:47:14 -07:00
Tamer Ahmed
dfc0617283
[interfaces] Reduce Calls to SONiC Cfggen (#5174)
Calls to sonic-cfggen is CPU expensive. This PR reduces calls to
sonic-cfggen to one call during startup when running interfaces-
config.

singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-08-17 15:46:52 -07:00
Tamer Ahmed
cc970627d0
[snmp]: Reduce Calls to SONiC Cfggen (#5166)
Calls to sonic-cfggen is CPU expensive. This PR reduces calls to
sonic-cfggen to once calle during snmp startup

singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-08-17 15:46:29 -07:00
Joe LeVeque
d370ba7ca2
[build] Clean up any .pc/ directories left by quilt (#5196)
`quilt` may leave behind a `.pc/` directory, which will show up in `git status`. Delete it if it is present as part of cleaning up after `quilt` operations.
2020-08-16 11:40:21 -07:00
Joe LeVeque
fa4af0d372
[sonic-config-engine] Ensure all test output files are ignored (#5197)
Also align the naming and cleanup of generated output files in test_cfggen.py with the rest of the tests.
2020-08-15 23:09:11 -07:00
Joe LeVeque
547f0a6895
[redis-dump-load] Add dpkg cache dependency file for Python 3 package (#5195)
Add dpkg cache dependency file for Python 3 redis-dump-load wheel package to enable caching
2020-08-15 16:36:34 -07:00
Praveen Chaudhary
32539a1bda
[sonic-vlan.yang]: Correct Pattern for VLAN. (#5165)
Changes:
-- Correct Pattern for VLAN.
-- Add Special Test support.
-- Add first special test to load VLAN 1-4094.
-- Add lanes in ports.
-- Make Sure None test gets no output from libyang while config load.

[yangModelTesting.py]: INCORRECT VLAN_NAME FIELD IN VLAN TABLE test.

Signed-off-by: Praveen Chaudhary pchaudhary@linkedin.com
2020-08-15 12:38:15 -07:00
Joe LeVeque
df11f17843
[sonic-platform-daemons] Update submodule (#5190)
src/sonic-platform-daemons 0231b49...80661c7 (1):
Update .gitignore file (#86)
2020-08-15 12:34:43 -07:00
Vaibhav Hemant Dixit
9fdbaf0196
BGP Service script path and error fix (#5183)
* BGP service script path update and error fix

Co-authored-by: Vaibhav Hemant Dixit <vadixit@microsoft.com>
2020-08-15 12:09:10 -07:00
Vaibhav Hemant Dixit
b193af2d7f
Make RADV service script executable (#5186)
Co-authored-by: Vaibhav Hemant Dixit <vadixit@microsoft.com>
2020-08-15 12:08:09 -07:00
Joe LeVeque
6132ae34fe
[build] Build/install remaining platform daemons as Python wheel packages (#5188)
As part of migrating all Python-based package installers to wheel format rather than Debian packages. Also to allow for easily building a Python 3 version of the package in the near future. ledd and psud were converted in earlier PRs. This PR converts the remainder:

- pcied
- syseepromd
- thermalctld
- xcvrd
2020-08-15 08:42:11 -07:00
SuvarnaMeenakshi
8be30c4e10
[multi-asic]: Update port_config files for multi-asic vs image (#5121)
Modify port_config.ini files multi-asic vs platform. Changes done:
- Add new columns: index, asic_port_name, role(Int/Ext)
- Modify alias of interface names. Alias should match the interface names present in minigraph file.

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
2020-08-14 18:54:44 -07:00
Stephen Sun
5c02078118
[submodule] Advance submodule head for sonic-utilities (#5184)
[db_migrator] Support migrating database regarding buffer configuration for all Mellanox switches (#993)
    [show/vlan]: fix show vlan config (#1050)
    [PFCWD] Fix issue with "pfcwd show stats" command during SONiC init (#1018)
    [config] Eliminate port breakout-related globals (#1045)
    [teamshow]: refactor teamshow to use state db information (#1049)
    [watermarkstat] Import print_function from __future__ (#1048)
    [show]: split show interfaces commands into separate file (#1044)
    Python 3 compliance (#1043)
    Update all references to new 'sonic-installer' file name (#1033)
    [config/show]: split vlan into separate file (#1038)
    [pytest/coverage]: add coverage for all scripts (#1041)
    enable watchdog before running platform specific reboot plugin (#1037)
    [tests]:add coverage for config/main/utilities_common module (#1039)
    [cli/feature]: split feature command into a separate file (#1034)

Signed-off-by: Stephen Sun <stephens@nvidia.com>

Co-authored-by: Stephen Sun <stephens@mellanox.com>
2020-08-14 11:14:35 -07:00
Joe LeVeque
c3202d8982
[build] Build/install sonic-psud as a Python wheel package (#5182)
As part of migrating all Python-based package installers to wheel format rather than Debian packages. Also to allow for easily building a Python 3 version of the package in the near future.
2020-08-14 11:11:45 -07:00
arlakshm
6c895513ac
Common functions for Multi ASIC (#4973)
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan arlakshm@microsoft.com

The following common APIs are added for multi ASIC
- an  API to check if a given port is a internal or external port
- an  API to check if a given port-channel is internal or external
- an API to check if a bgp-session is internal or external
- an  API to connect to the config and other dbs in the a given namespace
- added common APIs to the sonic_py_common library.
- update the sample port-config.ini with role column and add corresponding test to verify the ports configuration is - generated properly.
2020-08-14 07:36:00 -07:00
Kebo Liu
bf3c901c6c
[Mellanox] Update the sfp platform API to get the ext_specification_compliance with new way (#5123)
Update the platform API implementation with calling dedicated parse function which defined in the platform-common as defined by https://github.com/Azure/sonic-platform-common/pull/112
2020-08-13 19:17:01 -07:00
Joe LeVeque
893d0d8638
[sonic-platform-common] Update submodule (#5173)
* src/sonic-platform-common f3f3573...433dd1a (1):
  > Parse 'Extended Specification compliance' as independent field (#112)
2020-08-13 19:15:40 -07:00
abdosi
c98734c63c
[sonic-buildimage] Fix debug docker run instruction. (#5151)
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
2020-08-13 13:30:48 -07:00
Prince Sunny
3fee094760
Enable restapi, update sonic-restapi (#5169)
* Enable restapi if included in image
* [Submodule update] sonic-restapi
2020-08-13 11:29:49 -07:00
Joe LeVeque
fc9e97fc3d
[build] Build/install sonic-ledd as a Python wheel package (#5168)
As part of migrating all Python-based package installers to wheel format rather than Debian packages. Also to allow for easily building a Python 3 version of the package in the near future.

- Also remove some references to sonic-daemon-base which I previously missed and add missing sonic-py-common dependency for sonic-pcied.
2020-08-13 11:26:43 -07:00
jostar-yang
e87de49ecb
[as9716-32d] Add to support lpmode for sfputil (#5171)
Implement code to set/get lpmode for as9716-32d platform
2020-08-13 11:19:14 -07:00
Roy Lee
6f9acee89b
[device][as7816-64x] Update fan speed reading. (#5102)
Original converting from register is wrong, it makes the fan speed much higher than it is. Change the way fan speed is calculated from CPLD.

Signed-off-by: roy_lee <roy_lee@accton.com>
2020-08-13 10:50:31 -07:00
Stephen Sun
54fcdbb380
Support single ingress pool for MSFT SKUs and optimize headroom calculation (#4686)
Calculate pool size in t1 as 24 * downlink port + 8 * uplink port

- Take both port and peer MTU into account when calculating headroom
- Worst case factor is decreased to 50%
- Mellanox-SN2700-C28D8 t0, assume 48 * 50G/5m + 8 * 100G/40m ports
- Mellanox-SN2700 (C32)
  - t0: 16 * 100G/5m + 16 * 100G/40m
  - t1: 16 * 100G/40m + 16 * 100G/300m

Signed-off-by: Stephen Sun <stephens@mellanox.com>

Co-authored-by: Stephen Sun <stephens@mellanox.com>
2020-08-13 13:12:09 +03:00
shi-su
a974611fbb
[sonic-sairedis] Update submodule (#5156) 2020-08-12 19:49:10 -07:00
jostar-yang
9c22d19b76
[as5835-54x] Modify qsfp port reset to normal state (#5161)
HW set qsfp port to reset at default. so need SW to set to normal when boot.

1. Modify cpld driver to invert reset offset value
2. Set to normal when boot.
2020-08-12 16:18:31 -07:00
Tamer Ahmed
f9edf6e5cc
[cfggen] Extend Template Argument to Support Batch Mode (#4941)
Calls to cfggen take considerable time. With batch mode, we will have the ability
to reduce number of calls from services.

Example of the batch mode command:
sonic-cfggen -t template-1.j2 -t template-2.j2,config-db -t template-3.j2,config-db -t template-4.j2,file1 -t template-5.j2,file2 --write-to-db.

template-1.j2 will be rendered to stdout since it is missing the dest part. stdout is default
config-db is a special keyword that will inject the rendered template into internal data structure. The internal data structure gets written to redis-db with --write-to-db switch. In the case the user would like to write to a file named config-db, it could be given as /config-db or ./config-db

signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-08-12 15:13:06 -07:00
Petro Bratash
9f7a8d59a1
[sonic-platform-daemons] Update submodule (#5159)
- [pcied] Fix path to pcie.yaml in pcied daemon (#84) 
>  0231b49ae84cf18c3a8d0c855215c467f28d48d3

Signed-off-by: Petro Bratash <petrox.bratash@intel.com>
2020-08-12 12:01:35 -07:00
Qi Luo
74e99f185f
[build]: add build target for python3-swsscommon (#5141)
python3-swsscommon is newly added build target besides originally python2 version of swsscommon library. Add this target to buildimage rules so we could make target/debs/buster/python3-swsscommon_1.0.0_amd64.deb
2020-08-11 16:11:19 -07:00
Joe LeVeque
47a866ecbd
[sonic-platform-daemons] Update submodule (#5152)
* src/sonic-platform-daemons da3dfbb...7a30ae0 (1):
  > Python 3 compliance (#85)
2020-08-11 14:57:40 -07:00
SuvarnaMeenakshi
3d7b6faf91
[systemd-generator]: Remove creation of NUM_ASIC environment (#5122)
NUM_ASIC environment variable was added so that it could be used by other utilities.
This is not being used by any other utility or docker, hence removing the addition of NUM_ASIC environment variable.
Also, the environment variable was added by adding the variable value to /etc/environ file.
Upon each reboot, this file gets updated with the NUM_ASIC value but the existing value was not removed.
This causes multiple lines getting appended in /etc/environ file upon each reboot.

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
2020-08-11 13:58:20 -07:00