Skip to content

[201911][acl] Handle uncaught exception in aclorch#1667

Open
daall wants to merge 2 commits intosonic-net:201911from
daall:backport_exception_handler
Open

[201911][acl] Handle uncaught exception in aclorch#1667
daall wants to merge 2 commits intosonic-net:201911from
daall:backport_exception_handler

Conversation

@daall
Copy link
Contributor

@daall daall commented Mar 9, 2021

Signed-off-by: Danny Allen daall@microsoft.com

What I did
I added a catch statement to prevent orchagent from crashing if an invalid field combination is provided.

Why I did it
#1486 added a catch to prevent orchagent from crashing if an invalid field combination is provided, however this was not brought into 201911.

How I verified it
Pass in something illegal like a rule for a MIRROR table with a PACKET_ACTION and verify that orchagent reports an error to the syslog without crashing.

Details if related

Signed-off-by: Danny Allen <daall@microsoft.com>
{
newRule = AclRule::makeShared(type, this, m_mirrorOrch, m_dTelOrch, rule_id, table_id, t);
}
catch (exception &e)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exception [](start = 19, length = 9)

exception type is too generic and possibly hide code bug. Could you list all possible excpetion types?
This comment is also applicable to master branch. So if you found better solution, let's start a PR on master first.

EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
…net#1667)

* Port Module and UT Added
What I did
HLD for Dump Utility: HLD.
For More Info on adding new modules, Check this section in the HLD:
MatchInfra
Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
What I did
Implemented vlan and vlan_member modules for debug dump utility.

How I did it
Used infrastructure and followed examples in
sonic-net#1666
sonic-net#1667
sonic-net#1668
sonic-net#1669
sonic-net#1670

How to verify it
On switch: dump state vlan <vlan_name>
dump state vlan_member '<vlan_name|<member_name>'
Unit test: pytest-3 dump_tests/module_tests/vlan_test.py (same test file covers both vlan and vlan_member)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants