Commit Graph

7042 Commits

Author SHA1 Message Date
Lawrence Lee
5bb8c1a485
[PTF] Patch PTF library to use correct VXLAN module (#13155)
Why I did it
The current PTF library contains a typo - when building a VxLAN packet, it uses the VxLAN module directly from the scapy library which will cause test failures.

How I did it
Patch simple_vxlan_packet to use the VxLAN module wrapped/defined in packet.py from the PTF library.

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
2023-01-17 15:03:13 -08:00
Tomer Shalvi
2d2d9433b3
Moving multiprocessing.Manager to the correct sub-process (#13377)
Why I did it
There is a queue in sysmonitor.py that is created based on an object of multiprocessing.Manager.
After performing fast-reboot, system health monitor is being shut down, what causes this Manager to be shut down as well, since it is a child-process of healthd.
That's why I moved the creation of this Manager from the top of the file to the function Sysmonitor.system_service() (The only place it is used), to make Manager a child-process of Sysmonitor, instead of Healthd. This way both the queue (the Manager) and the processes that uses this queue will be child-processes of the same process, and the problematic scenario of sysmonitor sending messages to a dead queue will not be possible.

How I did it
Removed the definition of manager as global and moved it to system_service() function

How to verify it
Perform a fast reboot and verify the traceback issue is fixed
2023-01-17 08:43:49 -08:00
xumia
5e4a866e33
[Build] Support Debian snapshot mirror to improve build stability (#13097)
Why I did it
[Build] Support Debian snapshot mirror to improve build stability

It is to enhance the reproducible build, supports the Debian snapshot mirror. It guarantees all the docker images using the same Debian mirror snapshot and fixes the temporary build failure which is caused by remote Debain mirror indexes changed during the build. It is also to fix the version conflict issue caused by no fixed versions of some of the Debian packages.

How I did it
Add a new feature to support the Debian snapshot mirror.

How to verify it
2023-01-13 16:16:35 +08:00
bingwang-ms
22fcc760c4
[minigraph]: Support port name in ACL table AttachTo attribute (#13105)
Why I did it
This PR is to update minigraph.py to support both port alias and port name as input of AttachTo attribute of ACL table.
Before this change, only port alias is supported.

How I did it
Add a global variable to store port names
Search both port names and port alias wheh parsing the value of AttachTo.

How to verify it
Verified by a new unit test case test_minigraph_acl_attach_to_ports
Verified by copying the new minigraph.py to a testbed and run conflg load_minigraph.
2023-01-12 23:54:25 -08:00
Graham Hayes
e077b5362c
[Arista] Rely on automatic flash size detection for Raven (#13277)
Many of these switches have had flash upgraded beyond 2G however, in
boot0 both were assigned 2GB for legacy reasons.

Remove the hardcoding of the flash size and let boot0 autodetect the available space.

Signed-off-by: Graham Hayes <gr@ham.ie>

Signed-off-by: Graham Hayes <gr@ham.ie>
2023-01-12 23:52:40 -08:00
Ikki Zhu
4539035e90
[Seastone] Enhancement fix for PR12200 syseeprom issue (#13344)
Why I did it
[Seastone] Enhancement fix for PR12200 syseeprom issue.

How I did it
Enhance the fix through replace the hardcoded devnum to bash variable

How to verify it
show platform syseeprom or decode-syseeprom
2023-01-12 23:51:33 -08:00
kenneth-arista
06d55b8027
[device/arista] Disabled polled_irq_mode for DNX SKUs (#13349)
Disabled polled_irq_mode for all Arista DNX devices as this mode
leads to excessive use of the CPU via an unneeded interrupt
polling thread.
2023-01-12 23:48:37 -08:00
pettershao-ragilenetworks
bce4aa1412
[ragile] adapter for kernel 5.x (#10762)
Why I did it
Ragile adapter ra-b6510-32c ra-b6510-48v8c ra-b6910-64c ra-b6920-4s to kernel 5.x

Signed-off-by: “pettershao” pettershao@ragilenetworks.com
2023-01-12 18:01:47 -08:00
Dror Prital
d9c75b3fa2
[submodule] Advance sonic-utilities pointer (#13333)
Update sonic-utilities submodule pointer to include the following:
* fb8f98b Preserve copp tables through DB migration ([#2524](https://github.com/sonic-net/sonic-utilities/pull/2524))
* 4aa512c [sfputil] Firmware download/upgrade CLI support for QSFP-DD (#1947) ([#2349](https://github.com/sonic-net/sonic-utilities/pull/2349))
* f63ef9a Revert sonic-utilities: Update config reload() to verify formatting of an input file (#2529) ([#2586](https://github.com/sonic-net/sonic-utilities/pull/2586))
* 3a09ecb [masic] 'show interfaces counters' reminds to use '-d all' option to check for internal links ([#2466](https://github.com/sonic-net/sonic-utilities/pull/2466))
* 65cf00a [storyteller] add link prober state change to story teller ([#2585](https://github.com/sonic-net/sonic-utilities/pull/2585))

Signed-off-by: dprital <drorp@nvidia.com>
2023-01-12 10:46:34 +02:00
shdasari
97161aeadb
SONiC YANG model for RADIUS. (#12749)
#### Why I did it
Added SONiC YANG model for RADIUS. 
Fixes https://github.com/sonic-net/sonic-buildimage/issues/12477 

#### How I did it
Added the RADIUS and RADIUS_SERVER tables for global and per RADIUS server configuration. RADIUS statistics reside in COUNTERS_DB and are not part of the configuration. These are not a part of this PR.

#### How to verify it
Compiled sonic_yang_mgmt-1.0-py3-none-any.whl.

#### Description for the changelog
SONiC YANG model for RADIUS.
2023-01-11 16:42:24 -08:00
Prince Sunny
21e507e22b
[Dash] Fix a typo (#13325)
Fix a typo in yang for Dash
2023-01-11 11:24:47 -08:00
xumia
e6a01ca5eb
[Bug] Fix SONiC installation failure caused by pip/pip3 not found (#13284)
The main issue is the pip/pip3 command cannot be found when the package is being installed by apt-get.
When using the dpkg install, the searching path is PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
When using the apt-get install, the searching path is PATH=/usr/sbin:/usr/bin:/sbin:/bin
But the pip/pip3 default path is at /usr/local/bin, so dpkg works, but apt-get not work.

How I did it
Export the path /usr/local/bin for pip/pip3.
Make the deb packages can be installed by apt-get.
2023-01-11 08:54:24 -08:00
Kebo Liu
7873a9131d
[Mellanox] Skip the leftover hardware reboot cause in case of last boot is warm/fast reboot (#13246)
- Why I did it
In case of warm/fast reboot, the hardware reboot cause will NOT be cleared because CPLD will not be touched in this flow. To not confuse the reboot cause determine logic, the leftover hardware reboot cause shall be skipped by the platform API, platform API will return the 'REBOOT_CAUSE_NON_HARDWARE' instead of the "hardware" reboot cause.

- How I did it
Check the proc cmdline to see whether the last reboot is a warm or fast reboot, if yes skip checking the leftover hardware reboot cause.

- How to verify it
a. Manual test:
    - Perform a power loss
    - Perform a warm/fast reboot
    - Check the reboot cause should be "warm-reboot" or "fast-reboot" instead of "power loss"
b. Run reboot cause related regression test.

Signed-off-by: Kebo Liu <kebol@nvidia.com>
2023-01-11 16:50:46 +02:00
Liu Shilong
20f47bb5ac
Update docker-sonic-mgmt to buster (#13287)
Why I did it
docker-sonic-mgmt build is failing.

How I did it
stretch docker is disabled recently. Update docker-sonic-mgmt to buster.
Migrate from sonictest to sonicbld. Because Azure requires migrate vm from uswest2 to uswest3.
Fix a build issue when build image.
How to verify it
2023-01-11 16:00:47 +08:00
Nazarii Hnydyn
d7b2bdb996
[submodule] Advance sonic-swss-common pointer (#13321)
Update sonic-swss-common submodule pointer to include the following:

a4987b9 Change the dtor of ProducerStateTable to virtual method (#735)
7be565c [hash]: Add GH DB schema. (#733)

Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
2023-01-11 09:34:53 +02:00
Saikrishna Arcot
5c8aa8f5de
Update sonic-host-services submodule (#13307)
This is primarily to fix the armhf build failure due to deepdiff python
module getting updated.

1eb7a5b Pin deepdiff to version 6.2.2
ae09e3f [caclmgrd][dualtor] add iptables rule for dualtor gRPC to allow packets getting forwarded from loopback IP
00cb8cb [hostcfgd] Optimize the hostcfgs by moving the definition cmds into the loop to optimize the enable/disable service command run.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2023-01-10 15:47:22 -08:00
lixiaoyuner
bc7b35473e
Add k8s support feature set and Add platform label for scheduler usage (#12997)
Why I did it
We plan to pilot k8s feature, need to fix several bugs including enable telemetry feature and add platform label.

How I did it
Add support feature set, only enable telemetry container upgrade for now
Add platform label for scheduler usage
Remove CNI installation code, it would be auto installed when install kubeadm
How to verify it
After sonic device join k8s cluster, show node labels to check if platform label is visible.

Signed-off-by: Yun Li yunli1@microsoft.com
2023-01-10 07:56:44 -08:00
Hua Liu
ce88a38185
Fix code issue when SonicV2Connector.get() return None. (#13250)
Fix code issue when SonicV2Connector.get() return None.

#### Why I did it
When database key does not exist, SonicV2Connector.get() will return None.
Code will break if not check return value.

#### How I did it
Check SonicV2Connector.get() return value before use it.

#### How to verify it
Pass all E2E test case.
2023-01-09 11:37:43 -08:00
Liu Shilong
a5d71576db
[ci] Fix docker-sonic-slave pipeline template build options. (#13290)
Why I did it
docker-sonic-slave pipeline has a different tag with PR build.
It leads to ENABLE_DOCKER_BASE_PUll=y not work.

How I did it
set reproducible build option in bash.

How to verify it
2023-01-09 13:27:15 +08:00
Yutong Zhang
24758dfe0a
Improve the display of pipeline. (#13123)
The display of azure pipeline is not specific now, such as when the step Run test fails, the display of itself shows successful, but the display of step Kvmdump shows fails, but actually, the step Kvmdump doesn't fail. I improve the display of azure pipeline in this pr, each step has its own success or failure, and is shown in azure pipeline.

Why I did it
The display of azure pipeline is not specific now, such as when the step Run test fails, the display of itself shows successful, but the display of step Kvmdump shows fails, but actually, the step Kvmdump doesn't fail. I improve the display of azure pipeline in this pr, each step has its own success or failure, and is shown in azure pipeline.

How I did it
1. Each step has its own signature of success or failure.
2. Using the chain of responsibility pattern to manage all status.
3. Modify the expected-state in each step.
2023-01-09 10:10:17 +08:00
pettershao-ragilenetworks
3c9837b484
]pmon]: Import requests libraries for Ragile platform (#13171)
if there is no request, you need to use curl to get data from bmc, and each query needs to start a curl process. pmon is a circular query, which will pull up multiple processes in a loop, which consumes a lot. Using request does not need to pull up the process.
2023-01-07 21:12:13 -08:00
centecqianj
4b933bd566
[Centec arm64] Solve the abnormal console speed of centec-arm64 switch board (#13126)
The console of the centec-arm64 board is ttyAMA0.The current regular expression cannot be correctly parsed.

Signed-off-by: centecqianj <qianj@centec.com>
2023-01-07 21:10:03 -08:00
Guohan Lu
b195e47651
[github]: update codeowner from Azure teams to sonic-net teams (#13243)
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2023-01-07 21:07:20 -08:00
Dmytro Lytvynenko
95c148d83d
[platform-common] submodule update (#13269)
9df998bbec12083dd88104657d2fd8f67e217bc3 Don't read AUX_MON_TYPE if memory model is flat (#339)
2023-01-07 20:50:34 -08:00
Zain Budhwani
063495e953
[submodule]: update sonic-swss-common head (#13295)
9e1176d Zain Budhwani Fri Jan 6 09:00:11 2023 -0800 Refactor eventpublisher deinit (sonic-net/sonic-swss-common#734)
b9a9dbb Liu Shilong Thu Jan 5 10:12:49 2023 +0800 Simplify azure pipeline build template (sonic-net/sonic-swss-common#729)
01fc252 siqbal1986 Wed Jan 4 11:03:53 2023 -0800 Added customer monitoring tables in app db and state db (sonic-net/sonic-swss-common#725)
28dc42a Liu Shilong Wed Dec 28 11:19:32 2022 +0800 Fix sonic-slave docker image environment issue. (sonic-net/sonic-swss-common#727)
1d7607a Saikrishna Arcot Fri Dec 23 11:11:33 2022 -0800 Switch to using stock gcovr 5.2 (sonic-net/sonic-swss-common#726)
2023-01-07 20:40:05 -08:00
Guilt
19010a36ea
[build] Fix isc-dhcp full version in rules.mk (#13288)
During the build process, a dsc file is retrieved from the URL:
http://deb.debian.org/debian/pool/main/i/isc-dhcp/isc-dhcp_4.4.1-2.3.dsc

Depending on the DNS resolution, the server reached may respond with a
HTTP 404 error code, what stops the build process.
In all cases, the URL http://deb.debian.org/debian/pool/main/i/isc-dhcp/
no more lists this DSC file but one with a different format.

The suffix "+deb11u1" is now appended to identify the debian version.

- append this suffix to the make file rules of isc-dhcp

Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
2023-01-07 20:39:11 -08:00
abdosi
9ecd27ddbb
During build time mask only those feature/services that are disabled excplicitly (#13283)
What I did:
Fix : #13117

How I did:
During build time mask only those feature/services that are disabled explicitly. Some of the features ((eg: teamd/bgp/dhcp-relay/mux/etc..)) state is determine run-time so for those feature by default service will be up and running and then later hostcfgd will mask them if needed.

So Default behavior will be

init_cfg.json.j2 during build time make state as disabled then mask the service
init_cfg.json.j2 during build time make state as another jinja2 template render string than do no mask the service
init_cfg.json.j2 during build time make state as enabled then do not mask the service

How I verify:
Manual Verification.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
2023-01-07 02:36:37 +00:00
Saikrishna Arcot
2c02a76d4f
Revert incorrect submodule changes in #13056 (#13262)
Undo submodule updates that were incorrectly done in #13056.

Partial revert of d57de09

The following submodule changes are being reverted to the version that were present before the above PR got merged:

src/sonic-linux-kernel to 34f26b35839d7c0c09d48176c4ec33197344643c
src/sonic-frr/frr to 79188bf710e92acf42fb5b9b0a2e9593a5ee9b05

Signed-off-by: Saikrishna Arcot sarcot@microsoft.com
2023-01-06 16:33:04 -08:00
kellyyeh
2c410b4aaf
[dhcpmon] Fix dhcpmon socket filter and tx count issue (#13065)
Why I did it
Fix issue caused by dualtor support PR [dhcpmon] Open different socket for dual tor to enable interface filtering #11201
Improve code
How I did it
On single ToR, packets received count was duplicated due to socket filter set to "inbound"
Tx count not increasing due to filter set to "inbound". Added an outbound socket to count tx packets
Added vlan member interface mapping for Ethernet interface to vlan interface lookup in reference to PR Fix multiple vlan issue sonic-dhcp-relay#27
Exit when socket fails to initialize to allow dhcp_relay docker to restart
How to verify it
Tested on vstestbed single tor and dual tor, sent packets and verify printed out dhcpmon rx and tx counters is correct

Correct number of tx increases
Tx does not increase when ToR is on standby
2023-01-06 14:43:24 -08:00
Kebo Liu
9f36a9b6e5
[submodule] Advance sonic-utilities submodule pointer (#13113) 2023-01-06 07:56:49 +02:00
Richard.Yu
689f7d2c43
[SAI-PTF][BFN]Enable saiserver test container on bfn container (#13166)
Why I did it
Enable Test sai api on bfn container with a lightweight container(saiserver).

How I did it
enable saiserver container on barefoot platform.

add docker-saiserver-bfn.mk for building saiserver container
in platform/barefoot/docker-saiserver-bfn, add necessary files that needs in saiserver container
How to verify it
Tested on Intel platform ec9516

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
2023-01-06 11:45:03 +08:00
Richard.Yu
3ebdaefa8c
[SAIServer]Upgrade SAI server init script (#13175) (#13227) (#13232)
Why I did it
why
In order to apply different config across different platform, and use the code with a unified format, reuse syncd init script to init saiserver.

How I did it
how
Reuse syncd init script

How to verify it
Test
Test in DUT s6000 and dx010 with sonic 202205
2023-01-06 11:44:34 +08:00
Zain Budhwani
5cc233d1cf
[submodule] Update sonic-gnmi submodule (#13264)
#### Why I did it

Submodule update for sonic-gnmi
Incorporates:

d922a07 Zain Budhwani   Wed Jan 4 21:27:32 2023 -0800   Fix gnmi cli hang (sonic-net/sonic-gnmi#69)

#### How I did it

Get latest updates
2023-01-05 16:24:48 -08:00
Mai Bui
06e1a0bc14
[device/dell] Mitigation for security vulnerability (#11875)
Dependency: [PR (#12065)](https://github.com/sonic-net/sonic-buildimage/pull/12065) needs to merge first.

#### Why I did it
`commands` module is not protected against malicious input
`getstatusoutput` is detected without a static string, uses `shell=True`
#### How I did it
Eliminate the use of `commands`
Use `subprocess.run()`, commands in `subprorcess.run()` are totally static
Fix indentation
#### How to verify it
Tested on DUT
[dell_log.txt](https://github.com/sonic-net/sonic-buildimage/files/9561332/dell_log.txt)
2023-01-05 16:22:09 -08:00
Nazarii Hnydyn
ba5c26a16f
[submodule]: Advance sonic-sairedis submodule. (#13270)
Update sonic-sairedis submodule pointer to include the following:

402eb14 [ppi]: Enable bulk API. (#1171)
86bb828 Switch to using stock gcovr 5.2 (#1174)
1c9ca78 Manage LANES mapping on VOQ system (#1127)
5887d31 Fix for [EVPN] When MAC moves from remote end point to local, ASIC DB fields are not updated properly for the mac #11503Update NotificationProcessor.cpp (#1118)
559bd5b [ci][asan] add DVS tests run with ASAN (#1139)
4ab46b5 Initialize attr variables in Legacy.switch_get and LegacyFdbEntry.fdb_entry_get (#1169)
4e24c77 The meta_sai_validate_fdb_entry() validates the input FDB entry for the (#1154)

Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
2023-01-05 19:53:52 +02:00
Liu Shilong
6e1df20104
[build] Add environment when using dpkg hook to avoid lock loop. (#13150)
Why I did it
In some cases, dpkg will call dpkg to validate version.
dpkg hook will get stuck in a loop to lock.

How I did it
Use an env variable to skip duplicated lock.
2023-01-05 13:16:49 +08:00
Zain Budhwani
90950d9c11
Fix rsyslog_plugin UT with timestamp formatter (#13241)
#### Why I did it

Timestamp formatter inside UT was failing due to new year change

#### How I did it

Use a const stored year that will used as expected value

#### How to verify it

Run UT
2023-01-04 14:56:28 -08:00
byu343
83fd368f19
[Arista]: Add hwSku Arista-7260CX3-D108C10 (#13242)
* [Arista]: Add hwSku Arista-7260CX3-D108C10

* Add buffer-related config for Arista-7260CX3-D108C10
2023-01-04 13:21:43 -08:00
Divya Mukundan
346503b9b3
Updating submodule (swss-common) (#13144)
Update sonic-swss-common submodule pointer to include the following:
*70b3609 Support for TC-DOT1p qos map #721
2023-01-04 13:00:57 -08:00
Ikki Zhu
8ad69f77a4
Seastone add platform capability enhancement config (#13079) 2023-01-04 10:17:50 -08:00
Guilt
1c05f66cea
[build] fix CI warnings issued by "git describe" (#13098)
./functions.sh script contains twice the command "git describe --tags".
Azure pipelines currently retrieves the repository content by using a
"git clone" or "git fetch" command with the option "--depth".
When the depth is not enough sized to reach a tag in the "git log"
history,  "git describe --tags" generates on stderr the warning:
"fatal: No names found, cannot describe anything."

https://stackoverflow.com/questions/4916492/git-describe-fails-with-fatal-no-names-found-cannot-describe-anything

During the build process, the functions.sh script is a lot consumed and
this pointless warning appears in CI thousand lines w/o any added value.

This situation can be easily avoided by redirecting related commands
stderr output to /dev/null.

Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
2023-01-03 10:04:31 -08:00
Rida Hanif
f1e84f9cd8
[gns3]: modify SONiC VS image name (#13136)
Modified sonic.gns3.sh file by changing name of VS image from "image" to "img"
2023-01-03 10:02:10 -08:00
Yoush
e7600ff79d
[centec]: reference to v1.11.0-1 sai debian package for master (#13206) 2023-01-03 09:53:46 -08:00
Prince Sunny
fa9abb6bcd
Add DASH yang (#13078)
* Introduce Sonic Yang for DASH for the following tables:
2023-01-03 09:19:42 -08:00
jcaiMR
f84d8b9635
advance dhcprelay (#13205)
Why I did it
Advance dhcprelay submodule for master

4bf1868 - (HEAD, origin/master, origin/HEAD, master) fix relay-reply dhcpv6 packet counter issue [jcaiMR]
How I did it
How to verify it
2023-01-02 22:22:57 +08:00
Dror Prital
aeaec4053c
[submodule] Advance sonic-swss pointer (#13223)
Update sonic-swss submodule pointer to include the following:

* bdedf69 Modify coppmgr mergeConfig to support preserving copp tables through reboot. ([#2548](https://github.com/sonic-net/sonic-swss/pull/2548))
* 7891e78 Fixed set mtu for deleted subintf due to late notification ([#2571](https://github.com/sonic-net/sonic-swss/pull/2571))
* a443945 Updated handling of VRF_VNI mapping and VLAN_VNI mapping for same VNI ID ([#2538](https://github.com/sonic-net/sonic-swss/pull/2538))

Signed-off-by: dprital <drorp@nvidia.com>
2023-01-02 13:14:06 +02:00
Arvindsrinivasan Lakshmi Narasimhan
a57fa16839
[Chassis][Voq]update to add buffer_queue config on system ports (#12156)
Why I did it
In the voq chassis the buffer_queue configuration needs to be applied on system_port instead of the sonic port.
This PR has the change to do this.

How I did it
Modify buffer_config.j2 to generate buffer_queue configuration on system_ports if the device is Voq Chassis

How to verify it
Verify the buffer_queue configuration is generated properly using sonic-cfggen

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
2022-12-31 23:59:54 -08:00
xumia
38c5d7fcec
[Build] Support j2 template for debian sources for docker ptf (#13198)
Change to use the sources.list from the file generated from the j2 template
2022-12-29 23:33:21 -08:00
Nikola Dancejic
86a5a7f1ea
add Tunnel yang model (#12232)
#### Why I did it
Add yang model for TUNNEL config
#### How I did it
created sonic-tunnel.yang file and tests
#### How to verify it
`make target/python-wheels/bullseye/sonic_yang_models-1.0-py3-none-any.whl`

#### Link to config_db schema for YANG module changes
https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md#tunnel
2022-12-29 17:12:25 -08:00
Liu Shilong
e0c29aabe0
[ci] Fix docker sonic slave tag issue. (#13179) 2022-12-28 10:56:50 +08:00