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>
Add a master switch so that the sync/async mode can be configured.
Example usage of the switch:
1. Configure mode while building an image
`make ENABLE_SYNCHRONOUS_MODE=y <target>`
2. Configure when the device is running
Change CONFIG_DB with `sonic-cfggen -a '{"DEVICE_METADATA":{"localhost": {"synchronous_mode": "enable"}}}' --write-to-db`
Restart swss with `systemctl restart swss`
**- 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
The first partition starting point was changed to be 1M as part of this
commit: 6ba2f97f1e. On systems that are misaligned before conversion
(partition start is the first sector), the relica partition that is
left in the first MB can cause problems in Aboot and result in corruption
of the filesystem on the new aligned partition.
Zeroing this old relica makes sure that there is nothing left of the old
partition lying around. There won't be any risk of having Aboot corrupt
the new filesystem because of the old relica.
Signed-off-by: Baptiste Covolato <baptiste@arista.com>
* 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)
**- Why I did it**
PR https://github.com/Azure/sonic-buildimage/pull/4599 introduced two bugs in the startup of the router advertiser container:
1. References to the `wait_for_intf.sh` script were changed to `wait_for_link.sh`, but the actual script was not renamed
2. The `ipv6_found` Jinja2 variable added to the supervisor config file goes out of scope before it is read.
**- How I did it**
1. Rename the `wait_for_intf.sh` script to `wait_for_link.sh`
2. Use the Jinja2 "namespace" construct to fix the scope issue
**- How to verify it**
Ensure all processes in the radv container start properly under the correct conditions (i.e., whether or not there is at least one VLAN with an IPv6 address assigned).
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>
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>
- 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>
* 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.
- Ignore directories generated by building Python wheel package
- Move all sonic-config-engine ignores from the root .gitignore to src/sonic-config-engine/.gitignore
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>
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.
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>
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>
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>
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>
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>
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>
`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.
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
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
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>
[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>
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.
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.