When BGP routes are missing, DHCP packets get relayed over mgmt
interface. This results in dhcpmon alerting that DHCP packets are
not being relayed. This is PR include mgmt interface as uplink
device, and so, if DHCP packet gets relayed over mgmt interface,
regular dhcpmon alert will not be issues. Instead, dhcpmon will
check the mgmt interface counts and issue a separate alert regarding
packets travelling through mgmt network.
In addition, this PR includes the following enhancements:
1. Add SIGUSR1 handler that prints out current packet counts
2. Increase alert grace window to 3 minutes from currently 2 minutes
3. Time is now computed more accurately
4. Print vlan name before counters
signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
When stopping the swss, pmon or bgp containers, log messages like the following can be seen:
```
Aug 23 22:50:43.789760 sonic-dut INFO swss#supervisord 2020-08-23 22:50:10,061 ERRO pool dependent-startup event buffer overflowed, discarding event 34
Aug 23 22:50:43.789760 sonic-dut INFO swss#supervisord 2020-08-23 22:50:10,063 ERRO pool dependent-startup event buffer overflowed, discarding event 35
Aug 23 22:50:43.789760 sonic-dut INFO swss#supervisord 2020-08-23 22:50:10,064 ERRO pool dependent-startup event buffer overflowed, discarding event 36
Aug 23 22:50:43.789760 sonic-dut INFO swss#supervisord 2020-08-23 22:50:10,066 ERRO pool dependent-startup event buffer overflowed, discarding event 37
```
This is due to the number of programs in the container managed by supervisor, all generating events at the same time. The default event queue buffer size in supervisor is 10. This patch increases that value in all containers in order to eliminate these errors. As more programs are added to the containers, we may need to further adjust these values. I increased all buffer sizes to 25 except for containers with more programs or templated supervisor.conf files which allow for a variable number of programs. In these cases I increased the buffer size to 50. One final exception is the swss container, where the buffer fills up to ~50, so I increased this buffer to 100.
Resolves https://github.com/Azure/sonic-buildimage/issues/5241
* [sonic-utilities]update submodule with fix
This PR addresses fixes in sonic-py-common to imitate the behavior inside
sonic-cfggen. Essentially this is a fix for accessing the port-config file.
First check if there is a platform.json file for config generation
and then for legacy port_config.ini.
Also updating the sub-module sonic-utilities.
Fix pfcwd stats crash with invalid queue name (#1077)
[show][bgp]Display the Total number of neighbors in the show ip bgp(v6) summary. (#1079)
[config] Update SONiC Environment Vars When Loading Minigraph (#1073)
Multi asic platform changes for interface, portchannel commands (#878)
Update Command-Reference.md (#1075)
[filter-fdb] Fix Filter FDB With IPv6 Present in Config DB (#1059)
[config] Remove _get_breakout_cfg_file_name helper function (#1069)
[SHOW][BGP] support show ip(v6) bgp summary for multi asic platform (#1064)
[fanshow] Display other fan status, such as Updating (#1014)
Add ip_prefix len based on proxy_arp status (#1046)
Enable the platform specific ssd firmware upgrade during reboot (#954)
[show][cli[show interface portchannel support for Multi ASIC (#1005)
support show interface commands for multi ASIC platforms (#1006)
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
[schema] Make schema header support C project (#373)
Removed DB specific get api's from Selectable class (#378)
With the change as part of #378 caclmgrd need to be updated
to use new client side Get API to access namespace.
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Remove radvd Makefile and patch, change docker-router-advertiser Dockerfile template to simply install the vanilla radvd package using apt-get.
- In PR https://github.com/Azure/sonic-buildimage/pull/2795, we started building radvd from source and patching it to prevent it from erroring out when advertising an MTU of 9100 which was greater than the MTU size configured on the bridge interface (1500), which was due to a limitation in the 4.9 Linux kernel.
- Master branch is now using Linux kernel 4.19. As of 4.18, the kernel supports setting a bridge MTU to a value > 1500.
- PR https://github.com/Azure/sonic-swss/pull/1393 modified vlanmgrd to take advantage of this and now configures the MTU of bridge interfaces in SONiC to the proper size of 9100. Therefore, we no longer need to patch radvd. Since we no longer need to patch radvd, we no longer need to build it from source, so we can save build time by going back to simply installing the vanilla radvd Debian package in the router-advertiser container.
The cmd "mclagdctl dump state" would goes wrong when there are two or more mclag_groups configured. The field "MCLAG Interface" can not be displayed in some group.
Signed-off-by: Sun Dandan <sundandan@asterfusion.com>
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
The following changes are done.
- Multi asic platform have 2 Loopback interfaces, Loopback0 and Loopback4096. IPinIP decap entries need to be added for both of them. Update the ipinip.json.j2 template to add decap entries for Loopback4096.
- Add corressponding unit test
Update the patform daemons with new commits
commit e9628b6b5a4683c7366fc99ee19ce727546fbabb
Merge pull request #64 from judyjoseph/multi_asic_ledd_xcvr
* platform daemon (Xcvrd, Ledd) changes for multi asic platform
* Updates in ledd daemon to use namespaces and get the namespace from selector object.
* Updates to xcvrd daemon to use the asic_id in talking to the right DB.
* Updated based on new sonic-py-common API's
* Invoke initializeGlobalConfig() in the SfpUpdate/DomInfoUpdate processes as well.
commit 415b8c457625c514aff0f8ecbdbbb655414d8067
[thermalctld] Optimize the thermal policy loop to make it execute every 60 seconds (#77)
commit 3d1f3196fd9c9942134e4926de7d248743e9589d
Update FAN_INFO in psud to avoid inconsistant output of show platform psud and show platform fan (#81)
Updating platform-common submodule with these commits
commit 14c6e53ecb861e124e2b45a7b65875ffac1b949e
[sff8472.py] Make hex keys all lowercase (#115)
Alpha chars in hex-based keys should be lowercase
commit b60f46cd1fb0ced1ffbff382e0125517f8c74b9e
Sfputil base and helper class changes for multi-ASIC (#100)
* Sfputil base and helper class changes for multi-ASIC
> adding the logical interface to asic id mapping
* Updated based on new sonic-py-common API's.
This PR enables cfggen to readr/write from Redis DB using pipelines.
Pipelines enables batch read/write from/to Redis DB.
signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
Change:
c25d492 Merge pull request #83 from tahmed-dev/taahme/add-redis-pipeline-operation
198d143 review comments - part of [configdb] Add Ability to Query/Update Redis Using Pipelines
994851c review comments - part of [configdb] Add Ability to Query/Update Redis Using Pipelines
2d2b7e1 making lgtm happy - part of [configdb] Add Ability to Query/Update Redis Using Pipelines
fa9093c [configdb] Add Ability to Query/Update Redis Using Pipelines
signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
**- Why I did it**
To install the framework for adding unit tests to the sonic-py-common package and report coverage.
** How I did it **
- Incorporate pytest and pytest-cov into sonic-py-common package build
- Updgrade version of 'mock' installed to version 3.0.5, the last version which supports Python 2. This fixes a bug where the file object returned from `mock_open()` was not iterable (see https://bugs.python.org/issue32933)
- Add support for Python 3 setuptools and pytest in sonic-slave-buster environment
- Add tests for `device_info.get_machine_info()` and `device_info.get_platform()` functions
- Also add a .gitignore in the root of the sonic-py-common directory, move all related ignores from main .gitignore file, and add ignores for files and dirs generated by pytest-cov
* src/sonic-swss d2bab10...c4949a2 (34):
> [dvs] Add new common issues and TOC to DVS README (#1405)
> Avoid adding loopback interface (ip link add) when setting nat zone on loopback interface (#1411)
> [portsorch] add buffer drop FC group (#1368)
> [dvs/chassis] Bring up SONiC interfaces in virtual chassis (#1410)
> [chassis/dvs] Add support for virtual chassis to DVS testbed (#1345)
> [sonic-swsss] Fix the issue of field "next_hop_ip" not getting updated in state DB in ERSPAN Mirror (#1375)
> [intfmgr] Fix OA crash issue due to link local configurations (#1195)
> Fix the issue when persistent DVS is used to run pytest which has number of front-panel ports < 32 (#1373)
> [dvs] Refactor AsicDbValidator (#1402)
> [fec] Get FEC mode when port is already admin down (#1403)
> [fec] added logic that put port down before applying fec onfiguration (#1399)
> [dvs] Add performance test for adding and deleting routes (#1392)
> Ignore IPv6 link-local and multicast entries as Vnet routes (#1401)
> [vlanmgr] Support Jumbo Frame By Default (#1393)
> Fix log/syslog not being correct when last test fails for given module (#1395)
> Get initial speed from ASIC DB (#1390)
> [dvs] Add options to limit CPU usage (#1394)
> [intfsorch] Retrieve Port object before setting NAT zone on router interfaces. (#1372)
> [.gitignore] Ignore gearsyncd binary (#1381)
> Added Max Nexthopgroup/ECMP Count supported by device into State DB. (#1383)
> [dvs] Upload logs even if failure occurs during startup (#1389)
> [rates] fix issue with rates init (#1387)
> [dvs] Validate that SWSS is ready to receive input before starting tests (#1385)
> [dvs] Convert sflow and speed tests to use dvslib (#1382)
> [dvs_acl] Refactor and document dvs_acl library (#1378)
> [dvs] Fix install instructions in README (#1379)
> [dvs] Update README with new flags, options, and known issues (#1380)
> swss: gearsyncd should return 0 on exit (#1376)
> Remove 00-copp.config.json from swss debian package. (#1366)
> fix undefined var in rates lua scripts (#1365)
> [fdborch] Fixed Orchagent crash in FDB flush on port disable. (#1369)
> [tlm_teamd]: Try to add LAG again, when teamd is not ready first time (#1347)
> [vs] Incorporate python3 best practices into DVSLib (#1357)
> [dvs] Mark unstable tests as xfail (#1356)
- Why I did it
When SONiC is configured with the management framework and/or telemetry services, the applications running inside those containers need to access some functionality on the host system. The following is a non-exhaustive list of such functionality:
Image management
Configuration save and load
ZTP enable/disable and status
Show tech support
- How I did it
The host service is a Python process that listens for requests via D-Bus. It will then service those requests and send a response back to the requestor.
This PR only introduces the host service infrastructure. Applications that need access to the host services must add applets that will register on D-Bus endpoints to service the appropriate functionality.
- How to verify it
- Description for the changelog
Add SONiC Host Service for container to execute select commands in host
Signed-off-by: Nirenjan Krishnan <Nirenjan.Krishnan@dell.com>
* src/sonic-utilities d5fdd74...17fb378 (7):
> [sonic-installer] Import re module (#1061)
> [fast-reboot]: Fix fail to execute fast-reboot problem (#1047)
> [config] Reduce Calls to SONiC Cfggen (#1052)
> [filter-fdb] Call Filter FDB Main From Within Test Code (#1051)
> [sflow_test.py]: Fix show sflow display. (#1054)
> Change fast-reboot script to use swss and radv service script (#1036)
> Common functions for show CLI support on multi ASIC (#999)
- Ignore directories generated by building Python wheel package
- Move all sonic-config-engine ignores from the root .gitignore to src/sonic-config-engine/.gitignore
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>
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>
* 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.
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
[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>
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.
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>
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>
* Bring up FPGA ports and test it
* Bring up those ports in neighbors dict
* Revert delete of a line
* Add test
* change code comment
* Change test name
* Revert submodule update