Commit Graph

2174 Commits

Author SHA1 Message Date
Myron Sosyak
71a04722f4
[submodule] Update sonic-sairedis (#10302)
1ccda8d MACsec in Gearbox (#993)
7a2b824 Update SAI submodule (#1015)
418d5fb Add pre match logic for lag member (#1008)

Signed-off-by: Myron Sosyak <myronx.sosyak@intel.com>
2022-03-31 11:45:29 +02:00
Hua Liu
271ef69e60
Add j2 template for enable pam_limit and limit SSH session (#10177)
#### Why I did it
    When too many user login concurrently and run commands, SONiC may kernel panic on some device which has very limited memory.

#### How I did it
    Add j2 template for setup pam_limit plugin for limit SSH session per-user.

#### How to verify it
    Manually validate the j2 template can generate correct config file.

#### Which release branch to backport (provide reason below if selected)

- [x] 201811
- [ ] 201911
- [ ] 202006
- [x] 202012
- [x] 202106
- [x] 202111

#### Description for the changelog
    Add j2 template for setup pam_limit plugin for limit SSH session per-user.

#### A picture of a cute animal (not mandatory but encouraged)
2022-03-31 17:33:43 +08:00
ganglv
6e51779efb
[sonic-cfggen] Fix invalid switch_type (#10383)
Why I did it
sonic-config-engine unit test is using invalid switch_type

How I did it
Update xml with correct switch_type

How to verify it
Run UT for sonic-config-engine

Signed-off-by: Gang Lv ganglv@microsoft.com
2022-03-31 15:29:23 +08:00
Longxiang Lyu
16766c0ea4
[YANG ] Support vlan sub intf short naming format (#10160)
Why I did it
To support vlan sub intf short naming format, like subport Eth8.100 for parent portEthernet8 with vlan id 100.

How I did it
Add checks to must condition to verify there is a port or portchannel with the index same as the vlan sub intf.

How to verify it
Run the unttests.
2022-03-31 08:24:13 +08:00
Lior Avramov
761ae24427
[submodule] Advance sonic-utilities submodule pointer (#10333)
Update sonic-utilities submodule to include below commits:
510a9b9 Add date to show version (#2086)
61b1396 [sfpshow][recycle_port] sfpshow script needs to skip recycle ports (#2109)
4681697 Support command `show ip fib` and `show ipv6 fib` (#2100)
2a982a1 Update `config mirror_session` CLI to support heximal gre type value (#2095)
b25f1e1 [generic-config-updater] Add caclrule validator (#2103)
968900c [sonic-package-manager] do not mod_config for whole config db when setting init_cfg (#2055)
bf55ceb [nvgre] Added auto-generated CLI plugins and test for NVGRE Tunnel feature (#1915)
8389c81 [sonic-cli-gen] fix failure "Error: digits_class" when field "digit_class" does not exist in DB (#2054)
f71ef64 Fix import statement in mclag.py (#2073)
2022-03-30 14:43:13 +03:00
Lior Avramov
f054d07df5
[sonic-swss]: Advance submodule (#10332)
Update sonic-swss submodule to include below commits:
d80094b [aclorch] Do not fail ACL rule remove flow if rule already deleted (#2183)
bea0b70 [gcov]: Change coverage.xml file references (#2120)
829b219 [tunnelmgrd]: Warm boot support (#2166)
ad65b0a Fix issue: sometimes PFC WD unable to create zero buffer pool (#2164)
608acc3 [doc] Moving Configuration.md from swss to yang sub-folder (#2177)
0294376 [orchagent] NVGRE Tunnel orchestration agent implementation (#1953)
ce88696 [ci] Update default sonic image downloading build ID. (#2175)

Co-authored-by: liora <liora@nvidia.com>
2022-03-29 16:34:24 +03:00
Junchao-Mellanox
9282618450
[YANG] Add route flow counter support (#9814)
* [YANG] Add route flow counter support
2022-03-24 15:14:30 -07:00
Saikrishna Arcot
9451a9d43e
Check to see that the py2 and py3 version files exist before trying to sort them (#10325)
For Bullseye, Python 2 isn't present at all. This means that in certain
build cases (such as building something only for Bullseye), the version
file may not exist, and so the sort command would fail.

For most normal build commands, this probably won't be an issue, because
the SONiC build will start with Buster (which has both Python 2 and
Python 3 wheels built), and so the py2 and py3 files will be present
even during the Bullseye builds.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2022-03-22 21:57:15 -07:00
SuvarnaMeenakshi
74c32d0d31
[sonic-py-swsssdk]: Advance submodule (#10308)
Update sonic-py-swsssdk submodule to include below commits:

96c0590 [port_util] Fix issue: port_util.get_vlan_interface_oid_map should not raise exception when DB has not RIF data (#117)
96da8b9 [build] pin pytest-azurepipelines version (#119)

Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
2022-03-22 17:58:15 -07:00
Mohamed Ghoneim
874d7fc2c6
[yang] In ACL_RULE PRIORITY is mandatory and PACKET_ACTION for CTRLPLANE ACLs (#10248)
#### Why I did it
Fixes https://github.com/Azure/sonic-utilities/issues/2049

from caclmgr:
- PRIORITY is a required field [code](3fa18d18d4/src/sonic-host-services/scripts/caclmgrd (L548))
- PACKET_ACTION is a required field [code](3fa18d18d4/src/sonic-host-services/scripts/caclmgrd (L581))

I think PRIORITY is a required field for ACLs not only CTRLPLANE ACLs

#### How I did it
Check code.

#### How to verify it
Unit-test

#### Which release branch to backport (provide reason below if selected)

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->

- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111

#### Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->

#### Link to config_db schema for YANG module changes
<!--
Provide a link to config_db schema for the table for which YANG model
is defined
Link should point to correct section on https://github.com/Azure/SONiC/wiki/Configuration.
-->

#### A picture of a cute animal (not mandatory but encouraged)
2022-03-22 17:12:16 -07:00
Volodymyr Boiko
24397ead09
[sonic-config-engine][portconfig] Do not parse JSON as Python AST (#10224)
#### Why I did it
To fix https://github.com/Azure/sonic-buildimage/issues/9643

#### How I did it
Instead of ast.literal_eval added python2 compat code for json strings unicode -> str convertion.

We need python2 compatibility since py2 sonic config engine (buster/sonic_config_engine-1.0-py2-none-any.whl target) is still included into the build (ENABLE_PY2_MODULES flag is set for buster). Once we abandon buster and python2, this compat and ast.literal_eval could be cleaned up all through the code base.

#### How to verify it
run steps from the linked issue
2022-03-21 12:43:43 -07:00
xumia
92363eadbe
[Build]: support to collect version when purging debian package (#10287)
Why I did it
support to collect version when purging debian package
Support to collect version multiple times

How I did it
Add the collection action before purging.
2022-03-21 17:10:33 +08:00
liuh-80
87af5659c5
Update submodule sonic-snmpagent (#10277)
Updating sonic-snmpagent submodule with the following commits

        dae8146 [ci]: Support code diff coverage
        6bd51c4 Fix: LAG counters, if LAG don't have L3 interface
        2654f4a Fix snmp agent Initialize config DB multiple times issue

#### Why I did it
    When change pycommon to use swsscommon UT failed in sonic-snmpagent, need submodule update with UT issue fix.

#### How I did it

#### How to verify it

#### Which release branch to backport (provide reason below if selected)

#### Description for the changelog

        [ci]: Support code diff coverage
        Fix: LAG counters, if LAG don't have L3 interface
        Fix snmp agent Initialize config DB multiple times issue

#### A picture of a cute animal (not mandatory but encouraged)
2022-03-21 13:04:22 +08:00
liuh-80
4659f8b8e8
[Submodule] Update src/sonic-utilities (#10272)
Updating sonic-utilities sub module with the following commits

    b00b870 [build] stop vstest in the Azure pipeline 
    2c56e92 [GCU] Marking fields under BGP_PEER_RANGE, BGP_MONITORS as create-only
    6289987 Fix sonic-installer failure due to missing import 
    45e6ac1 [show] add support for hwstatus in show muxcable status
    93384ed Try get port operational speed from STATE DB
    483fc6e [techsupport] Added a lock to avoid running techsupport in parallel
    398da58 Validation check correction while adding a member to PortChannel
    a8a7edb [generate_dump] exclude mft and mlx folders from /etc
    1cf1d03 Fix UT failed cause by change pycommon to use swsscommon
2022-03-20 17:33:12 -07:00
xumia
ed4f19fb28
[Build][Bug]: fix the warning message not printed as expected issue (#10278)
Fix the warning message not printed as expected issue
2022-03-19 21:48:27 +08:00
bingwang-ms
fb7f046143
[yang] Update YANG model for mirror session to support decimal value for GRE type (#10140)
#### Why I did it
PR  https://github.com/Azure/sonic-utilities/pull/1825 added validation for the input of `config mirror session add`, and only decimal value is accepted.
An issue https://github.com/Azure/sonic-buildimage/issues/10096 was raised to suggest accepting HEX value as well, and the suggestion makes sense to me.

To accept HEX value for GRE type, and keep backward compatibility as well, I updated the YANG model to support both decimal and hexadecimal input for GRE type.

#### How I did it
Update the regex for GRE type.

#### How to verify it
Verified by UT
```
platform linux -- Python 3.9.2, pytest-6.0.2, py-1.10.0, pluggy-0.13.0
rootdir: /sonic/src/sonic-yang-models
plugins: pyfakefs-4.5.4, cov-2.10.1
collected 3 items                                                                                                                                                                                     

tests/test_sonic_yang_models.py ..                                                                                                                                                              [ 66%]
tests/yang_model_tests/test_yang_model.py .                                                                                                                                                     [100%]

========================================================================================== 3 passed in 2.53s ==========================================================================================
```

#### Description for the changelog
Update YANG model for mirror session to support decimal value for GRE type.
2022-03-18 17:27:02 -07:00
Jing Zhang
64822d80b1
[sonic-linkmgrd][master] submodule update (#10271)
f00efef Longxiang Lyu Wed Mar 16 09:12:46 2022 +0800 Add a command line option to store logs into a separate file (#41)
ff2e67d Longxiang Lyu Tue Mar 15 09:10:59 2022 +0800 Add default port cable type (#39)
ebbb4d8 Jing Zhang Mon Mar 14 15:41:11 2022 -0700 Prevent switching MUX to "Unknown" (#36)
c779b8f Longxiang Lyu Thu Mar 10 21:35:11 2022 +0800 [nonfunctional] Use LinkProberStateMachineBase (#38)
b9fedd0 Longxiang Lyu Wed Mar 9 13:03:58 2022 +0800 [NONFUNCTIONAL] Add LinkProberStateMachineBase (#37)
bedd42b Longxiang Lyu Wed Mar 9 10:03:00 2022 +0800 Add .clang-format file to format code (#28)
9fe4fc6 Guohan Lu Thu Mar 3 17:51:43 2022 -0800 [doc]: add lgtm badge in README.md
c1249d9 Longxiang Lyu Wed Mar 2 18:05:18 2022 +0800 Enable lgtm (#33)
b8514c6 Longxiang Lyu Wed Mar 2 13:34:39 2022 +0800 Collect port cable type to use corresponding state machine (#31)
9b59ef9 Longxiang Lyu Wed Mar 2 07:19:33 2022 +0800 Improve make clean (#32)
2022-03-18 11:31:38 -07:00
Sudharsan Dhamal Gopalarathnam
52c2a3ad23
[yang] Fixing Ethertype field regex in acl rule yang to accept decimal values (#10108)
#### Why I did it
Fixing issue https://github.com/Azure/sonic-buildimage/issues/9991
The ACL RULE table field ETHER_TYPE can accept both hex as well as decimal values. However yang model didn't allow decimal values. Fixed it to allow decimal values (same pattern as in hex (1536-65535)


#### How I did it
Updated yang model to handle decimal values

#### How to verify it
Added UT to verify it.
2022-03-17 10:26:03 -07:00
xumia
e1f57db818
[Submodule]: Update sonic-restapi (#10257)
#### Why I did it
```
Update submodule sonic-restapi
bd97dfe Fix urllib3 CVE-2021-33503 issue (#104)
f159bfa Upgrade the containers to be based on Debian Buster (#103)
a1830c1 (origin/201911) Fix OpenAPI spec to be readable by autorest (#101)
```
2022-03-17 10:16:43 -07:00
Sudharsan Dhamal Gopalarathnam
28f6a51d26
[doc] Moving Configuration.md from swss to sonic-yang-models folder (#10078)
#### Why I did it
Moved Configuration.md from swss to yang folder. The configuration schema should be present along with yang models and when users add yang model they could update configuration document as well.
2022-03-15 10:26:36 -07:00
Stephen Sun
d08add5523
[submodule] Update sonic-swss submodule pointer (#10209)
Update sonic-swss with the following changes:

29d5d8da Use abort instead of exit in case calling SAI API failure (#2170)
12f980c8 Fix issue config qos reload causing orchagent aborted via tracking dependencies among QoS tables (#2116)
6e5ed1c0 [chassis][syncd][sai] Adjusting response timeout during syncd init (#2159)
0a99f546 Try get port operational speed from STATE DB (#2119)
828cccfe [crm] Use sai_object_type_get_availability() API to get counters (#2098)
18c73a19 Allow IPv4 link-local nexthops (#1903)

Signed-off-by: Stephen Sun <stephens@nvidia.com>
2022-03-15 15:40:55 +02:00
Shilong Liu
286ff289f5
[sonic-config-engine] Add failure details in sonic-config-engine unit test. (#10210) 2022-03-15 14:47:36 +08:00
Song Yuan
330eb8dda9
update submodule sonic-py-swsssdk (#10220) 2022-03-14 11:24:26 -07:00
Stepan Blyshchak
2919b4820f
[hostcfgd] record feature state in STATE DB (#9842)
- Why I did it
To implement blocking feature state change.

- How I did it
Record the actual feature state in STATE DB from hostcfg.

- How to verify it
UT + verification by running on the switch and checking STATE DB.

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
2022-03-14 13:45:27 +02:00
xumia
7178c668dd
[Build]: Fix installing dpkg packages in parallel issue (#10175)
Why I did it
Fix the debian packages installing in parallel issue.
Add apt hook command to support apt to print no version control info.
2022-03-14 11:20:20 +08:00
xumia
f34b5e601d
[Submodule]: Update submodule for sonic-telemetry (#10124)
e56e9b4 Fix CVE-2021-3121 warning (#96)
bf1be4f [ci]: Support code diff coverage threshold 50% (#94)
64e516c Ported Marvell armhf build on x86 for debian buster to use cross-compilation instead of qemu emulation (#80)
e426388 [ci]: Support azp code coverage (#87)
2022-03-11 09:21:35 +08:00
jingwenxie
861ea26d18
[yang]: Update DEVICE_METADATA yang models to support 'sub_role' (#10161)
#### Why I did it
Fix https://github.com/Azure/sonic-buildimage/issues/9591
#### How I did it
Add 'sub_role' to device_metadata yang models.
#### How to verify it
Run UT for sonc-yang-models.
2022-03-10 14:42:43 -08:00
StormLiangMS
86017096b2
[bgpcfgd] to support removal part of configuration of bgp allowed prefix list (#10165)
* fix allow list issue

Signed-off-by: stormliang <stormliang@microsoft.com>

* add the ipaddress in the install list

* add unit test

Co-authored-by: Ubuntu <azureuser@SONIC-SH-STORM-02.5pu3m0fajw1edcfltykk1gauxa.gx.internal.cloudapp.net>

Why I did it
Failed to remove part of configuration of bgp allowed prefix list. The details in #10141

How I did it
There are two issues:

In FRR, ipv6 default route is ::/0, but in the configuration, it is 0::/0, string comparison would be false, but why ipv4 failed to remove the allowed prefix list, ipv6 works? Looks into next one for the answer.

The current managers_allow_list doesn’t support removal part of the prefix list. But why IPv6 works in 1? It is because the bug for the IPv6 default route comparison, it would do the update no matter what is the operation (the code will compare the prefix list in the FRR and configuration db, if all configurations in db are presented in FRR, it do nothing, otherwise it will update the prefix list based on the configuration from db).

How to verify it
Follow the step in #10141
2022-03-10 08:54:33 +08:00
Song Yuan
01798447ab
[Chassis][QoS template] Skip configuring buffer and QoS config on recirc ports (#7869)
* Added test case to verify the template changes.
2022-03-09 16:04:36 -08:00
jingwenxie
d112e7cca9
[submodule] Update sonic-utilities (#10163)
47c243e [show][muxcable] fix the sudo access error for show muxcable metrics (#2083)
f872516 [muxcable][show] enhance show mux status to show last switchover time (#2067)
d440df7 [warmboot] Migrate 10G ports during warm-reboot on s6100 (#2064)
494c6d7 [counterpoll] Display the correct default poll interval for watermark counters (#2082)
499988e [show][config] add muxcable command line support for retrieve / reset ICMP packet loss data (#2046)
8b01d3e Remove the warning message appear when there are no ports on CONFIG DB (#2050)
ed6e66e [GCU] Supporting Groupings during path-xpath translation (#2044)
25b3455 [ci] Use official build debian pkg instead and parameterize source branch (#2079)
2022-03-08 21:56:42 +08:00
ganglv
29f6b01be6
[sonic-cfggen]: Fix generated deployment_id (#10154)
Why I did it
Config db schema generated by minigraph can’t pass yang validation, deployment_id can’t be none for yang validation.

How I did it
Update minigraph.py, skip deployment_id with None value

How to verify it
Run UT for sonic-config-enginue.
Run command 'sonic-cfggen -m tests/multi_npu_data/sample-minigraph-noportchannel.xml -p tests/multi_npu_data/sample_port_config-3.ini -n asic3 --print-data'.

Signed-off-by: Gang Lv ganglv@microsoft.com
2022-03-08 15:48:04 +08:00
Renuka Manavalan
d9a61b07a7
send log to /var/log/syslog; Add user info the message (#10033)
Why I did it
Desired the log message destination to be syslog and it misses the critical info.

How I did it
Non logical code changes only.
Logging update, just for one message only
a) The log message is directed to /var/log/syslog, instead of /var/log/auth.log
b) Include user alias in the message

How to verify it
Pick a user alias that has not logged into the switch yet
Add this alias to /etc/tacplus_user
Attempt to login as that user
Look for the error message in /var/log/syslog
e.g. "Feb 18 19:16:41.592191 sonic ERR sshd[5233]: auth fail: Password incorrect. user: user_xyz"
2022-03-07 15:01:31 -08:00
Kebo Liu
fe0a7693f4
[smartmontools] Install smartmontools with apt-get and upgrade it to 7.2-1 (#10087)
Why I did it
Smartmontools 6.6 has an issue with reading SMART info of nvme SSD
Smartmontools can be installed with apt-get, no need to build and install

How I did it
Use apt-get to install smartmontools 7.2-1
Remove previous make files for smartmontools 6.6

How to verify it
verify with "smartctl" can read out correct SMART info on NVME ssd.
verify "show platform ssdhealth" can still work

Signed-off-by: Kebo Liu <kebol@nvidia.com>
2022-03-07 09:39:33 -08:00
ganglv
78e867a794
[YANG]: Update port Yang models to support multi-asic platform (#10113)
Why I did it
Multi-asic platform add aisc_port_name and role to PORT table, and port_index range is changed.

How I did it
Update sonic-port.yang, add asic_port_name and role, and remove range limitation.

How to verify it
Run UT for sonic-yang-models.

Signed-off-by: Gang Lv ganglv@microsoft.com
2022-03-07 15:54:05 +08:00
jingwenxie
eec49a2e09
[yang] support acl MIRROR_ACTION (#10100)
Why I did it
ACL doesn't have mirror related action

How I did it
Add 'MIRROR_INGRESS_ACTION' and 'MIRROR_EGRESS_ACTION' to sonic-acl.yang.j2

How to verify it
Run the YANG model unit tests
2022-03-07 14:04:18 +08:00
ganglv
2ef9d65525
[yang]: AAA login pattern (#9805)
Signed-off-by: Gang Lv ganglv@microsoft.com

<!--
     Please make sure you've read and understood our contributing guidelines:
     https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

     ** Make sure all your commits include a signature generated with `git commit -s` **

     If this is a bug fix, make sure your description includes "fixes #xxxx", or
     "closes #xxxx" or "resolves #xxxx"

     Please provide the following information:
-->

#### Why I did it
end2end test is blocked by Yang model for AAA login pattern.

#### How I did it
Add pattern to AAA yang models.

#### How to verify it
Run UT for sonc-yang-models.

#### Which release branch to backport (provide reason below if selected)

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->

- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106

#### Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->
Fix #9713 

#### A picture of a cute animal (not mandatory but encouraged)
2022-03-07 13:05:46 +08:00
StormLiangMS
55a0722a33
support BGP_ALLOWED_PREFIXES (#10142) 2022-03-05 09:20:38 +08:00
Jing Zhang
622962a213
[linkmgrd]: update linkmgrd submodule (#10117)
ce72b0d Longxiang Lyu Thu Feb 24 06:05:12 2022 Put handler member functions as virtual in base (#30)
ef59e4f Jing Zhang Fri Feb 25 11:38:28 2022 Incrementing tolerance on mux state inconsistency (#27)
2d12892 Longxiang Lyu Wed Feb 16 03:32:06 2022 Rename LinkManagerStateMachine to ActiveStandbyStateMachine (#26)
f38634c Jing Zhang Thu Feb 17 17:23:56 2022 Update log level for mux probing and mux state chance (#23)
a8434dd Jing Zhang Thu Feb 17 17:21:01 2022 Handle xcvrd crashing scenarios (#22)
2ebdb2b Longxiang Lyu Mon Feb 14 13:26:07 2022 [make] Enable make extra includes (#24)
2022-03-03 16:22:31 -08:00
xumia
582ea7cfc6
[Unit Test]: Fix sonic config engine test not stable issue(#10147)
Co-authored-by: azureuser <azureuser@contoso.com>
2022-03-03 09:22:15 -08:00
Vadym Hlushko
e104247950
[nvgre] Added YANG model and tests (#10095)
- Why I did it
NVGRE Tunnel feature extends the Config DB with new tables. These tables require a new YANG model.

- How I did it
Added a new YANG model sonic-nvgre-tunnel.yang

- How to verify it
Added YANG test cases.

Signed-off-by: Vadym Hlushko <vadymh@nvidia.com>
2022-03-03 15:58:17 +02:00
Sudharsan Dhamal Gopalarathnam
14de0a1548
[containerd]Fixing container commands when mode is local and state is disabled (#9986)
Why I did it
During warm-reboot and fast-reboot the below error logs appear
Feb 3 22:05:15.187408 r-lionfish-13 ERR container: docker cmd: kill for nat failed with 404 Client Error for http+docker://localhost/v1.41/containers/nat/json: Not Found ("No such container: nat")

The container command when called for local mode doesn't check if it is enabled before calling docker kill which throws the above errors.
b6ca76b482/scripts/fast-reboot (L699)

How I did it
Checking feature state if local mode and returning error exit code along with valid debug message.

How to verify it
Manually tested with warm-reboot and fast-reboot
Added UT to verify it.
2022-03-02 19:08:06 -08:00
Aravind Mani
1740beb1f2
[sonic-cfggen]: Fix sonic-cfggen build failures for armhf (#10132)
Why I did it
amrhf build fails while building sonic-config-engine whl package
https://dev.azure.com/mssonic/be1b070f-be15-4154-aade-b1d3bfb17054/_apis/build/builds/77089/logs/9

The reason for the failure is due to the fact that there is a new line generated at the top of the file in buffer config test cases while building for broadcom based platform and this issue is not seen in Marvell based platforms.

How I did it
Removed the new line for all the buffer test cases as there is no need to add it and accordingly changed the buffer_config.j2 where the new line is generated.
2022-03-02 13:06:20 -08:00
Maxime Lorrillere
7891760fd0
[yang-models] Add chassis fields to device_metadata (#10006)
This change is adding asic_name, switch_id, switch_type and max_cores to sonic-device_metadata.yang
This should fix issue #9575

Co-authored-by: Maxime Lorrillere <mlorrillere@arista.com>
2022-03-02 16:10:04 +08:00
ganglv
3bb87c03a1
[yang]: Add yang models for BGP_PEER_RANGE table (#10082)
Why I did it
end2end test is blocked by Yang model for BGP_PEER_RANGE.

How I did it
Add new yang models.

How to verify it
Run UT for sonc-yang-models.

Signed-off-by: Gang Lv ganglv@microsoft.com
2022-03-02 10:09:41 +08:00
arlakshm
fd22635de0
[chassis][bgp] create v4 and v6 peer group for VoQ internal neighbors (#9693)
Why I did it
In the recent minigraph changes we add separate BGP session configuration for V4 and V6 internal VoQ neighbors.
This PR is adding different Peer groups for V4 and V6 neighbors

How I did it
Add VOQ_CHASSIS_V4_PEER and VOQ_CHASSIS_V6_PEER groups
Add extra Unit tests

How to verify it

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
2022-02-24 11:21:26 -08:00
Junchao-Mellanox
d82eafd8ae
[system-health] Fix file handle leak (#10059)
- Why I did it
swsscommon.ConfigDBConnector does not automatically close connection when the instance is recycled by python. So, it should not create this instance each time calling check_services. It will cause error like Failed to read from file /var/run/hw-management/led/led_status_capability - OSError(24, 'Too many open files')

- How I did it
Only connect DB once in init

- How to verify it
Manual test
2022-02-24 11:29:59 +02:00
Junchao-Mellanox
72477bcac8
[submodule] Update submodule for sonic-swss-common (#10012)
*9eac0ae Add support for route flow counter (#576)
*2262c01 [VS] Increase test timout to 360min (#582)
*a2b8161 [ci] pipeline fixes for VS test (#581)
2022-02-23 17:55:37 -08:00
vmittal-msft
bc1dfea619
Updated traffic scheduler settings for HWSKUs : DellEMC-Z9332f-O32 and DellEMC-Z9332f-M-O16C64 (#9828) 2022-02-23 17:22:41 -08:00
Ze Gan
937ffbdb05
[submodule]: Update sonic-sairedis (#10061)
Signed-off-by: Ze Gan <ganze718@gmail.com>

b9337dc (HEAD, origin/master, origin/HEAD) [vslib]: Fix MACsec bug in SCI and XPN (#1003)
edbceb9 [syncd][vslib] Keep new warm boot discovered SERDES objects (#985)
af5c156 Fix build issues on gcc-10 (#999)
1445cd5 update SAI submoule (#1001)
48fe704 [ci] pipeline fixes for VS test (#1002)
f484cf9 Enable SAI_SWITCH_ATTR_UNINIT_DATA_PLANE_ON_REMOVAL attribute (#975)
5d0b22d Enable SAI_SWITCH_ATTR_UNINIT_DATA_PLANE_ON_REMOVAL attribute (#975)
1b8ce97 (origin/202111) [pipeline] Download swss common artifact in a separated directory (#995)
7a2e096 Change sonic-buildimage.vs artifact source from CI build to official build. (#992)
2022-02-23 19:31:41 +08:00
Ze Gan
4a2a0df607
[submodule]: Update sonic-swss (#9978)
* Update sonic-swss

Signed-off-by: Ze Gan <ganze718@gmail.com>

* update swss

Signed-off-by: Ze Gan <ganze718@gmail.com>

* Update submodule update-swss

Signed-off-by: Ze Gan <ganze718@gmail.com>
2022-02-23 09:18:05 +08:00
Nazarii Hnydyn
55e7a14f04
[submodule]: Advance sonic-utilities. (#10058)
```
Commits on Jan 31, 2022
[sonic-package-manager] implement blocking feature state change (#2035) 

Commits on Feb 12, 2022
[ci] pipeline fixes for VS test (#2059) 

Commits on Feb 14, 2022
[ci] allow download partially succeeded suilds for sonic-swss-pytests… 
[build] allowPartiallySucceededBuilds true in the step of download so… 

Commits on Feb 16, 2022
[config] Fix snmpagentaddress doesn't support the uppercase letters f… 

Commits on Feb 17, 2022
[ci] Fix pipeline on build_and_install_module (#2074) 
Enable diff coverage and set the threshold to 50% (#2061) 

Commits on Feb 18, 2022
check for adding default vlan attempt added (#2075) 
[GCU] Adding unit-test where path and ref paths are under the same YA… 
[GCU] Turning port admin down before some critical port changes (#1998) 

Commits on Feb 20, 2022
show_platfom_info not run for simx (#2042) 
[aclshow] fix aclshow when clear is called before counters are popula… 
```
2022-02-22 15:32:57 -08:00
Mohamed Ghoneim
f21a45b68a
[build] fix build exception and revert #9136 (#10037)
#### Why I did it

1. Fix Build exception [example](https://dev.azure.com/mssonic/build/_build/results?buildId=73911&view=logs&jobId=88ce9a53-729c-5fa9-7b6e-3d98f2488e3f&j=cef3d8a9-152e-5193-620b-567dc18af272&t=ac3bce9f-b126-5a26-3fee-28ce0ec1679d)

```
2022-02-19T01:54:23.4200556Z ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/local/lib/python3.8/dist-packages/markupsafe/__init__.py)
```

This is because Jinja2 uses MarkupSafe without specifying an upper limit to the version, MarkupSafe version that was released today removed 'soft_unicode'. So now Jinja2 is complaining.

Related issues:
https://github.com/pallets/jinja/issues/1591
https://github.com/aws/aws-sam-cli/issues/3661


2. Reverts #9136

Fixing build failures in SONiC utils [example](https://dev.azure.com/mssonic/build/_build/results?buildId=73784&view=logs&jobId=83516c17-6666-5250-abde-63983ce72a49&j=83516c17-6666-5250-abde-63983ce72a49&t=6177235f-d4f1-5f72-835a-90ebb93a1784)

One of the errors:
```
 TestPathAddressing.test_find_ref_paths__ref_is_the_whole_key__returns_ref_paths 

self = <tests.generic_config_updater.gu_common_test.TestPathAddressing testMethod=test_find_ref_paths__ref_is_the_whole_key__returns_ref_paths>

    def test_find_ref_paths__ref_is_the_whole_key__returns_ref_paths(self):
        # Arrange
        path = "/PORT/Ethernet0"
        expected = [
            "/ACL_TABLE/NO-NSW-PACL-V4/ports/0",
            "/VLAN_MEMBER/Vlan1000|Ethernet0",
        ]
    
        # Act
        actual = self.path_addressing.find_ref_paths(path, Files.CROPPED_CONFIG_DB_AS_JSON)
    
        # Assert
>       self.assertEqual(expected, actual)
E       AssertionError: Lists differ: ['/ACL_TABLE/NO-NSW-PACL-V4/ports/0', '/VLAN_MEMBER/Vlan1000|Ethernet0'] != ['/ACL_TABLE/NO-NSW-PACL-V4/ports/0']
E       
E       First list contains 1 additional elements.
E       First extra element 1:
E       '/VLAN_MEMBER/Vlan1000|Ethernet0'
E       
E       - ['/ACL_TABLE/NO-NSW-PACL-V4/ports/0', '/VLAN_MEMBER/Vlan1000|Ethernet0']
E       + ['/ACL_TABLE/NO-NSW-PACL-V4/ports/0']
```

The VLAN_MEMBER backlink (can be called referrer link or ref link) is not found.

Issue introduced by https://github.com/Azure/sonic-buildimage/pull/9136
I don't know how this PR passed the build system, it should have failed.

Known YANG issue https://github.com/Azure/sonic-buildimage/issues/9312

#### How I did it
The import to `sonic-vlan` is breaking the build
```
    import sonic-vlan {
        prefix vlan;
    }
```

I am not sure if that's the only issue, so I think reverting the whole PR should be the safer option.

#### How to verify it
Ran sonic-utils tests locally.
2022-02-21 11:07:29 -08:00
thomas.cappleman@metaswitch.com
a7f6130383
[submodule] swss-common and py-swssdk updates (#9777)
sonic-swss-common:
[ci] Set diff coverage threshold to 50% (#567)
Added NVGRE tunnel related tables (#549)
Add option to suppress logging (#566)
[TableBase] Make channel name from both table name and database ID (#568)
Revert "[TableBase] Make channel name from both table name and database ID (#568)" (#574)

sonic-py-swsssdk:
Add option to suppress warnings when querying Redis (#115)
2022-02-18 13:24:04 -08:00
Christian Svensson
d540492834
caclmgrd: remove permit source port 179 (#9827)
[Caclmgrd] Remove insecure opening of source port 179
Signed-off-by: Christian Svensson <blue@cmd.nu>
2022-02-17 15:04:59 -08:00
Vadym Hlushko
5ce75acfa5
[nvgre] Added YANG model and tests (#9136)
- Why I did it
NVGRE Tunnel feature extends the Config DB with new tables. These tables require a new YANG model.

- How I did it
Added a new YANG model sonic-nvgre-tunnel.yang

- How to verify it
Added YANG test cases.

Signed-off-by: Vadym Hlushko <vadymh@nvidia.com>
2022-02-17 12:06:01 +02:00
kellyyeh
f136c53d19
[radv] Support multiple ipv6 prefixes per vlan interface (#9934)
Why I did it
Radvd.conf.j2 template creates two copies of the vlan interface when there are more than one ipv6 address assigned to a single vlan interface. Changed the format to add prefixes under the same vlan interface block.

How I did it
Modifies radvd.conf.j2 and added unit tests

How to verify it
Configure multiple ipv6 address to the same vlan, start radvd
Unit test will check if radvd.conf with multiple ipv6 addresses is formed correctly
2022-02-16 14:17:26 -08:00
Aravind Mani
b7ae4f2e67
Dell S6100: Addition of 10G ports (#9988) 2022-02-16 00:09:05 -08:00
Myron Sosyak
125fe9907a
Bump Thrift version from 0.13.0 to 0.14.1 (#9881)
#### Why I did it
To bump the Thrift version to 0.14.1 
- To avoid [CVE-2020-13949](https://nvd.nist.gov/vuln/detail/CVE-2020-13949) 
- to fix some dependencies issues

#### How I did it
- rename `src/thrfit_0_13_0` to `src/thrift_2` to remove version number in the path. (`src/thrift` contains rules to build thrift 0.11.0  )
- Add thrift sources as submodule as there are no prepared debian packages for version >0.13.0 on [debian.org](https://packages.debian.org/search?searchon=sourcenames&keywords=thrift)
- Added patches with fixes for original thrift debian rules:(remove unneeded packages, fix multi job build)
#### How to verify it
```
BLDENV=buster make -f Makefile.work target/debs/buster/libthrift-dev_0.14.1_amd64.deb
```
2022-02-15 16:39:47 -08:00
Sudharsan Dhamal Gopalarathnam
0b59f0b641
[yang]YANG model for policer table (#9948)
#### Why I did it
Added yang model for policer table
Fixes https://github.com/Azure/sonic-buildimage/issues/9742 and https://github.com/Azure/sonic-buildimage/issues/9743
#### How I did it
Creating yang model for policer

#### How to verify it
Added UT to verify the yang model

The configuration schema for policer is added in the pull request https://github.com/Azure/sonic-swss/pull/2144
2022-02-14 13:00:58 -08:00
Alexander Allen
675bceba4d
[submodule] Update linux-kernel submodule pointer (#9937)
Updates include the following changes in order to support new Mellanox platforms and drivers (Azure/sonic-linux-kernel#259)

10ef390 Update kconfig to support / enable newly backported mellanox patches.
6a949e1 Add backported patches for Mellanox hw-mgmt V.7.0020.1300
e1913f7 Rename and reformat patch headers
2022-02-13 17:13:48 +02:00
Kebo Liu
7af5fcf80e
update sonic-snmpagent submodule (#9935)
Update the sonic-snmpagemt submodule to pick up new changes:
Fix RFC2737 with update xcvr vendor version key name Azure/sonic-snmpagent@4ee573c
Fix Queue stat unavailable error seen during SNMP service start Azure/sonic-snmpagent@3013597
Modify path of python wheels to be installed Azure/sonic-snmpagent@b8ea609
[Voq][Inband] Support the Ethernet-IB port Azure/sonic-snmpagent@df615c4

Signed-off-by: Kebo Liu <kebol@nvidia.com>
2022-02-13 15:01:40 +02:00
Sudharsan Dhamal Gopalarathnam
b621dafff7
[yang] Adding not-provisioned to type field in DEVICE_METADATA table (#9951)
#### Why I did it
Fixing the issue https://github.com/Azure/sonic-buildimage/issues/9915

#### How I did it
Added 'not-provisioned' as a supported value for type field in DEVICE_METADATA type. This value is set during initial ZTP bring up

#### How to verify it
Added UT to verify it.
2022-02-10 11:59:25 -08:00
Jing Kan
914a8a1756
[sonic-config-engine]: Update minigraph parser to support enable DHCP server for BmcMgmtToRRouter (#9938)
Signed-off-by: Jing Kan jika@microsoft.com
2022-02-10 13:30:54 +08:00
abdosi
e44a40cc3b
Updated Internal BGP Templates for chassis packet (#9674)
Fixes: https://github.com/Azure/sonic-buildimage/issues/9610
2022-02-08 09:36:32 -08:00
Dror Prital
cd77efa763
[submodule] Update sonic-utilities submodule (#9871)
Update submodule sonic-utilities that contains the following commits:

[build] allowPartiallySucceededBuilds: true (#2043)
[system-health] Remove booting stage in system health service (#2022)
[GCU] Mark children of bgp_neighbor as create-only (#2008)
[generic_config_updater] Minor update - No logical code change (#2028)
[generic-config-updater] Handle failed service restarts (#2020)
[debug dump] Missing Dict Key handled in the MatchOptimizer (#2014)
[Auto Techsupport] Added Event Driven TS to Command Reference (#1985)
2022-02-07 12:58:47 +02:00
Jing Zhang
7a4c58f118
[sonic-linkmgrd][master] submodule update (#9904)
[sonic-linkmgrd][master] submodule update

ef1f5eb Jing Zhang Feb 3 09:37:25 2022 [linkmgrd] linkmgrd subscribes MUX_CABLE_INFO table to handle peer OIR events (#17)
bcd74b4 Jing Zhang Feb 1 09:52:00 2022 Collect ICMP packet loss information (#14)

sign-off: Jing Zhang zhangjing@microsoft.com
2022-02-05 13:07:32 -08:00
Ashok Daparthi-Dell
0629e5b432
[yang] Fix for sonic-scheduler.yang name pattern (#9873)
#### Why I did it

PR9611 - sonic-scheduler.yang pattern issue

#### How I did it
Modified the scheduler name pattern string to accept any string 

#### How to verify it

Sonic yang tests
2022-02-04 16:47:56 -08:00
kellyyeh
bc88535b88
[dhcp6relay] Support relaying Relay-Forward message (#9887) 2022-02-01 11:36:48 -08:00
noaOrMlnx
adb87162c4
[submodule] Update sonic-swss submodule pointer (#9859)
53c630b [CoPP] Add always_enabled field to coppmgr logic ([minigraph]: Add PORTCHANNEL_MEMBER configurations #2034)
adcf69d [cbf] Fix cbf sync error ([aboot] add SWI_DEFAULT support in boot0 #2056)
69f9ee5 fix mclagsyncd out of order initialization ([submodules] update dbsyncd and snmpagent pointers for LLDP MIB support #2112)
2022-02-01 19:20:00 +02:00
Mohamed Ghoneim
f8fd2defb4
[yang] Fixing groupings when grouping is in the same module file (#9880)
#### Why I did it
If the grouping is in the same file in the module, fetching the grouping fails

#### How I did it
fixing the `uses_module_name` when the grouping is under the same file

#### How to verify it
Enabled a grouping under the same file which is `lldp`, there is a test in sonic-yang-mgmt that translates `sample-config-db` into yang format. This test passes with grouping in `lldp` used.

#### Which release branch to backport (provide reason below if selected)

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->

- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106

#### Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->


#### A picture of a cute animal (not mandatory but encouraged)
2022-01-28 10:23:38 -08:00
Mohamed Ghoneim
6100a6c8f9
[yang] Adding sonic-bgp-monitor to setup.py (#9877)
#### Why I did it
Include sonic-bgp-monitor to setup.py so it gets included in /usr/local/yang-models when installing the package

#### How I did it

#### How to verify it
install the package

#### Which release branch to backport (provide reason below if selected)

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->

- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106

#### Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->


#### A picture of a cute animal (not mandatory but encouraged)
2022-01-28 10:16:27 -08:00
kellyyeh
f998684e3e
[dhcp_relay] Check payload size to prevent buffer overflow in dhcpv6 option (#9740) 2022-01-27 23:19:15 -08:00
Saikrishna Arcot
bcf5388f25
Package debugging and hardening for dhcpmon and dhcp6relay (#9862)
Enable dbgsym package for dhcpmon.

Allow CFLAGS and LDFLAGS from environment variables to be used
in the dhcp6relay build. This makes sure that the -O2 flag from
dpkg-buildflags gets used.

Finally, enable all hardening flags in dpkg-buildflags for
dhcp6relay and dhcpmon. The change from the default set of flags is that
during linking, immediate binding of symbols is done instead of lazy
binding.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2022-01-27 17:48:58 -08:00
sabari@broadcom
018a6495da
[yang] added mclag sonic yang (#7622)
#### How I did it
Added mclag sonic yang file for the MCLAG enhancements  as per HLD: Azure/SONiC#596

#### How to verify it
try rest APIs

#### Description for the changelog
Added mclag sonic yang
2022-01-27 13:09:58 -08:00
novikauanton
2532d65660
[swss] Update submodeule to fix mclagsyncd (#9837)
commit history:
*6cb43ee2 Fix mclagsyncd out of order initialization (#2112)
2022-01-27 11:41:11 -08:00
Junchao-Mellanox
c06cb219e2
Make system health service start early (#9792)
- Why I did it
For SYSTEM READY feature. Currently, there is a booting stage in system health service to indicate that the system is loading SONiC component. This booting stage is no longer needed because SYSTEM READY feature will treat that stage as system "NOT READY".

- How I did it
1. Remove booting stage
2. Adjust unit test cases

- How to verify it
Manual test, Unit test, sonic-mgmt Regression
2022-01-27 13:46:52 +02:00
Ying Xie
1ac140a945
[dhcp6relay] a couple memory access protections (#9851)
Why I did it
the strcpy and buffer allocation is not safe, it corrupts 1 byte on the stack. Depending on the memory layout, it may or may not cause issue immediately.
message type is not validated before updating the counter. Which could cause segment fault.

How I did it
Remove the unsafe strcpy, use config->interface.c_str() instead.
Check message type before updating counters.

How to verify it
The issue (1) caused segment fault on a specific platform. The fix was validated there. Issue (2) was precautionary. Added log in case it triggers.
2022-01-26 09:58:52 -08:00
ganglv
a04da0456b
[yang]: Update yang models to support 'cluster' (#9806)
Why I did it
Minigraph parser added a new field 'cluster' to device_metadata, and then yang validation is blocked.

How I did it
Add 'cluster' to device_metadata yang models.

How to verify it
Run UT for sonc-yang-models.
Use minigraph parser to generate ConfigDB schema and run yang validation.

Signed-off-by: Gang Lv ganglv@microsoft.com
2022-01-26 13:02:47 +08:00
vdahiya12
61e9a7683c
[y_cable] Support for initialization of new daemon ycable to support ycables (#9125)
* [y_cable] Support for initialization of new Daemon ycable to support
ycables
This PR also adds the commit in sonic-platform-daemons

94fa239 [y_cable] refactor y_cable to a seperate logic and new daemon from xcvrd (#219)

Why I did it
This PR separates the logic of Y-Cable from xcvrd. Before this change we were utilizing xcvrd daemon to control all aspects of Y-Cable right from initialization to processing requests from other entities like orch,linkmgr.
Now we would have another daemon ycabled which will serve this purpose.
Logically everything still remains the same from the perspective of other daemons.
it also take care aspects like init/delete daemon from Y-Cable perspective.

How I did it
To serve the purpose we build a new wheel sonic_ycabled-1.0-py3-none-any.whl and install it inside pmon.
We also initalize the daemon ycabled which serves our purpose for refactor inside pmon

How to verify it
Ran the changes with an image for dualtor tests on a 7050cx3 platform

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
2022-01-25 11:10:25 -08:00
Andriy Kokhan
e88d7b3b93
[swss] Update submodule (#9816)
Update the sonic-swss submodule. The following are new commits in the submodule:

6cb43ee [p4orch] Fix handlePortStatusChangeNotification status deserialize (#2111)
863f0f1 [azp]: Enable PR diff coverage (#2083)
bf4cd4a Fix the unsafe usage of strncpy in portsorch.cpp (#2110)
c1b4b40 support port isolation group in BFN platform (#1940)


Signed-off-by: Andriy Kokhan <andriyx.kokhan@intel.com>
2022-01-21 12:07:40 -08:00
liuh-80
e639dda71b
[TACACS] fix src\tacacs\bash_tacplus\debian\rules file mode to 755 because it will be change to 755 by debian build and cause dirty image version. (#9821)
#### Why I did it
    src\tacacs\bash_tacplus\debian\rules file mode is 644, and debian build will change it to 755, which will cause image version contains 'dirty'

#### How I did it
    Change src\tacacs\bash_tacplus\debian\rules file mode to 755

#### How to verify it
    Check the image version not contains dirty

#### Which release branch to backport (provide reason below if selected)

- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [*] 202111

#### Description for the changelog
    Change src\tacacs\bash_tacplus\debian\rules file mode to 755

#### A picture of a cute animal (not mandatory but encouraged)
2022-01-21 22:28:31 +08:00
jingwenxie
7e9a198843
[yang] support ACL ACCEPT action (#9784)
Why I did it
ACL have ACCEPT action indeed, but yang doesn't support it.

How I did it
Add 'ACCEPT' enum to sonic-types.yang.j2

How to verify it
Run the YANG model unit tests
2022-01-21 11:11:54 +08:00
Jing Zhang
22e4b9be5c
[sonic-linkmgrd][master] submodule update #9808
[sonic-linkmgrd][master] submodule update

Commits added:
0c23756 Jing Zhang      2022-01-19      Linkmgrd subscribing State DB route event  (#13)
12b9951 Longxiang Lyu   2021-12-13      Add TLV support to ICMP payload (#11)
3eedda3 Longxiang Lyu   2022-01-06      Add missing intermediate states (#16)
8da4982 Ying Xie        2022-01-04      [linkmgrd] update README, set coding style guidance (#15)
a897cf8 Longxiang Lyu   2021-12-13      Improve PR template (#16)
6fec701 Jing Zhang      2021-12-06      Add pull request template for linkmgrd repo (#9)


signed-off-by: Jing Zhang zhangjing@microsoft.com
2022-01-20 17:45:55 -08:00
ganglv
d3c39d5324
[sonic-cfggen]: Feature should use 'state' to replace 'status' (#9796)
Why I did it
ConfigDB schema generated by minigraph parser can't pass yang validation.

How I did it
Modify minigraph.py, and use 'state' to replace 'status'.

How to verify it
Run UT for sonic-config-engine.
Use minigraph parser to generate ConfigDB schema, and run yang validation.

Signed-off-by: Gang Lv ganglv@microsoft.com
2022-01-20 08:51:56 +08:00
ganglv
dde5f37496
[yang]: Add Yang models for BGP monitor (#9752)
Why I did it
end2end test is blocked by Yang model for BGP monitor.

How I did it
Create new yang files for BGP monitor, and add UT.

How to verify it
Follow the steps in #9711.
Run UT for sonic-yang-models.

Signed-off-by: Gang Lv ganglv@microsoft.com
2022-01-20 08:51:12 +08:00
Junchao-Mellanox
56b5d22092
[submodule] Update submodule for sonic-platform-daemons (#9780)
c4127c2 [psud] Fix PSU log issue (#235)
07542cb [pmon][xcvrd]xcvrd process show backtrace on the internal port. (#233)
3e432e7 [Y-Cable] Increased unit test coverage of y_cable_helper.py (#229)
7c363f5 [ledd] prevent led crash on recirc port event (#232)
e9ccd82 [sonic-platform-daemons] fix dependency issue on py2 wheels by correcting the path (#234)
2b0acfb [sfp-refactoring] xcvrd: add initial support for CMIS application initialization (#217)
2022-01-19 20:33:12 +02:00
Aravind Mani
d5b0261da3
[DPB] Fix verbose mode issue (#9772) 2022-01-19 11:29:11 +05:30
Vivek Reddy
249c27b5ac
[submodule] Update sonic-utilities submodule (#9687)
```
d9f3afe [fdbshow] Adding more options for fdbshow and show mac (#1982)
902e14f Revert "Revert "[Barefoot] Added CLI to list/set P4 profile (#1951)"" (#2019)
5cc9dd5 Revert "Revert "[sonic-package-manager] support sonic-cli-gen and packages with YANG model (#1650)" (#1972)" (#1994)
```
2022-01-18 20:22:44 -08:00
Saikrishna Arcot
bb3362760d
[docker-dhcprelay]: Update to Bullseye (#9736)
As part of this, update the isc-dhcp package to match the Bullseye
version (this fixes some compile errors related to BIND), clean up some
of the build dependencies and runtime dependencies for debian packaging,
and use the default Boost version to compile against instead of
explicitly saying using 1.74.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2022-01-18 15:11:36 -08:00
xumia
40761941d4
[submodule]: update sonic-mgmt-common (#9785)
[submodule]: update sonic-mgmt-common
2022-01-18 21:05:46 +08:00
nkelapur
9b937497ca
Fix IPv4 routes with IPv6 link local next hops installed in FPM (#8740)
* Description: Currently IPv4 routes with IPv6 link local next hops are
not properly installed in FPM.
Reason is the netlink decoding truncates the ipv6 LL address to 4 byte
ipv4 address.

Ex : fe80:: is directly converted to ipv4 and it results in 254.128.0.0
as next hop for below routes

show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup

B>* 2.1.0.0/16 [200/0] via fe80::268a:7ff:fed0:d40, Ethernet0, weight 1,
02:22:26
B>* 5.1.0.0/16 [200/0] via fe80::268a:7ff:fed0:d40, Ethernet0, weight 1,
02:22:26
B>* 10.1.0.2/32 [200/0] via fe80::268a:7ff:fed0:d40, Ethernet0, weight
1, 02:22:26

Hence this fix converts the ipv6-LL address to ipv4-LL (169.254.0.1)
address before sending it to FPM. This is inline with how these types of
routes are currently programmed into kernel.

Signed-off-by: Nikhil Kelapure <nikhil.kelapure@broadcom.com>
2022-01-17 19:40:50 -08:00
xumia
5fb21ce9fd
[submodule]: update sonic-utilities (#9773)
[submodule]: update sonic-utilities
2022-01-18 08:36:33 +08:00
Aravind Mani
d5d642f348
[Submodule] sonic-platform-common submodule update (#9753) 2022-01-15 10:43:25 +05:30
Anish Narsian
cd26122dd6
[Yang] Add resource_type and downstream_subrole to yang model (#9696)
#### Why I did it
As a fix for https://github.com/Azure/sonic-buildimage/issues/9574

#### How I did it
Enhance yang model for networking-metadata

#### How to verify it
Unit testing
2022-01-14 15:37:20 -08:00
abdosi
582a21d6c5
[submodule update] sonic-swss (#9751)
[Submodule update] sonic-swss

    c78aa1b81a3a9001669746067ebbe40b4485f71d (HEAD -> master, origin/master, origin/HEAD) OA changes to support Ordered ECMP and DVS test for same. (#2092)
    b4b00031378a6ce303b779159e718d6d20790c11 Handling Invalid CRM configuration gracefully (#2109)
    d240cb2d356ec17baa464455f37f88ac5dbc441a [Mellanox] '_8lane' not added to Mellanox 5xxx models with 800G (#2090)
    8fd6e488d2a3696b9cfe352a9119c86f0f33e6dc [pfcwd] Add vs test infrastructure (#2077)
    b96ee5438b8bf08980846ee84ff69e7ba267b0dc [vnetorch] Advertise vnet tunnel routes (#2058)
2022-01-13 10:53:27 -08:00
abdosi
6076cd1c9d
[submodule update] sonic-sairedis (#9750)
[submodule update] sonic-sairedis

    d5866a3dccfb3bc50853d740d54203b5cae61eed (HEAD -> master, origin/master, origin/HEAD) [vslib]: fix create MACsec SA error (#986)
    f36f7ce6236ae97526e15f00e7688ccced7c0454 Added Support for enum query capability of Nexthop Group Type. (#989)
    323b89b14995a84bd6539c8a1df00b77d251f99e Support for MACsec statistics (#892)
    26a8a1204e873109537c81462ad1457cf38c2f9e Prevent other notification event storms to keep enqueue unchecked and drained all memory that leads to crashing the switch router (#968)
    0cb253a42cd0a641b8e0a3c6a4a54e5397dd8c2d Fix object availability conversion (#974)
2022-01-13 08:17:39 -08:00
Ze Gan
5cdfffe2fc
[submodule]: update sonic-wpa-supplicant (#9388)
457e94d51 [macsec_linux]: Fixbug cannot dump the PN due to type error (#42)
f7c073323 Disable P2P module (#41)
7b3b777e2 [ci]: use native arm64 and armhf build pool (#40)
d4e91d66c [sonic_operator]: Increase wait timeout (#39)
43611ef88e [sonic_operators]: Add log in sonic operators (#43)

Signed-off-by: Ze Gan <ganze718@gmail.com>
2022-01-12 20:27:02 -08:00
abdosi
649e6c7307
[minigraph] Enhanced parser to parse interface name for static route nexthop (#9707)
What I did:-

Enhanced minigraph parser to parse interface name associated with static route nexthop

Why I did:-

One of the use case to support interface name is Chassis Packet. For Chassis Packet we have Static Routes configured to route traffic across line-card. If the FRR programs static route without the interface name then in case if the ip interface that is associated with the nexthop goes down FRR resolves static route nexthop over the default route as we have FRR config ip nht-resolve-via-default which causes undesired behavior. Having interface name with Static Route prevents recursive lookup on default route.

How I verify:

Updated unit-test cases
Manual verification
2022-01-12 18:48:23 -08:00
ganglv
c69d376071
[yang]: Update AAA yang models (#9724)
#### Why I did it
AAA yang model is not up to date.

#### How I did it
Add fallback and trace field, and replace boolean_type

#### How to verify it
Run UT for sonic_yang_models.
Follow the steps from #9710
2022-01-12 10:23:11 -08:00
ganglv
c11ab02ab1
[sonic-cfggen]: Add bgp asn for yang validation (#9640)
Why I did it
Config db schema generated by minigraph can’t pass yang validation, bgp_asn must not be None.

How I did it
Update sampe-voq-graph.xml to add bgp_asn.

How to verify it
Build sonic-config-engine.
Run command 'sonic-cfggen -m tests/sample-voq-graph.xml -p tests/voq-sample-port-config.ini --print-data', and check bgp_asn.

Signed-off-by: Gang Lv ganglv@microsoft.com
2022-01-12 15:25:38 +08:00
Shi Su
ac894b394f
[swss] Update submodule (#9723)
Why I did it
Update the sonic-swss submodule. The following are new commits in the submodule.

6dae6b8 Add initial value for weight in overlay nexthops (#2096)
d3cd402 [p4rt-tests] Bind response consumer to appl_state_db (#2105)
43e54e5 Fix armhf buildimage artifacts not found issue (#2107)

How I did it
Update the swss submodule pointer.
2022-01-11 09:42:09 -08:00
Saikrishna Arcot
fee2441717
Create docker-base-bullseye and docker-config-engine-bullseye (#9666)
* [slave-bullseye]: Remove Python 2

It shouldn't be needed anymore.

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

* [dockers]: Add docker-base-bullseye and docker-config-engine-bullseye

Also upgrade socat from 1.7.3.1 to 1.7.4.1

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2022-01-11 09:23:42 -08:00
Shilong Liu
94b778c39b
[build] docker-sonic-mgmt replace USER by whoami (#9702) 2022-01-11 16:48:04 +08:00
Kerry Meyer
9b795dbf09
Showtech sonic mgmt framework: Add Management Framework functionality for "show tech-support" (#7816)
Provide the changes required for supporting the "show-techsupport" command via the SONiC Management Framework front end mechanisms (CLI, REST, and gNOI). The Management Framework functionality implemented by this PR improves on the the capabilities currently provided by the SONiC Click CLI interface via the "show techsupport" command by providing the following additional features:

- User-friendly "help" information describing command syntax details for CLI invocation.
- Ability to invoke the command via REST and gNOI mechanisms.

Unit test results are attached to this PR.
2022-01-10 14:36:34 -08:00
Lawrence Lee
8e6b194b17
[YANG]: Add support for dual ToR attributes (#9698)
Fixes #9561
Fixes #9570 
Fixes #9563
Partial fix for #9556 

#### Why I did it
- Attributes for dual ToR configs lack YANG model support

#### How I did it
- Extend YANG tests to cover dual ToR use cases
- Extend YANG model to cover dual ToR use cases
- Reduce the default log level to warning so only test failures are printed

#### How to verify it
- Run the YANG model unit tests
2022-01-10 12:24:51 -08:00
Longxiang Lyu
58c5bb6513
[Yang] Add YANG model support for vlan sub interface (#9269)
Why I did it
Add YANG model file for table VLAN_SUB_INTERFACE

How I did it
Add YANG model file sonic-vlan-sub-interface.yang to describe data structure
modify existing unit-test to cover vlan sub interface

How to verify it
Build sonic-yang-models and sonic-yang-mgmt without errors
2022-01-10 10:49:10 +08:00
Qi Luo
d7ffcf1773
[minigraph] do not use NULL:NULL explicitly in json (#9703)
#### Why I did it
It should be handled by `ConfigDBConnector.typed_to_raw()`.

This is a bug for `sonic-cfggen -m --print-data` only
```
    "PORTCHANNEL_MEMBER": {
        "PortChannel0001|Ethernet112": {
            "NULL": "NULL"
        },
        "PortChannel0002|Ethernet116": {
            "NULL": "NULL"
        },
        "PortChannel0003|Ethernet120": {
            "NULL": "NULL"
        },
        "PortChannel0004|Ethernet124": {
            "NULL": "NULL"
        }
    },
```
But not appears in `sonic-cfgen -d --print-data`.
```
    "PORTCHANNEL_MEMBER": {
        "PortChannel0001|Ethernet112": {},
        "PortChannel0002|Ethernet116": {},
        "PortChannel0003|Ethernet120": {},
        "PortChannel0004|Ethernet124": {}
    },
```
Tested in a T0 KVM.
2022-01-07 22:20:31 -08:00
anamehra
e5d5f80d14
Cache connection handles to prevent duplicate (#9636)
On a multi-asic Supervisor card, running commands like
'show interface counter' opens a confid_db connection per
namespace per interface which results in many duplicate connections
exceeding the allowed open file handles. This causes the command to fail.

Caching the connections to prevent duplicate handles.
2022-01-07 12:58:01 -08:00
abdosi
6c507329b7
Enable/Disable Order ECMP feature. (#9651)
Updated Jinja2 Template in switch.json.j2 for enabling/disabling Order ECMP feature based on device role.
Changes as per design: Azure/SONiC#896
2022-01-06 16:40:50 -08:00
ganglv
abbd173845
[sonic-cfggen]: Remove wrong portchannel members (#9614)
Why I did it
Config db schema generated by minigraph can’t pass yang validation, portchannel_member has invalid port.

How I did it
Update test minigraph to remove invalid port channel.

How to verify it
Build sonic-config-engine.
Run command 'sonic-cfggen -m xxx.xml --print-data', and check port channel member.

Signed-off-by: Gang Lv ganglv@microsoft.com
2022-01-06 09:14:36 +08:00
ganglv
52fdb8e42e
[yang]: Support VLAN alias (#9615)
Why I did it
Config db schema generated by minigraph can’t pass yang validation, and there's no 'alias' field in yang model.
Minigraph parser supports 'alias' field for VLAN.

How I did it
Add 'alias' field to sonic-vlan.yang

How to verify it
Build sonic-yang-models.
Run command 'sonic-cfggen -m xxx.xml --print-data', and run yang validation.

Signed-off-by: Gang Lv ganglv@microsoft.com
2022-01-05 10:27:29 -08:00
ganglv
5efebad24e
[sonic-cfggen]: Fix missing vlan interface (#9639)
Why I did it
Config db schema generated by minigraph can’t pass yang validation, there's no Vlan31 in 'VLAN' table.

How I did it
Update test minigraph to add vlan interface.

How to verify it
Build sonic-yang-models.
Run command 'sonic-cfggen -m tests/fg-ecmp-sample-minigraph.xml -p tests/mellanox-sample-port-config.ini --print-data', and run yang validation.

Signed-off-by: Gang Lv ganglv@microsoft.com
2022-01-05 10:10:46 -08:00
Shilong Liu
3844ae8290
Fix docker-sonic-mgmt reproducible related issue. (#9647)
Reproducible build script breaks docker-sonic-mgmt build.
2022-01-05 11:54:19 +08:00
Mohamed Ghoneim
98da6ebaa7
[sonic-yang-mgmt] Adding flag to disable/enable log printing (#9659)
#### Why I did it
Fixes https://github.com/Azure/sonic-utilities/issues/1871

From [generic-config-updater](https://github.com/Azure/sonic-utilities/tree/master/generic_config_updater) we call `sonic-yang-mgmt` multiple times in order to check a certain change to ConfigDb is valid or not. It is expected for some changes to be invalid, so always printing errors from `sonic-yang-mgmt` makes the output hard to read.

In this PR, we are adding a way to control if logs should be printed or not.

#### How I did it
- Added `print_log_enabled` flag to sonic_yang ctor
- Converted all `print` statements to `sysLog(..., doPrint=True)`

#### How to verify it
unit-test passing means the change did not break logs.

#### Info about libyang logging
libyang provides an extensive logging logic which can support a lot of scenarios:
- ly_log_level: setting logging level
  - LY_LLERR
  - LY_LLWRN
  - ... 
- ly_set_log_clb: setting log callback to customize the default behavior which is printing the msgs
- ly_log_options: setting logging options 
  - LY_LOLOG: If callback is set use it, otherwise just print. If flag is not set, do nothing.
  - ...

For more info refer to:
- https://netopeer.liberouter.org/doc/libyang/devel/html/group__logopts.html#gaff80501597ed76344a679be2b90a1d0a
- https://netopeer.liberouter.org/doc/libyang/devel/html/group__log.html#gac88b78694dfe9efe0450a69603f7eceb


#### What's next?
Consume the new flag `print_log_enabled` in [generic-config-updater](https://github.com/Azure/sonic-utilities/tree/master/generic_config_updater) to reduce the logging clutter. 

#### Which release branch to backport (provide reason below if selected)

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->

- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106

#### Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->


#### A picture of a cute animal (not mandatory but encouraged)
2022-01-04 19:42:10 -08:00
Sudharsan Dhamal Gopalarathnam
b96533342f
[sonic-ztp] Submodule update (#9589)
Updating ztp submodule to include the below commits
f7dd3c5 [sonic-ztp]Fixing build failure after bullseye integration (#30)
9218e16 Replace swsssdk.ConfigDBConnector and SonicV2Connector with swsscommon(#28)

Signed-off-by: Sudharsan Dhamal Gopalarathnam <sudharsand@nvidia.com>
2022-01-02 17:56:14 +02:00
Stephen Sun
b749c67ac5
[sonic-swss] Submodule update (#9397)
691c37b7 [Route bulk] Fix bugs in case a SET operation follows a DEL operation in the same bulk (Azure/sonic-swss#2086)
a4c80c3d patch for issue Azure/sonic-swss#1971 - enable Rx Drop handling for cisco-8000 (Azure/sonic-swss#2041)
71751d10 [macsec] Support setting IPG by gearbox_config.json (Azure/sonic-swss#2051)
5d5c1692 [bulk mode] Fix bulk conflict when in case there are both remove and set operations (Azure/sonic-swss#2071)
8bbdbd2b Fix SRV6 NHOP CRM object type (Azure/sonic-swss#2072)
ef5b35f3 [vstest] VS test failure fix after fabric port orch PR merge (Azure/sonic-swss#1811)
89ea5385 Supply the missing ingress/egress port profile list in document (Azure/sonic-swss#2064)
81234373 [pfc_detect] fix RedisReply errors (Azure/sonic-swss#2040)
b38f527a [swss][CRM][MPLS] MPLS CRM Nexthop - switch back to using SAI OBJECT rather than SWITCH OBJECT
ae061e55 create debug_shell_enable config to enable debug shell (Azure/sonic-swss#2060)
45e446d9 [cbf] Fix max FC value (Azure/sonic-swss#2049)
b1b5b297 Initial p4orch pytest code. (Azure/sonic-swss#2054)
d352d5a9 Update default route status to state DB (Azure/sonic-swss#2009)
24a64d65 Orchagent: Integrate P4Orch (Azure/sonic-swss#2029)
15a3b6ca Delete the IPv6 link-local Neighbor when ipv6 link-local mode is disabled (Azure/sonic-swss#1897)
ed783e1f [orchagent] Add trap flow counter support (Azure/sonic-swss#1951)
e9b05a31 [vnetorch] ECMP for vnet tunnel routes with endpoint health monitor (Azure/sonic-swss#1955)
bcb7d61a P4Orch: inital add of source (Azure/sonic-swss#1997)
f6f6f867 [mclaglink] fix acl out ports (Azure/sonic-swss#2026)
fd887bf8 [Reclaim buffer] Reclaim unused buffer for dynamic buffer model (Azure/sonic-swss#1910)
92589789 [orchagent, cfgmgr] Add response publisher and state recording (Azure/sonic-swss#1992)
3d862a72 Fixing subport vs test script for subport under VNET (Azure/sonic-swss#2048)
fb0a5fd8 Don't handle buffer pool watermark during warm reboot reconciling (Azure/sonic-swss#1987)
16d4bcdb Routed subinterface enhancements (Azure/sonic-swss#1907)
9639db78 [vstest/subintf] Add vs test to validate sub interface ingress to a vnet (Azure/sonic-swss#1642)

Signed-off-by: Stephen Sun stephens@nvidia.com
2021-12-28 14:53:16 +02:00
Stepan Blyshchak
13582aaa6d
[sonic-yang] fix the feature state type (#9587)
- Why I did it
The feature state can be a jinja template, like in this file - https://github.com/Azure/sonic-buildimage/blob/master/files/build_templates/init_cfg.json.j2#L39.
Without this change it is not possible to validate a configuration file.

- How I did it
Relaxes the constraint on feature state. Feature state leaf can be any string.

- How to verify it
Run UT.

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
2021-12-28 09:42:05 +02:00
ganglv
48a648c943
[sonic-cfggen]: Fix syslog_server output (#9616)
Why I did it
'SYSLOG_SERVER': {'': {}, '10.0.10.5': {}, '10.0.10.6': {}},
Config db schema generated by minigraph can’t pass yang validation, server address can't be empty.

How I did it
Update test minigraph to remove wrong configuration.

How to verify it
Build sonic-config-engine.
Run command 'sonic-cfggen -m xxx.xml --print-data', and SYSLOG_SERVERS table.

Signed-off-by: Gang Lv ganglv@microsoft.com
2021-12-23 10:03:28 +08:00
ganglv
3aec72879d
[sonic-cfggen]: Update test minigraph to fix interface (#9601)
Why I did it
Config db schema generated from test minigraph can't pass yang validation.

How I did it
Update test minigraph to fix interface

How to verify it
Build sonic-config-engine.
Run command 'sonic-cfggen -m xxx.xml --print-data', and check interface table and port table.

Signed-off-by: Gang Lv ganglv@microsoft.com
2021-12-21 19:08:15 +08:00
ganglv
67e40b5531
[sonic-cfggen]: Update test minigraph to add deployment_id (#9593)
Why I did it
Config db schema generated from test minigraph can't pass yang validation.

How I did it
Update minigraph xml to add DeploymentId.

How to verify it
Build sonic-config-engine.
Run command 'sonic-cfggen -m xxx.xml --print-data', and check deployment_id field.

Signed-off-by: Gang Lv ganglv@microsoft.com
2021-12-21 09:14:44 +08:00
ganglv
dfddd55cbf
[yang]: Add constraint for pfcwd (#9513)
#### Why I did it
POLL_INTERVAL cannot be set if any of the detection/restoration times in this table is less than the POLL_INTERVAL.

#### How I did it
Add "must" constraint to make sure detection/restoration times are greater than POLL_INTERVAL.

#### How to verify it
Use apply-patch command to update POLL_INTERVAL.
Build sonic-yang-model.
2021-12-20 11:15:39 -08:00
Oleksandr Ivantsiv
3af4a9619e
[sonic-config-engine]: Improve comparison between default and supported breakout modes. (#9278)
Closes #7958 

#### Why I did it
The previous implementation of sonic-cfggen did a simple comparison between default breakout mode in
hwsku.json and supported modes in platform.json. To set a different default speed in hwsku.json
it was required to add one more entry to supported modes in platfrom.json file:

1x10G[100G,50G] vs 1x100G[50G,10G]

The new implementation does more intelligent parsing and analysis of supported and default modes. It
allows changing default speed without adding a new entry to platform.json.

#### How I did it
Add more intelligent parsing and analysis of supported and default modes.

#### How to verify it
Run sonic-config-engine unit tests from sonic-config-engine/tests directory
2021-12-20 08:56:08 -08:00
Qi Luo
0d327abe93
[sonic-utilities] submodule update (#9315)
#### Why I did it
Including below commits:
```
fe00bbf 2021-12-17 | Revert "[sonic-package-manager] support sonic-cli-gen and packages with YANG model (#1650)" (#1972) [Prince George]
5fe6d92 2021-12-16 | [warm/fast-reboot] Fix kexec portion to support platforms based on Device Tree (#1966) [dflynn-Nokia]
74d2a09 2021-12-17 | [portstat] check TX/RX utilization calculation correctness (#1840) [Andriy Yurkiv]
e44c3f6 2021-12-16 | [generic-config-updater] Improving CreateOnly validator and marking /LOOPBACK_INTERFACE/LOOPBACK#/vrf_name as create-only (#1969) [Mohamed Ghoneim]
0067cc4 2021-12-15 | [build] adapt for upstream target path change (#1971) [Qi Luo]
96143ee 2021-12-09 | preserve old order for config reload (#1964) [arlakshm]
f08c81d 2021-12-10 | [vxlan] remove unnecessary whitespace for show commands (#1792) [Gord Chen]
14889ce 2021-12-09 | [soft-reboot] Add support for platforms based on Device Tree (#1963) [dflynn-Nokia]
7ceccd7 2021-12-08 | [generic-config-updater] Adding non-strict mode (#1929) [Mohamed Ghoneim]
2e462ef 2021-12-07 | [sfputil] Firmware download/upgrade CLI support for QSFP-DD (#1947) [Prince George]
7c34b79 2021-12-07 | [config] Add portchannel support  for static route  (#1857) [Dmytro]
54cc370 2021-12-06 | [doc] Refine doc on show loopback/mgmt ports (#1958) [Qi Luo]
3714f63 2021-12-06 | [port2alias]: Fix to get right number of return values (#1906) [SuvarnaMeenakshi]
3fa0854 2021-12-06 | [CLI][show bgp] On chassis don't show internal BGP sessions by default (#1927) [Mahesh Maddikayala]
6de91af 2021-12-06 | [Auto-Techsupport] Issues related to Multiple Cores crashing handled (#1948) [Vivek Reddy]
656ade1 2021-12-06 | SFP-Refactor: Vendor revision is not displayed properly (#1950) [Aravind Mani]
67466cb 2021-12-05 | [port] Fix port speed set (#1952) [Mykola Gerasymenko]
5172972 2021-12-04 | Fix invalid output of syslog IPv6 servers (#1933) [jingwenxie]
290ff5f 2021-12-03 | Routed subinterface enhancements (#1821) [Preetham]
1ea88e2 2021-12-01 | Enhance sfputil for CMIS QSFP (#1949) [andywongarista]
4e132c1 2021-11-30 | [debug dump] Refactoring Modules and Unit Tests (#1943) [Vivek Reddy]
b550c44 2021-11-30 | Add command reference for trap flow counters (#1876) [Junchao-Mellanox]
67a267b 2021-11-30 | [Reclaim buffer] [Mellanox] Db migrator support reclaiming reserved buffer for unused ports (#1822) [Stephen Sun]
30e4654 2021-11-25 | Add show command for BFD sessions (#1942) [Shi Su]
e63f47e 2021-11-25 | [warm-reboot] Fix failures of warm reboot on disconnect of ssh session (#1529) [maksymbelei95]
c05845d 2021-11-25 | Add trap flow counter support (#1868) [Junchao-Mellanox]
ef82f00 2021-11-24 | [load_minigraph] Delay pfcwd start until the buffer templates are rendered (#1937) [Neetha John]
f5e5a56 2021-11-24 | [sonic-package-manager] support sonic-cli-gen and packages with YANG model (#1650) [Stepan Blyshchak]
64777a4 2021-11-23 | generic_config_updater: Filename changed & VLAN validator added (#1919) [Renuka Manavalan]
1f8f6ab 2021-11-23 | [config reload] Update command reference (#1941) [Sudharsan Dhamal Gopalarathnam]
```
2021-12-19 23:06:25 -08:00
Sumukha Tumkur Vani
17c2949d31
[RESTAPI] Update submodule (#9547) 2021-12-17 09:21:32 -08:00
mohan-selvaraj
36673c135c
[yang] sonic yang changes for BUM storm control (#7355)
#### Why I did it
Sonic yang model for BUM storm control

#### How I did it
Added yang model and the corresponding test cases. 

#### How to verify it
yang model test case for storm control
2021-12-16 10:14:47 -08:00
liuh-80
734b1bfee6
[TACACS] Fix auditd can't load tacplus plugin issue. (#9481)
<!--
     Please make sure you've read and understood our contributing guidelines:
     https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

     ** Make sure all your commits include a signature generated with `git commit -s` **

     If this is a bug fix, make sure your description includes "fixes #xxxx", or
     "closes #xxxx" or "resolves #xxxx"

     Please provide the following information:
-->

#### Why I did it
1. Fix auditd log file path, because known issue: https://github.com/Azure/sonic-buildimage/issues/9548

2. When SONiC change to based on bullseye, auditd version upgrade from 2.8.4 to 3.0.2, and in auditd 3.0.2 the plugin file path changed to /etc/audit/plugins.d, however the upstream auditisp-tacplus project not follow-up this change, it still install plugin config file to /etc/audit/audisp.d. so the plugin can't be launch correctly, the code change in src/tacacs/audisp/patches/0001-Porting-to-sonic.patch fix this issue.
#### How I did it
        Fix tacacs plugin config file path.
        Create /var/log/audit folder for auditd.

#### How to verify it
        Pass all UT, also run per-command acccounting UT to validate plugin loaded.

#### Which release branch to backport (provide reason below if selected)

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->

- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106

#### Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->
        Fix tacacs plugin config file path.
        Create /var/log/audit folder for auditd.

#### A picture of a cute animal (not mandatory but encouraged)
2021-12-16 11:02:58 +08:00
Mohamed Ghoneim
2c5794f62d
[yang-model] Using 'leafref' instead of 'must' for loopback (#9535)
#### Why I did it
Fix issue https://github.com/Azure/sonic-utilities/issues/1962

The problem is current implementation of [sonic-yang-mgmt::find_data_dependencies](f2774b635d/src/sonic-yang-mgmt/sonic_yang.py (L518)) does not get referrers if they are using `must` statement, it has to use `leafref`.

For now we can convert `must` to `leafref` if possible. In the future we will investigate get referrers by `must` statements as well https://github.com/Azure/sonic-buildimage/issues/9534

#### How I did it
Instead of `must` use `leafref`

#### How to verify it
unit-test

#### Which release branch to backport (provide reason below if selected)

- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
2021-12-15 17:19:57 -08:00
tomer-israel
6a0bb3a2af
[LLDPD] fix to port remove and immediately create problem (#9519)
[LLDPD] fix to port remove and immediately create a problem - on delete link events it will immediately execute delete without using aggregate events mechanism.

This patch was added to LLDPD on this PR:
lldpd/lldpd#492

Signed-off-by: tomeri <tomeri@nvidia.com>
2021-12-15 13:06:40 -08:00
dependabot[bot]
2a467f8eb4
Bump lxml from 4.6.3 to 4.6.5 in /src/sonic-config-engine (#9522)
Bumps [lxml](https://github.com/lxml/lxml) from 4.6.3 to 4.6.5.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.6.3...lxml-4.6.5)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
2021-12-13 20:20:48 -08:00
abdosi
6c0da4bcf0
[bgp] Enable BGP Graceful Restart based on device role (#9486)
What I did:
Updated Jinja Template to enable BGP Graceful Restart based on device role. By default it will be enable only if the device role type is TorRouter.

Why I did:-
By default FRR is configured in Graceful Helper mode. Graceful Restart is needed on T0/TorRouter only since the device can go for warm-reboot. For T1/LeafRouter it need to be in Helper mode only
2021-12-13 10:14:50 -08:00
Samuel Angebault
6cf06637f6
[sonic-py-common] Add recirc_prefix definition (#9471)
This interface type is used for recirculation on chassis.
The definition is required to prevent this interface from being
considered a physical interface in sonic-platform-common and
sonic-platform-daemon
2021-12-12 18:09:51 -08:00
Mykola Gerasymenko
afd40984fc
[DPB][YANG] Fix cases when boolean is used in different literal cases (#9418)
Fixes #9326

#### Why I did it
When we try execute DPB from CLI we have error:
`libyang[0]: Invalid value "False" in "has_global_scope" element. (path: /sonic-feature:sonic-feature/FEATURE/FEATURE_LIST[name='bgp']/has_global_scope)`
The reason for this issue is that has_global_scope and other have been stored in redis database with value False or True form capital letter:
```
   "FEATURE":{
      "bgp":{
         "auto_restart":"enabled",
         "has_global_scope":"False",
         "has_per_asic_scope":"True",
         "has_timer":"False",
         "high_mem_alert":"disabled",
         "state":"enabled"
      }
```
But yang model support boolean just in lowercase letters (https://datatracker.ietf.org/doc/html/rfc6020#section-9.5.1).
#### How I did it
Added boolean to sonic-types as typedef with different literal cases.

#### How to verify it
Run the command config interface breakout <breakout_mode>

**NOTE:**
To verify this fix, the following PRs that fix other problems in SONiC must be merged into master:
1) Azure/sonic-buildimage/pull/9075
2) Azure/sonic-buildimage/pull/9276
2021-12-10 10:34:02 -08:00
Neetha John
5384b30d3c
[yang] Add missing device types to the device_metadata yang (#9464)
Signed-off-by: Neetha John <nejo@microsoft.com>

Bring back the changes in #9226 that were reverted. Unable to do a revert-revert.

Why I did it
Few device types were missing in the DEVICE_METADATA type field

How I did it
Added missing device types to the device metadata yang
2021-12-10 09:26:08 -08:00
Mohamed Ghoneim
02d273274f
[yang-models] Validating 'services' exist if ACL type is 'CTRLPLANE' (#9295)
#### Why I did it
Fixing issue #9294

#### How I did it
Updating ACL yang model

#### How to verify it

Validating issue with `config patch-apply` is fixed.

- Start a KVM
- Add file `add-ctrl-plane-tbl.json-patch ` with content:
```json
[
    {
     "op": "add",
     "path": "/ACL_TABLE/ACTRLPLANETABLE",
     "value": {
      "policy_desc": "ACTRLPLANETABLE",
      "services": [
       "SSH"
      ],
      "stage": "ingress",
      "type": "CTRLPLANE"
     }
    }
]
```
- Run `sudo config apply-patch add-ctrl-plane-tbl.json-patch`


Before:
```
Patch Applier: The patch was sorted into 4 changes:
Patch Applier:   * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE", "value": {"type": "CTRLPLANE"}}]
Patch Applier:   * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE/policy_desc", "value": "ACTRLPLANETABLE"}]
Patch Applier:   * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE/services", "value": ["SSH"]}]
Patch Applier:   * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE/stage", "value": "ingress"}]
```

After:
```
Patch Applier: The patch was sorted into 1 change:
Patch Applier:   * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE", "value": {"policy_desc": "ACTRLPLANETABLE", "services": ["SSH"], "stage": "ingress", "type": "CTRLPLANE"}}]
```

#### Which release branch to backport (provide reason below if selected)

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->

- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106

#### Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->


#### A picture of a cute animal (not mandatory but encouraged)
2021-12-10 08:04:41 -08:00
arlakshm
327ad41bee
[yang] add set_owner to feature yang (#9075)
#### Why I did it
Add the configuration for the set_owner in the `feature` yang model

#### How I did it
Add new leaf `set_pwner` to the `feature` yang model

#### How to verify it
compile `sonic_yang_mgmt-1.0-py3-none-any.whl`
2021-12-09 23:18:45 -08:00
Abhishek
adf52c2581
[yang] SONiC MAC ACL Yang model update to add support for Source MAC, Destination MAC, Ethertype pattern update, VLAN_ID, PCP, DEI fields (#7917)
#### Why I did it
Currently only IP ACL and related model is defined. Support for MAC ACL is missing. Added support for it.

#### How I did it
ACL_RULE table is added with new MAC ACL related fields namely Source MAC, Destination MAC, Ethertype (Pattern updated to match any valid Ethertypes), VLAN, PCP, DEI

#### How to verify it
Yang model tests are attached.
2021-12-09 11:19:16 -08:00
MaratGubaiev
4562b82bf2
[yang] sonic-bgp-cmn/admin_status fixed (#9429)
#### Why I did it
fixing https://github.com/Azure/sonic-buildimage/issues/9350 "[yang-models] BGP neighbor admin_status should be up/down"
2021-12-09 10:19:05 -08:00
Longxiang Lyu
b88f68b1d6
[YANG] add YANG model support for CABLE_LENGTH (#9273)
Why I did it
Add YANG model support for table CABLE_LENGTH

How I did it
Add the YANG model file
Add the test description file and config file
add list CABLE_LENGTH_LIST to the qos_maps_model list in sonic-yang-ext, as it has an inner list.

How to verify it
Build sonic-yang-model and sonic-yang-mgmt
2021-12-09 09:34:01 -08:00
Stephen Sun
5ac4d42c44
[Unit test] Fix sonic config engine unit test failure (#9454)
- Why I did it
Fix sonic-config-engine unit test failure

- How I did it
 * Do not use pytest fixture in the test since it is not compatible with unittest framework which is used by all of the rest test cases.
 * Supply 2 missing files

- How to verify it
Run unit test or compile the module (when the unit test will run automatically)

Signed-off-by: Stephen Sun <stephens@nvidia.com>
2021-12-09 17:39:28 +02:00
Aravind Mani
fc91dae023
submodule platform daemon update (#9461) 2021-12-09 12:41:17 +05:30
Aravind Mani
66d55757c0
[Submodule]Update sonic-platform-common submodule (#9466) 2021-12-09 12:38:21 +05:30
ganglyu
3c1770b7cb
[yang]: update Yang models for cloudtype and region (#9425)
Why I did it
#9122
DEVICE_METADATA does not have cloudtype and region.

How I did it
Add cloudtype and region to DEVICE_METADATA.

How to verify it
Follow the steps in #9122.
Build sonic-yang-model.

Signed-off-by: Gang Lv ganglv@microsoft.com
2021-12-09 09:04:52 +08:00
Jing Zhang
a263edbc98
[sonic-linkmgrd][master] submodule update (#9420)
#### What I did 

[sonic-linkmgrd][master] submodule update

6c6151b Fix unstable unit tests (state change handler wasn't invoked) (#8)
2f7dc0a support code diff coverage (#5)
83f0002 Force mux state switch to standby if triggered from Cli (#6)

signed-off-by: Jing Zhang zhangjing@microsoft.com
2021-12-08 08:54:00 -08:00
Mykola Gerasymenko
b0f06bab90
[DPB][YANG] Add POLL_INTERVAL in flex_counter yang model (#9276)
#### Why I did it
DPB falls due to missing POLL_INTERVAL in sonic-flex_counter yang model.

#### How I did it
Added POLL_INTERVAL leaf to ACL container in sonic-flex_counter yang model.

#### How to verify it
Run the command config interface breakout <interface> <breakout_mode>

**NOTE:**
To verify this fix, a PR ([add set_owner to feature yang](https://github.com/Azure/sonic-buildimage/pull/9075)) that fix another bug in SONiC should be merged to master.
2021-12-08 00:21:33 -08:00
arlakshm
1509f433fd
[yang] syslog yang model (#9265)
Why I did it
Add yang model for syslog server

How I did it
Add new file sonic-syslog.yang and new files for tests

How to verify it
Compile target/python-wheels/sonic_yang_mgmt-1.0-py3-none-any.whl

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan arlakshm@microsoft.com
2021-12-07 14:12:26 -08:00
thomas.cappleman@metaswitch.com
7ebe44a2a0
[chassis] Fix uninitialized variable in minigraph parsing (#8917)
Why I did it
Local variable may not be created in minigraph parsing, causing crash

How I did it
Moved variable creation earlier
2021-12-07 11:33:17 -08:00
Brian O'Connor
46bcda359c
[PINS] Build P4RT container for PINS (#9083)
- Add INCLUDE_PINS to config to enable/disable container
- Add Docker files and supporting resources
- Add sonic-pins submodule and associated make files

Submission containing materials of a third party:
    Copyright Google LLC; Licensed under Apache 2.0

#### Why I did it

Adds P4RT container to SONiC for PINS

The P4RT app is covered by this HLD:
https://github.com/pins/SONiC/blob/master/doc/pins/p4rt_app_hld.md

#### How I did it

Followed the pattern and templates used for other SONiC applications

#### How to verify it

Build SONiC with INCLUDE_P4RT set to "y".
Verify that the resulting build has a container called "p4rt" running.
You can verify that the service is up by running the following command on the SONiC switch:
```bash
sudo netstat -lpnt | grep p4rt
```
You should see the service listening on TCP port 9559.

#### Which release branch to backport (provide reason below if selected)

None

#### Description for the changelog

Build P4RT container for PINS
2021-12-07 11:11:25 -08:00
Cosmin-Jinga-MS
c5d0df1b51
[Yang] [CBF Maps] SONiC CBF MAPs Yang (#9116)
* SONiC CBF MAPs Yang

    Created SONiC Yang model for the following CBF MAPs:
    DSCP_TO_FC_MAP
    EXP_TO_FC
2021-12-06 11:41:39 -08:00
abdosi
f501311f11
Updated BGP Template for Chassis/Multi-asic (#9291)
Updated BGP Template for the case:
    
   1. For Packet Chassis do not advertise Loopback4096 address into BGP as there is Static Route for same. 
       Having this route in BGP causes two level of recursion in Zebra and cause assert in Zebra 
       when there are many nexthop involved
 
   2. Advertise only P2P Connected IP's into BGP (External Peers). For Packet chassis we have backend IP Interface subnet and if 
        they get advertised into BGP then it also causes recursion
2021-12-06 09:36:24 -08:00
xumia
471a31fce0
[Bug][Build]: fix the file not found issue caused by the relative pat… (#9443)
Fix the nodesource.list cannot read issue, it is cased by the full path not used.

```
2021-12-03T06:59:26.0019306Z Removing intermediate container 77cfe980cd36
2021-12-03T06:59:26.0020872Z  ---> 528fd40e60f6
2021-12-03T06:59:26.0021457Z Step 81/81 : RUN post_run_buildinfo
2021-12-03T06:59:26.0841136Z  ---> Running in d804bd7e1b06
2021-12-03T06:59:29.1626594Z DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
2021-12-03T06:59:34.2960105Z /usr/bin/sed: can't read nodesource.list: No such file or directory
2021-12-03T06:59:34.5094880Z The command '/bin/sh -c post_run_buildinfo' returned a non-zero code: 2
```

Co-authored-by: Ubuntu <xumia@xumia-vm1.jqzc3g5pdlluxln0vevsg3s20h.xx.internal.cloudapp.net>
2021-12-03 21:23:09 -08:00
Prince George
b051a9f56f
[submodule-update] Updating sonic-platform-common submodule (#9412)
c2aac75 [SFP-Refactor] Fix LP mode API issue (#247)
dba17c8 Firmware upgrade CLI support for QSFP-DD transceivers (#244)
cd69212 [SFP-Refactor] Implement CMIS Low Power mode (#237)
9cea07f Fix RegGroupField decode (#245)
6ae1909 Add CMIS QSFP support (#246)
c1f317d Gracefully handle CMIS APIs for passive modules (#238)
ec7335d fix for firmware functions  (#243)
cf2ebe9 Fix RegBitField decode/encode (#242)
ef4f2c6 Fix SFP_CABLE_TECH_FIELD (#240)
e118644 remove time counting message in functions because function running time could be difficult to predict in unit tests (#241)

Signed-off-by: Prince George <prgeor@microsoft.com>
2021-12-02 18:21:55 -08:00
rupesh-k
a3d76bd24e
SONiC Yang model support for Mirror (#7877)
#### Why I did it
Created SONiC Yang model for Mirror.
Tables: MIRROR_SESSION

#### How I did it

Defined Yang models for COPP based on Guideline doc:
https://github.com/Azure/SONiC/blob/master/doc/mgmt/SONiC_YANG_Model_Guidelines.md
and
https://github.com/Azure/sonic-utilities/blob/master/doc/Command-Reference.md

#### How to verify it
'''
============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-3.10.1, py-1.7.0, pluggy-0.8.0
rootdir: /sonic/src/sonic-yang-models, inifile:
plugins: cov-2.6.0
collected 3 items

tests/test_sonic_yang_models.py ..                                       [ 66%]
tests/yang_model_tests/test_yang_model.py .                              [100%]

=============================== warnings summary ===============================

module: sonic-mirror-session
  +--rw sonic-mirror-session
     +--rw MIRROR_SESSION
        +--rw MIRROR_SESSION_LIST* [name]
           +--rw name         string
           +--rw type?        string
           +--rw src_ip?      inet:ipv4-address
           +--rw dst_ip?      inet:ipv4-address
           +--rw gre_type?    string
           +--rw dscp?        uint8
           +--rw ttl?         uint8
           +--rw queue?       uint8
           +--rw dst_port?    -> /port:sonic-port/PORT/PORT_LIST/name
           +--rw src_port?    union
           +--rw direction?   string

'''
2021-12-02 10:52:01 -08:00
xumia
5947406a45
[Build]: Cleanup the reproducible mirrors when build complete (#9132)
Why I did it
The reproducible build mirrors are only used during the build, the mirrors can be removed after that.
2021-12-02 09:04:40 +08:00
Saikrishna Arcot
34328f9f56
[sonic-swss-common]: Submodule update (#9395)
Bring in the following commit:

405f1df Use build profiles instead of distro version for Python 2 binding build (#558)

This change requires a corresponding change in this repo to set a build
profile to not build the python 2 bindings on Bullseye.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2021-12-01 10:14:13 -08:00
kellyyeh
f2ee94d201
[dhcp_relay] Update DHCPv6 counter on relayed messages (#9283) 2021-11-30 20:15:30 -08:00
liuh-80
739c45645c
[TACACS+] Add audisp-tacplus for per-command accounting. (#8750)
This pull request integrate audisp-tacplus to SONiC for per-command accounting.

#### Why I did it
To support TACACS per-command accounting, we integrate audisp-tacplus project to sonic.

#### How I did it
1. Add auditd service to SONiC
2. Port and patch audisp-tacplus to SONiC

#### How to verify it
UT with CUnit to cover all new code in usersecret-filter.c
Also pass all current UT.

#### Which release branch to backport (provide reason below if selected)
N/A

#### Description for the changelog
Add audisp-tacplus for per-command accounting.

#### A picture of a cute animal (not mandatory but encouraged)
2021-12-01 11:50:09 +08:00
Junchao-Mellanox
06a61dede0
[YANG] Add trap flow counter to yang model (#9353)
*[YANG] Add trap flow counter to yang model
2021-11-30 17:52:34 -08:00
vganesan-nokia
78de10713c
[voq-chassis][bgpcfg] VOQ_BGP_CHASSIS_NEIGHBORS timers default (#8455)
The BGP_VOQ_CHASSIS_NEIGHBOR keepalive and holdtime timers are
configured similar to general neighbors. Changes are done to configure
BGP_VOQ_CHASSIS_NEIGHBOR timers similar to BGP_INTENAL_NEIGBOR since voq
chassis bgp neighbors are similar to bgp internal neighbors in
multi-asic. As it is done for bgp internal neighbors, the keepalive and
holdtime timers are set to 3 and 10 seconds respectively. Also similar
to bgp internal neighbors, connection retry timer is also configured for
voq chassis bgp neighbors.

Signed-off-by: vedganes <vedavinayagam.ganesan@nokia.com>
2021-11-30 12:10:27 -08:00
Mahesh Maddikayala
bfef686d64
[sonic-py-common][device info] Check for None before accessing the ASIC type (#9290) 2021-11-30 11:12:48 -08:00
noaOrMlnx
0908f9ec49
[CoPP] Add always_enabled field (#9302)
*Add the "always_enabled" field to copp_cfg.j2 file, in order to allow traps without an entry in features table, to be installed automatically.
2021-11-30 11:04:15 -08:00
Shi Su
4b357044b3
[bgpcfgd] Add bgpcfgd support to advertise routes (#9197)
Why I did it
Add bgpcfgd support to advertise routes.

How I did it
Make bgpcfgd subscribe to the ADVERTISE_NETWORK table in STATE_DB and configure route advertisement accordingly.

How to verify it
Added unit tests in bgpcfgd and verify on KVM about route advertisement.
2021-11-29 23:17:57 -08:00
Preetham
858f430f94
Routed subinterface enhancements (#8761)
* Routed subinterfae enhancements HLD #833
* Adding python API support to get routed subinterface long name to get correct parent interface for the routed subinterface.
2021-11-29 09:13:16 -08:00
Stephen Sun
ba853348d5
[Reclaim buffer] Reclaim unused buffers by applying zero buffer profiles (#8768)
Signed-off-by: Stephen Sun stephens@nvidia.com

Why I did it
Support zero buffer profiles

Add buffer profiles and pool definition for zero buffer profiles
Support applying zero profiles on INACTIVE PORTS
Enable dynamic buffer manager to load zero pools and profiles from a JSON file
Dependency: It depends on Azure/sonic-swss#1910 and submodule advancing PR once the former merged.

How I did it
Add buffer profiles and pool definition for zero buffer profiles

If the buffer model is static:
Apply normal buffer profiles to admin-up ports
Apply zero buffer profiles to admin-down ports
If the buffer model is dynamic:
Apply normal buffer profiles to all ports
buffer manager will take care when a port is shut down
Update buffers_config.j2 to support INACTIVE PORTS by extending the existing macros to generate the various buffer objects, including PGs, queues, ingress/egress profile lists

Originally, all the macros to generate the above buffer objects took active ports only as an argument
Now that buffer items need to be generated on inactive ports as well, an extra argument representing the inactive ports need to be added
To be backward compatible, a new series of macros are introduced to take both active and inactive ports as arguments
The original version (with active ports only) will be checked first. If it is not defined, then the extended version will be called
Only vendors who support zero profiles need to change their buffer templates
Enable buffer manager to load zero pools and profiles from a JSON file:

The JSON file is provided on a per-platform basis
It is copied from platform/<vendor> folder to /usr/share/sonic/temlates folder in compiling time and rendered when the swss container is being created.
To make code clean and reduce redundant code, extract common macros from buffer_defaults_t{0,1}.j2 of all SKUs to two common files:

One in Mellanox-SN2700-D48C8 for single ingress pool mode
The other in ACS-MSN2700 for double ingress pool mode
Those files of all other SKUs will be symbol link to the above files

Update sonic-cfggen test accordingly:

Adjust example output file of JSON template for unit test
Add unit test in for Mellanox's new buffer templates.

How to verify it
Regression test.
Unit test in sonic-cfggen
Run regression test and manually test.
2021-11-29 08:04:01 -08:00
vdahiya12
7077474b54
[sonic-platform-daemons] submodule update (#9361)
[xcvrd] Fix Typo for initialization of post_sfp and deinit for xcvrd (#224)

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
2021-11-26 06:33:18 +05:30
Ze Gan
ada0e50218
[iproute2]: Add macsec-xpn-support iproute2 in syncd (#8702)
* Add macsec-xpn-support iproute2 in syncd

Signed-off-by: Ze Gan <ganze718@gmail.com>

* Polish code

Signed-off-by: Ze Gan <ganze718@gmail.com>

* Remove useless files

Signed-off-by: Ze Gan <ganze718@gmail.com>

* Add self-compiled iproute2 to docker sonic vs

Signed-off-by: Ze Gan <ganze718@gmail.com>

* Enhance apt install for iproute2 dependencies

Signed-off-by: Ze Gan <ganze718@gmail.com>
2021-11-25 21:38:17 +08:00
Jing Zhang
879c18417a
[sonic-linkmgrd] submodule update (#9338)
Submodule update for sonic-linkmgrd
Incorporates:

c11a576 (2021-11-22 09:38:46) [ci]: show code coverage in azure pipeline (#4)
4ceb01d (2021-11-18 20:24:20) Fix MUX toggling issue (#1)
d640527 (2021-11-12 22:31:44) [ci]: fix artifact download
b9f247d (2021-11-12 22:31:44) [ci]: use native arm64/armhf build
3059122 (2021-09-27 11:32:23) [linkgrd] Add Missing Apache License Header
2021-11-24 23:55:17 -08:00
ganglyu
adf1990dd2
[yang]: Add admin_status to BGP_NEIGHBOR_TEMPLATE_LIST. (#9341)
Add admin_status to BGP_NEIGHBOR_TEMPLATE_LIST.

Signed-off-by: Gang Lv ganglv@microsoft.com
2021-11-24 23:54:19 -08:00
arlakshm
5830852832
remove staticd.conf.j2 (#9182)
Why I did it
resolves #8979 and #9055

How I did it
Remove the file static.conf.j2,which adds the default route on eth0 from bgp docker

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
2021-11-24 15:32:16 -08:00
Junchao-Mellanox
a5336e123a
[submodule] Update submodule for sonic-sairedis (#9354)
sai-redis submodule update:

69517ba [lgtm] Add gmock libs to lgtm (#973)
a7c8cfa [FlexCounter] Add trap flow counter support (#954)
3304daa [vslib]: Add MACsec xpn support (#924)
a3143da Add ACL_TABLE object to break-before-make list (#970)
05a06a4 Update SAI with saiserver fix (#966)
e4180e0 [VS test] Increase test timeout (#967)
70e6491 Fix hung issue when installing linux kernel modules (#969)
2021-11-24 15:17:47 -08:00
Vivek Reddy
80dfbc85c8
update sonic-utilities submodule (#9360)
a0bff26a [acl-loader] modify acl-loader with change in STATE DB ACL capability table (#1896)
a395e284 [debug dump util] Changes for EVPN and VxLAN dump module (#1892)
02a98ef1 [debug dump util] Route Module added (#1913)
ac8382fd [generic-config-updater] Logging change just before applying it (#1934)
9ab6c515 [flex counter] Flex counter threads consume too much CPU resources. #9202 (#1925)
2ec47a59 [generic-config-updater] Handling empty tables while sorting a patch (#1923)
fdedcbf6 [fdbshow]: Handle FDB cleanup gracefully. (#1926)
e7535ae3 [sonic-cli-gen] first phase implementation of the SONiC CLI Auto-generation tool (#1644)

Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
2021-11-24 11:11:31 -08:00
abdosi
950ec3e68b
Added option to enable/disable Static Route Advertisement (#9298)
What I did:

Added option 'advertise':'true'/'false' to STATIC_TALE to control whether given route need to be advertise into BGP.

How I did:

Add a route in FRR with tag (1 for advertise and 2 for not advertise)
Create Route Map to match on tag as 1 and permit
Attach route-map to redistribute static.
Minigraph option to parse advertise option of Static Route.
2021-11-24 09:43:37 -08:00
Stephen Sun
9c4b787d91
[sonic-swss] Advance submodule (#9288)
bb0733aa [aclorch] Add ACL_TABLE_TYPE configuration  (#1982)
59cab5d9 Support for setting switch level DSCP to TC QoS map (#2023)
da21172e [aclorch] add generic AclOrch::updateAclRule() method (#1993)
4f6cb055 [Reclaiming buffer] Support reclaiming buffer in traditional model (#2011)
32d7a69e [Reclaiming buffer] Common code update (#1996)
b91d8ba7 [swss] L2 Forwarding Enhancements (#1716)
797dab41 [muxorch] Bind all ports to drop ACL table (#2027)
99929cd7 [lgtm.yml] add libgmock-dev (#2035)
8727ae5c [flex counter] Flex counter threads consume too much CPU resources #9202 (#2031)
103fdf05 Remove redundant calls to get child scheduler group during initialization (#1965)
18ea8404 [macsec]: MACsec statistics support (#1867)
0c462420 [orchagent] Flush pipeline every 1 second, not only when select will timeout (#2003)
339101cf [cbf] Add class-based forwarding support (#1963)
24a615bd Fix issue: accumulative headroom can exceed limit in rare scenario (#2020)
708e232a Test divide by zero processing path (#2028)
8f1d035c [macsecmgr]: Wait for port up before enabling macsec (#2032)
4912a770 Remove buffer drop counter when port is removed (#1860)
f9462c49 [Dynamic buffer] [Mellanox] Calculate the peer response time according to the speed (#1930)
8b5a401e Routed subinterface enhancements (#2017)
cdea5e9b Fix next hop compilation (#2025)
37c197d0 [SRV6] Sonic-swss changes for SRV6 (#1964)
f502c320 [vnetorch] Add ECMP support for vnet tunnel routes (#1960)

Signed-off-by: Stephen Sun <stephens@nvidia.com>
2021-11-24 11:00:42 +02:00
Junchao-Mellanox
11a93d2f92
[system-health] No longer check critical process/service status via monit (#9068)
HLD updated here: https://github.com/Azure/SONiC/pull/887

#### Why I did it

Command `monit summary -B` can no longer display the status for each critical process, system-health should not depend on it and need find a way to monitor the status of critical processes. The PR is to address that. monit is still used by system-health to do file system check as well as customize check.

#### How I did it

1.	Get container names from FEATURE table
2.	For each container, collect critical process names from file critical_processes
3.	Use “docker exec -it <container_name> bash -c ‘supervisorctl status’” to get processes status inside container, parse the output and check if any critical processes exit

#### How to verify it

1. Add unit test case to cover it
2. Adjust sonic-mgmt cases to cover it
3. Manual test
2021-11-23 15:47:48 -08:00
Prince George
2bf2e870fd
[submodule-update]: Update sonic-platform-common (#9352)
Signed-off-by: Prince George <prgeor@microsoft.com>
2021-11-23 20:46:02 +05:30
donNewtonAlpha
d063c7dec9
[sonic-swss-common] submodule update (#9322)
[sonic-swss-common] submodule update:
95aec72 2021-11-19 [PINS] Add Bazel support for external projects (#557)
1dfe06f 2021-11-18 P4Runtime : Status Code additions (#545)
8c93532 2021-11-18 Ported Marvell armhf build on amd64 host for debian buster to use cross-comp… (#501)
74264d9 2021-11-17 [PINS] Add AppDB ACL schema values shared between the P4RT app and P4Orch (#556)
a18618f 2021-11-15 [schema] Add vnet route tunnel and advertise network tables for state db (#560)
155770e 2021-11-12 [VS test] Increase test timeout (#559)
2b11dea 2021-11-08 [PINS] Update Redis schema to match P4Orch (#548)
be7d483 2021-11-08 [schema] add ACL_TABLE_TYPE table (#546)

Signed-off-by: Don Newton <don@opennetworking.org>
2021-11-23 07:11:49 -08:00
Mayank Maheshwari
5f235a9638
[yang_models]: Update extension yang and types yang with new yang ext… (#6861)
* [yang_models]: Update extension yang and types yang with new yang extensions and types respectively.
* [YANG] Added CVL specific type and moved sonic-types to j2 template.
2021-11-22 19:45:13 -08:00
Stepan Blyshchak
368b038b75
[sonic-acl] add ACL_TABLE_TYPE table (#9052)
* [sonic-acl] add ACL_TABLE_TYPE table

I implemented ACL table type concept. Till this change, there are predefined ACL table types orchagent knows about (L3, L3V6, etc.) and if other orch requires a custom table a new table type needs to be defined in aclorch.
This PR addresses this limitation by introducing AclTableType which can be constructed from a set of matches, actions and bpoint types user needs. There is also a new handler for ACL_TABLE_TYPE table which is used for user to define table types.
Currently, some of built-in ACL table types that requires special handling are distinguished from others by their names (TABLE_TYPE_MIRROR, TABLE_TYPE_MIRRORV6) and a special handling is performed by an AclOrch.
Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
2021-11-23 10:33:42 +08:00
xumia
848a1710b0
[Build]: Fix the version not found issue (#9331)
When we update the a sai package downing from a remote server, we need to update the version file as well currently, but the reproducible build feature is not enabled in master, it can only be detected when merging the code into the release branches, such as 202106, 202012, etc.
The reproducible feature is to reduce the build failure, not need to break the build when the version not specified. If version not specified, the best choice is to accept the version from remote server.

Co-authored-by: Ubuntu <xumia@xumia-vm1.jqzc3g5pdlluxln0vevsg3s20h.xx.internal.cloudapp.net>
2021-11-22 12:18:32 -08:00
Vivek Reddy
01b239a761
[sonic-utilities] update sonic-utilities submodule (#9268)
a3e34e30 [Auto Techsupport] Event driven Techsupport Changes (#1796)
efa2ff62 [show][platform summary] Add chassis type in the platform summary output(#1922)
a39350c6 [aclshow] enhance ACL counters to work with FC infrastructure (#1858)
ed880131 [sonic-package-manager] fix registry requests failing when no service field in Bearer fields (#1921)
00b60455 [VS test] Increase test timeout (#1924)
2021-11-22 10:40:54 -08:00
Alexander Allen
d39d1a31ba
[yang] fix yang model tests to run on installed models (#9316)
Previously the Yang model unit tests pulled directly from the Yang model source code for their models. This worked up to a point where we had jinja templates which needed to be rendered before they could be tested on. Now we need to reference the install location of the rendered templates for the unit tests.

Additionally, PBH yang was never added to the list of models to install onto a switch so I have resolved that (another example why pulling directly from the source was not correct)

My best explanation for why we only saw this failing on mellanox was that these tests could not have possibly been running on the broadcom build (I have not investigated this specifically). There was no way for these tests to pass recently given they were referencing Yang models which did not exist in the source (ACL).
2021-11-19 21:16:14 -08:00
Qi Luo
06bf76b5bc
[minigraph] No longer generate the “members” field on the VLAN table in ConfigDB (#9237)
#### Why I did it
This field is deprecated.
Fixes https://github.com/Azure/sonic-buildimage/issues/8306
Fixes https://github.com/Azure/sonic-buildimage/issues/9121
2021-11-18 18:03:11 -08:00
Guohan Lu
c2595189e4
[config-engine]: add option to print verbose debug info in unit tests (#9303)
add option to print verbose debug info in unit tests

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-11-18 09:34:28 -08:00
pettershao-ragilenetworks
0e0772596e
[ragile] support 32c and 4s platform (#8824)
Signed-off-by: pettershao-ragilenetworks pettershao@ragilenetworks.com

What I did it

Add new platform x86_64-ragile_ra-b6510-32c-r0 (Trident 3)
ASIC Vendor: Broadcom
Switch ASIC: Trident 3
Port Config: 32x100G

Add new platform x86_64-ragile_ra-b6920-4s-r0 (Tomahawk 3)
ASIC Vendor: Broadcom
Switch ASIC: Tomahawk 3
Port Config: 128x100G

-How I did it
Provide device and platform related files.

-How to verify it
show platform fan
show platform ssdhealth
show platform psustatus
show platform summary
show platform syseeprom
show platform temperature
show interface status
2021-11-17 23:49:06 -08:00
Mahesh Maddikayala
3025a1f8cb
[sonic-py-common][chassis] Include chassis platform when checking for internal connections (#9264) 2021-11-16 14:13:19 -08:00
Prince George
c302f490ff
[submodule]:Update sonic-platform-common submodule (#9256)
c8eceec 400zr initial support (#228)
ef55364 SSD Health: Retrieve SSD health and temperature values from generic SSD info (#229)
26c8346 Fix cmis cable length issue (#225)
671927d Fix typo in the simulated y_cable driver (#226)
51a9aca [sfp-refactor] Add initial support for CMIS in sonic_xcvr (#220)

Signed-off-by: Prince George <prgeor@microsoft.com>
2021-11-16 09:15:05 -08:00
Shi Su
7f45af9710
[YANG] Add YANG model for synchronous mode (#9194)
Add YANG model leaf for synchronous mode and default value
2021-11-15 21:57:12 -08:00
Vivek Reddy
ff32ac3ed4
[Auto Techsupport] Event driven Techsupport Changes (#8670)
#### Why I did it

Changes required for feature "Event Driven TechSupport Invocation & CoreDump Mgmt". [HLD](https://github.com/Azure/SONiC/pull/818 )

Requires: https://github.com/Azure/sonic-utilities/pull/1796.
Merging in any order would be fine.

Summary of the changes:

- Added the YANG Models for the new tables introduces as a part of this feature.
- Enhanced init_cfg.json with the default config required
- Added a compile Time flag which enables/disables the config required for this feature inside the init_cfg.json
- Enhanced the supervisor-proc-exit-listener script to populate `<feature>:<critical_proc> = <comm>:<pid>` info in the STATE_DB when it observes an proc exit notification for the critical processes running inside the docker.
2021-11-15 21:56:37 -08:00
Mahesh Maddikayala
2680491c03
[sonic_py_common][device info] APIs to return chassis type (voq or packet) (#9227) 2021-11-15 09:19:44 -08:00
Stepan Blyshchak
ca3a034e6f
[sonic-sairedis] update submodule (#9233)
6f1a0ea (HEAD, origin/master, origin/HEAD, master) [FlexCounter] Add support for ACL counters (#953)
67b3136 [vslib] fill aclcapability.is_action_list_mandatory field (#957)
eba6a1b [ci]: use native armhf and arm64 pool (#965)
04793b1 [az] Set diff coverage threshold to 50% (#963)
6092d50 [syncd] Add workaround for warm boot new objects (#960)
88b62ce Added Flex Counters support for tunnel counters (#886)
a718226 [Counters] Query Counters Stats Capabilities (#952)
2021-11-15 08:30:29 -08:00
Stepan Blyshchak
0e057a4bb1
[sonic-swss] update submodule (#9232)
```
5f8ebfa (HEAD, origin/master, origin/HEAD, master) [AclOrch] move ACL counters to flex counter infrastructure (#1943)
8119ec0 [bfdorch] Orchagent support hardware BFD (#1883)
15074ac [sonic-swss]:enable unconfiguring PFC on last TC on a port (#1962)
05c7c05 [Mux orch] set default as standby, change mux orch priority (#2010)
fe5b2a9 [pytest]: Ignore errors deleting host ifs (#2005)
70da9af [ci]: use native arm64 and armhf pool (#2013)
e14a071 [qos] Add EXP to TC map support (#1954)
c91a7f2 [switchorch] Implement VXLAN src port range feature  (#1959)
b20f0f4 Gcov for swss daemon (#1737)
01c243a [CRM][MPLS] Fix the mpls nexthop CRM attribute (#2008)
```

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
2021-11-15 07:56:35 -08:00
Guohan Lu
db0b789b73
[submodule]: update sonic-linux-kernel (#9254)
* 6aa8d00 2021-11-12 | marvell-armhf]: add kconfig force inclusion for CONFIG_ARCH_NR_GPIO (#245) (HEAD, origin/master, origin/HEAD) [dflynn-Nokia]
* 39c7d18 2021-11-06 | [arm64]: add kconfig force inclusion for COMPAT_VSDO [Guohan Lu]
* fafaaea 2021-11-06 | [backport] kernel-compat-always-include-linux-compat.h-from-net-compat.patch [Guohan Lu]
* 6ac9b48 2021-10-19 | [ci]: use native arm64/armhf pool to build kernel [Guohan Lu]

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-11-14 12:01:39 -08:00
dflynn-Nokia
df12ac5abd
[build]: marvell-armhf bullseye fixes (#9243)
This commit fixes/avoids the following errors encountered during the
marvell-armhf build for bullseye

- Fix Marvell prestera DMA driver build failure due to kallsyms_lookup_name()
  no longer being exported by the updated bullseye kernel. This is a temporary
  fix that will be replaced by a future version of the DMA driver.

- Update qemu-user-static version to align with the new glibc version included
  in bullseye

- Skip systemd-sonic-generator unit tests to avoid test failures. Root cause is
  still TBD

#### Why I did it
Fix the following build errors observed when building marvell-armhf for bullseye
1. Marvell Prestera DMA driver uses kernel API no longer exported
ERROR: modpost: "kallsyms_lookup_name" [/sonic/platform/marvell-armhf/prestera/mrvl-prestera/cpssEnabler/linuxNoKernelModule/drivers//mvDmaDrv.ko] undefined!

2. Old qemu-user-static version does not support semop() leading to following build failure
semop(1): encountered an error: Function not implemented

3. systemd-sonic-generator unit test failure
ssg-test.cc:217: Failure
Expected equality of these values:
  find_string_in_file(str_t, target, num_asics)
    Which is: false
  expected_result
    Which is: true
Error validating Before=single_inst.service in test.service
[  FAILED  ] SsgMainTest.ssg_main_40_npu (20 ms)
[----------] 4 tests from SsgMainTest (36 ms total)

[----------] Global test environment tear-down
[==========] 10 tests from 3 test suites ran. (54 ms total)
[  PASSED  ] 7 tests.
[  FAILED  ] 3 tests, listed below:
[  FAILED  ] SsgMainTest.ssg_main_single_npu
[  FAILED  ] SsgMainTest.ssg_main_10_npu
[  FAILED  ] SsgMainTest.ssg_main_40_npu

 3 FAILED TESTS
2021-11-13 10:48:58 -08:00
Guohan Lu
19f878f591
Revert "[yang] Add missing device types to the device_metadata yang (#9226)" (#9251)
This reverts commit 2dc94b30bb.
2021-11-12 22:08:58 -08:00
liuh-80
ff09b8b8ed
[TACACS+] Add Bash TACACS+ plugin for per-command authorization. (#8715)
This pull request add a bash plugin for TACACS+ per-command authorization

#### Why I did it
1. To support TACACS per command authorization, we check user command before execute it.
2. Fix libtacsupport.so can't parse tacplus_nss.conf correctly issue:
            Support debug=on setting.
            Support put server address and secret in same row.
3. Fix the parse_config_file method not reset server list before parse config file issue.

#### How I did it
The bash plugin will be called before every user command, and check user command with remote TACACS+ server for per-command authorization.

#### How to verify it
UT with CUnit cover all code in this plugin.
Also pass all current UT.

#### Which release branch to backport (provide reason below if selected)
N/A

#### Description for the changelog
Add Bash TACACS+ plugin.


#### A picture of a cute animal (not mandatory but encouraged)
2021-11-13 09:57:30 +08:00
tjchadaga
645173307a
sonic-platform-daemons submodule update (#9223) 2021-11-12 13:23:12 -08:00
Neetha John
2dc94b30bb
[yang] Add missing device types to the device_metadata yang (#9226)
* Add missing device types to the DEVICE_METADATA type field

Signed-off-by: Neetha John <nejo@microsoft.com>
2021-11-11 19:41:24 -08:00
kellyyeh
a86320a773
DHCPv6 Relay multivlan functionality support (#9178)
Fix support for DHCPV6 Relay multi vlan functionality. Make sure the relayed packet is received at correct interface.

How I did it
Bind a socket to each vlan interface's global and link-local address.
Socket binded to global address is used for relaying data from client to server and receiving data from servers.
Socket binded to link-local address is used for relaying data received from server back to the client.
2021-11-11 17:49:04 -08:00
Vivek Reddy
5826a5c4e7
[submodule] Update sonic-utilities submodule (#9229)
4bcaa602 [generic-config-updater] Adding logging to config-{replace, rollback, checkpoint, list-checkpoints} (#1885)
5e95fc34 [debug dump util] Vlan Module Added (#1877)
7f0bbd99 [debug dump util] Portchannel module added (#1853)
50bbfa0f Removed -t option and other missing fixes (#1884)

update sonic-utilties submodule

Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
2021-11-11 09:22:33 -08:00
Renuka Manavalan
bb92e98bb8
TACACS: Don't send sshd's bad password to AAA (#9123)
When sshd realizes that this login can't succeed due to internal device state
or configuration, instead of failing right there, it proceeds to prompt for
password, so as the user does not get any clue on where is the failure point.

Yet to ensure that this login does not proceed, sshd replaces user provided password
with a specific pattern of characters matching length of user provided password.
This pattern is "INCORRECT", which is bound to fail.

If user provided length is smaller/equal, the substring of pattern is overwritten.
If user provided length is greater, the pattern is repeated until length is exhausted.

But if the PAM-tacacs plugin would send this password to AAA, the user could get
locked out by AAA, for providing incorrect value.

How I did it
Hence this fix, matches obtained password against the pattern. If match, fail just before
reaching AAA server.
2021-11-11 07:46:52 -08:00
Stepan Blyshchak
b8eb9f2769
[sonic-yang-models] add ACL flex counter group (#8909)
Why I did it
To add ACL FC to the YANG model.

How I did it
Added to the YANG model and added a UT.

How to verify it
Together with depends PRs. Run ACL/Everflow test suite.

Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
2021-11-11 09:09:36 +08:00