* 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.
[201911] support show ip(v6) bgp summary for multi asic platform (#1083)
Fix Bad-Cherry pick and compilation error.
Signed-off-by: Ubuntu <abdosi@abdosi-ubuntu-vm0.nwp1qucpfg5ejooejenqshkj3e.cx.internal.cloudapp.net>
Fix error when running 'show lldp table' or 'show lldp neighbor'
through SSH command. (#1067)
[201911]: Multi asic show interface support (#1070)
[counterpoll] Add new FC group for port buffer drop counters
(#1024)
[201911] show interface portchannel support for Multi ASIC
(#1071)
Fix a typo in mellanox_buffer_migrator (#1090)
Fix pfcwd stats crash with invalid queue name (#1077)
[PFCWD] Fix issue with "pfcwd show stats" command during SONiC init
(#1018)
enable watchdog before running platform specific reboot plugin
(#1037)
Add namespace of the process in the coredump filename. (#1091)
[portsorch] add buffer drop FC group
[bitmap_vnet] Fix VNET route priority issue (#1421)
[vnet] Maintain the reference count of the nexthop when creating a
vn… (#1414)
[intfsorch] Retrieve Port object before setting NAT zone on router
interfaces. (#1372)
Update the meta code to support DNAT Pool changes (#616)
[syncd] Fix notification on shutdown request (#637)
Advance the submodule head of SAI (#641)
Add new line in sai_meta_log_syncd fprintf call (#649)
Fix Warmboot Issue when upgraded Image SAI return Switch Internal
OID not accounted in previous image. (#654)
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
sonic_device_util.py has been deprecated in favor of the sonic-py-common package. All related functionality has been moved there.
This is a backport of https://github.com/Azure/sonic-buildimage/pull/5130 to the 201911 branch
Add watchdogutil to control the hw watchdog (#945)
[db_migrator] Support migrating database regarding buffer
configuration for all Mellanox switches (#1053)
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
* [201911] skip_thermalctld for VS platform as it is
not supported
root@vlab-01:/# supervisorctl status
dependent-startup EXITED Aug 18 06:22 AM
rsyslogd RUNNING pid 18, uptime 0:12:26
start EXITED Aug 18 06:22 AM
supervisor-proc-exit-listener RUNNING pid 13, uptime 0:12:27
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
* [201911] after PR #https://github.com/Azure/sonic-buildimage/pull/5204
this function is no more needed so cleaning up.
Signed-off-by: Abhishek Dosi <abdosi@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>
[sonic-swsss] Fix the issue of field "next_hop_ip" not getting updated
in state DB in ERSPAN Mirror (#1375)
[vlanmgr] Support Jumbo Frame By Default (#1393)
[fec] added logic that put port down before applying fec
onfiguration (#1399)
[fec] Get FEC mode when port is already admin down (#1403)
Refine getDbId() calling to fix build after swss-common change
(#1245)
Update the name from get_npu_device_id() -to get_asic_device_id() and move from device_info.py, to the new file multi_asic.py in sonic-py-common so that it references to the correct valid constants.
a) we should use get_platform() with new sonic_py-common package
b) In 201911 DB Connector is still using db id based constructor
as following PR https://github.com/Azure/sonic-buildimage/pull/4549
is not cherry-picked yet. So revert the change to use db is insatead of
db_name for now.
Signed-off-by: Abhishek Dosi <abdosi@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
Ignore IPv6 link-local and multicast entries as Vnet routes (#1401)
[201911]Handled both REDIRECT and REDIRECT_ACTION ACL rules in ACL (#1397)
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
As part of consolidating all common Python-based functionality into the new sonic-py-common package, this pull request:
1. Redirects all Python applications/scripts in sonic-buildimage repo which previously imported sonic_device_util or sonic_daemon_base to instead import sonic-py-common, which was added to the 201911 branch in https://github.com/Azure/sonic-buildimage/pull/5063
2. Replaces all calls to `sonic_device_util.get_platform_info()` to instead call `sonic_py_common.get_platform()` and removes any calls to `sonic_device_util.get_machine_info()` which are no longer necessary (i.e., those which were only used to pass the results to `sonic_device_util.get_platform_info()`.
3. Removes unused imports to the now-deprecated sonic-daemon-base package and sonic_device_util.py module
This is a step toward resolving https://github.com/Azure/sonic-buildimage/issues/4999
As part of this commit and previous commit ff6cb6c402
sonic-utilities submodule for 201911 has been updated to take following
changes:
Add support for QSFP-DD cables on 'show' command (#989)
[show] Fix for 'trunk' PortChannel reported as 'routed' port (#1002)
Enable HW watchdog before fast-reboot (#977)
[filter-fdb] Check VLAN Presence When Filter FDB (#957) (#975)
[filter-fdb] Fix For Vlan Defined With No CIDR (#976)
[show/config]: combine feature and container feature cli (#1015)
Applications running in the host OS can read the platform identifier from /host/machine.conf. When loading configuration, sonic-config-engine *needs* to read the platform identifier from machine.conf, as it it responsible for populating the value in Config DB.
When an application is running inside a Docker container, the machine.conf file is not accessible, as the /host directory is not mounted. So we need to retrieve the platform identifier from Config DB if get_platform() is called from inside a Docker
container. However, we can't simply check that we're running in a Docker container because the host OS of the SONiC virtual switch is running inside a Docker container. So I refactored `get_platform()` to:
1. Read from the `PLATFORM` environment variable if it exists (which is defined in a virtual switch Docker container)
2. Read from machine.conf if possible (works in the host OS of a standard SONiC image, critical for sonic-config-engine at boot)
3. Read the value from Config DB (needed for Docker containers running in SONiC, as machine.conf is not accessible to them)
- Also fix typo in daemon_base.py
- Also changes to align `get_hwsku()` with `get_platform()`
To clarify error messages in case the ip address for Loopback is already set. It doesn't make sense to call correct ip address as ambiguous in this case
Consolidate common SONiC Python-language functionality into one shared package (sonic-py-common) and eliminate duplicate code.
The package currently includes four modules:
- daemon_base
- device_info
- logger
- task_base
NOTE: This is a combination of all changes from https://github.com/Azure/sonic-buildimage/pull/5003, https://github.com/Azure/sonic-buildimage/pull/5049 and some changes from https://github.com/Azure/sonic-buildimage/pull/5043 backported to align with the 201911 branch. As part of the 201911 port, I am not installing the Python 3 package in the base image or in the VS container, because we do not have pip3 installed, and we do not intend to migrate to Python 3 in 201911.
Revert "Refine getDbId() calling to fix build after swss-common change (#1245)"
This shoudl fix VS build.
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
This is fix for compilation error also on 201911.
[schema]: Add a new table "NAT_DNAT_POOL_TABLE" to hold the DNAT Pool
entries.
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Update the meta code to support DNAT Pool changes (#616)
[syncd] Fix notification on shutdown request (#637)
Advance the submodule head of SAI (#641)
Signed-off-by: Stephen Sun <stephens@mellanox.com>
[201911] Update nat entries to use nat_type to support DNAT Pool
changes. (#1297)
[201911] Update nat entries to use nat_type to support DNAT Pool
changes. (#1297)
* [daemon_base] fix to not reregister signal handler
-src/sonic-daemon-base/sonic_daemon_base/daemon_base.py
Problem:
Currently all daemons inherit from daemon_base class, and for
signal handling functionality they register the signal_handler() by
overriding the siganl_handler() in daemon_base by their own
implmentation.
But some sonic_platform instances also can invoke the daemon_base
constructor while trying to instantiate the common utilities
for example
platform_chassis = sonic_platform.platform.Platform().get_chassis()
This will cause the re registration of signal_handler which will
cause base class signal_handler() to be invoked when the daemon
gets a signal, whereas their own signal_handler should have been
invoked.
Fix:
We only register the siganl_handler once, and if signal_handler has
been registered, not re register it.
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
* [daemon_base] fix to not reregister signal handler
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
This fix removes the requirement to have a NEIGHBOR_METADATA for dynamic peers. The change is made since it is not necessary for NEIGHBOR_METADATA entries be present for the dynamic neighbors
Point submodule to new 201911 branch of sonic-telemetry and update pointer to the current HEAD of the 201911 branch
* src/sonic-telemetry aaa9188...01b5365 (1):
> [testdata] Update SFP keys to align with new standard (#39)
following PR's :
Implement cbgpPeer2State in CiscoBgp4MIB (#119)
Fix index nodes in LLDP tables whose access right is not-accessible.
(#112)
Fix quagga/FRR parser on IPv6 BGP sessions (#122)
[lint] Fix some syntax errors or warnings (#127)
Update README.md: Add lgtm badges (#128)
[Multi-asic]: Support multi-asic platform (#126)
Simplify test code (#132)
[Multi-asic]: Namespace support for LLDP and Sensor tables (#131)
Fix undefined variable and warning message (#134)
Fix SNMP AgentX socket connection timeout when using
Namespace.get_all() (#140)
[Namespace] Fix interfaces counters in InterfacesMIB RFC 2863 (#141)
Fix LGTM reported alert of PR#141 (#142)
[sfp_base] Update return value documentation of channel-specific methods
(#98)
[SfpBase] Fix key name typo in docstring (#99)
[sfp] Tweak key names of some transceiver info fields (#97)
[sfputil] Make SfpUtilHelper.get_physical_to_logical noexcept as
in SfpUtilBase (#96)
Resubmitting the changes for (#4825) with fixes for sonic-bgpcdgd test failures
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
If some table with a list of tuples (interface name, ip prefix) has ip prefixes without a mask length, it will cause issues in SONiC. For example quagga and frr will treat ipv4 address without a mask, so "10.20.30.40" address will be treated as "10.0.0.0/8", which is dangerous.
The fix here is that when pfx_filter get a tuple (interface name, ip prefix), where the ip prefix doesn't have prefix mask length, add a mask by default: "/32 for ipv4 addresses, /128 for ipv6 addresses".
Co-authored-by: Pavel Shirshov <pavel.contrib@gmail.com>
* [systemd-generator]: Fix the code to make sure that dependencies
of host services are generated correctly for multi-asic platforms.
Add code to make sure that systemd timer files are also modified
to add the correct service dependency for multi-asic platforms.
Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
* [systemd-generator]: Minor fix, remove debug code and
remove unused variable.
* Update to sonic_cfggen and utilities to populate the (pci) device id in the "asic_id" field in the DEVICE_METADATA. This Id is parsed from the file "asic.conf" file in the device/<platform> dir. The format of entries are eg: for a 2 ASIC platform.
DEV_ID_ASIC_0=03:00.0
DEV_ID_ASIC_1=04:00.0
Going forward will use this device id as the asic instance ID passed to syncd/sai while doing create_switch. Current support is limited, supports only one TD2 platform.