Commit Graph

1926 Commits

Author SHA1 Message Date
Judy Joseph
2c440dba43 Update sonic-platform-daemons
c98aba3 [psud] Fix PSU log issue (#235)
60e9682 [ledd] prevent led crash on recirc port event (#232)
2022-01-22 22:51:32 -08:00
Judy Joseph
41baeef63c Update sonic-platform-common
937cf1a [ssd] Allow individual vendor parsers to handle errors (#252)
2022-01-22 22:50:29 -08:00
liuh-80
60e730990e [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-22 22:42:37 -08:00
ganglv
dcbcb9d0b3 [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-22 22:42:19 -08:00
ganglv
17707c3a26 [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-22 22:42:16 -08:00
ganglv
e8368e6545 [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-22 22:42:13 -08:00
ganglv
234c4aa317 [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-22 22:42:04 -08:00
Aravind Mani
1e65be333d [DPB] Fix verbose mode issue (#9772) 2022-01-22 22:40:34 -08:00
nkelapur
907629ed22 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-22 22:40:22 -08:00
Stepan Blyshchak
ea421c14d7 [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>
2022-01-22 22:40:16 -08:00
Anish Narsian
20f39ba0a4 [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-22 22:40:09 -08:00
Lawrence Lee
69a381affc [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-22 22:39:58 -08:00
Qi Luo
199ba9f99d [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-16 22:44:48 -08:00
abdosi
beaeda87f5 [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-16 22:44:41 -08:00
Judy Joseph
4ccde917c1 Update sonic-utilities
dd71848 [GCU] Show default option for '--format' (#2003)
f296e76 [GCU] Disallowing DeleteInsteadOfReplaceMoveExtender from generating delete whole config move (#2006)
731d643 [flow counter] Fix issue: should not compare str with int (#2001)
e628f01 Support CLI for buffer queue configuration (#1965)
585fd40 Fix show ip bgp nei command rw required issue (#2011)
2022-01-16 22:43:24 -08:00
Judy Joseph
382efce11a sonic-swss submodule update
a6d35de Handling Invalid CRM configuration gracefully (#2109)
d6559e6 [Mellanox] '_8lane' not added to Mellanox 5xxx models with 800G (#2090)
45551b2 [vnetorch] Advertise vnet tunnel routes (#2058)
ed58d2f Add initial value for weight in overlay nexthops (#2096)
2022-01-16 22:37:47 -08:00
Judy Joseph
5e61090758 Update sonic-platform-common
576f835 [component] Fix typo for FW_AUTO_ERR_UNKNOWN #254
5985388 Add recycle port to the physical ignore list (#251)
2022-01-16 22:28:06 -08:00
Sudharsan Dhamal Gopalarathnam
a41e0ecb89
[sonic-ztp][202111] Submodule update (#9590)
Update ztp sub module to include the below fixes:
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-16 15:01:22 +02:00
Judy Joseph
3d3b8222cd Update sonic-utilities
51712aa [build-failure-fix][GCU] Sort referrer paths alphabetically (#2015)
2022-01-14 22:53:35 -08:00
Mykola Gerasymenko
3d82e6cf67
[DPB][YANG] Fix cases when boolean is used in different literal cases (#9654)
* Add boolean as typedef to sonic-types
* Fix boolean in sonic-feature yang model
* Fix boolean in sonic-flex_counter yang model

#### Why I did it
It was request to cherry-pick fix from master (#9418) to 202111 branch to fix issue when boolean is used in different literal cases.

#### 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 <interface_name> <breakout_mode>
2022-01-10 14:46:04 -08:00
Judy Joseph
ad7d827a5e Update sonic-utilities submodule
4236bc4 [config reload] Fixing config reload when timer based delayed services are disabled (#1967)
d2514e4 [GCU] Different apply-patch runs should produce same sorted steps (#1988)
2878adb [GCU] Using simulated config instead of target config when validating replace operation in NoDependencyMoveValidator (#1987)
fb8ca98 [GCU] Loading yang-models only once (#1981)
f88ee92 [GCU] Copying config_db before callding sonic_yang.loadData (#1983)
9ed0e91 [GCU] Implementing DryRun by printing patch-sorter steps/imitating config_db (#1973)
b36b5e3 [GCU] Moving PatchSorter unit-test to json file to make it easier to read/maintain (#1977)
c0fa28b [generic-config-updater] Improving CreateOnly validator and marking /LOOPBACK_INTERFACE/LOOPBACK#/vrf_name as create-only (#1969)
0559d04 [generic-config-updater] Adding non-strict mode (#1929)
b07f477 [debug dump util] FDB debug dump util changes (#1968)
6d8757a [warm/fast-reboot] Fix kexec portion to support platforms based on Device Tree (#1966)
cc1409e [Auto Techsupport] Event driven Techsupport Bug Fixes (#1986)
6c48bd5 Fix wrong help message for cable length setting (#1978)
c0bbbe3 [breakout] Fix the check  when port is not present in BREAKOUT_CFG table (#1765)
5bb8cad [doc][DPB] Update DPB related interface breakout command Info (#1438)
e6fd990 [config] Fix 'config reload -l' command to get filename by default (#1611)
bd8f7bb Update swss_ready check to check per namespace swss service (#1974)
5439f94 [soft-reboot] Add support for platforms based on Device Tree (#1963)
7c5810a [config] Add portchannel support  for static route  (#1857)
7cb6a1b preserve old order for config reload (#1964)
20bddbd [Auto-Techsupport] Issues related to Multiple Cores crashing handled (#1948)
2022-01-08 16:56:55 -08:00
anamehra
7c3dcfe0a7 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-08 16:43:46 -08:00
ganglv
5026e22333 [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-08 16:43:28 -08:00
ganglv
664f6d43cd [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
2022-01-08 16:43:20 -08:00
ganglv
ac232a9e95 [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-08 16:43:10 -08:00
ganglv
11ecaedc1e [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
2022-01-08 16:43:01 -08:00
ganglv
c1bef313e2 [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
2022-01-08 16:42:53 -08:00
ganglv
c875cc65f5 [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-08 16:42:27 -08:00
Neetha John
3c20bd8441 [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
2022-01-08 16:38:19 -08:00
MaratGubaiev
7988264519 [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"
2022-01-08 16:38:10 -08:00
ganglyu
98524aef7c [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
2022-01-08 16:38:02 -08:00
arlakshm
a42dc6fc41 [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
2022-01-08 16:37:53 -08:00
Mohamed Ghoneim
9cbdac6ede [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-08 16:37:40 -08:00
Mohamed Ghoneim
013413d9ce [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
2022-01-08 16:37:32 -08:00
Mohamed Ghoneim
3af0f6ab0c [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)
2022-01-08 16:37:21 -08:00
Stephen Sun
6d22c1fda6
[sonic-swss] Submodule update (#9397) (#9685)
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
2022-01-06 09:47:08 -08:00
Judy Joseph
3cbfb08689 Update sonic-utilities submodule
c48c363 Revert "[sonic-package-manager] support sonic-cli-gen and packages with YANG model (#1650)" (#1972)
2022-01-04 18:36:45 -08:00
rupesh-k
90b74d5280 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-26 20:58:37 -08:00
Abhishek
6f406b91ba [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-26 20:58:33 -08:00
arlakshm
4e7550e2bd [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-26 20:58:27 -08:00
Mykola Gerasymenko
ec46a23bc6 [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-26 20:58:00 -08:00
Oleksandr Ivantsiv
546818f414 [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-26 20:57:56 -08:00
Stephen Sun
11571cdbf3 [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-26 20:55:46 -08:00
Aravind Mani
b290b9d10b [Submodule]Update sonic-platform-common submodule (#9466) 2021-12-26 20:55:42 -08:00
Samuel Angebault
65228e39e9 [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-26 20:55:39 -08:00
liuh-80
4e22831fb1 [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-26 20:55:30 -08:00
abdosi
f001104b25 [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-26 20:55:26 -08:00
ganglv
92cfbb270a [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-26 20:54:39 -08:00
xumia
5314ae0ec5 [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-08 21:29:50 +00:00
abdosi
e34c2e4a22 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-08 21:27:31 +00:00