Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add failure handling for SAI get operations #1768

Merged
merged 12 commits into from
Jul 7, 2021
Merged

Conversation

shi-su
Copy link
Contributor

@shi-su shi-su commented Jun 4, 2021

What I did
Add failure handling for SAI get operations. The function allows handling failures in SAI get operations according to the orch type, SAI type, SAI status.

Why I did it
Enable custom failure handling for SAI get operations.

How I verified it

Details if related

@shi-su
Copy link
Contributor Author

shi-su commented Jun 14, 2021

/Azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@shi-su
Copy link
Contributor Author

shi-su commented Jun 22, 2021

/Azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@shi-su
Copy link
Contributor Author

shi-su commented Jun 24, 2021

/Azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@shi-su shi-su marked this pull request as ready for review June 29, 2021 20:01
@shi-su shi-su requested a review from prsunny as a code owner June 29, 2021 20:01
@shi-su shi-su requested a review from qiluo-msft June 29, 2021 20:01
orchagent/aclorch.cpp Outdated Show resolved Hide resolved
orchagent/aclorch.cpp Outdated Show resolved Hide resolved
orchagent/fdborch.cpp Outdated Show resolved Hide resolved
orchagent/fgnhgorch.cpp Outdated Show resolved Hide resolved
orchagent/orch.cpp Outdated Show resolved Hide resolved
orchagent/portsorch.cpp Outdated Show resolved Hide resolved
orchagent/portsorch.cpp Outdated Show resolved Hide resolved
orchagent/portsorch.cpp Outdated Show resolved Hide resolved
orchagent/portsorch.cpp Outdated Show resolved Hide resolved
orchagent/portsorch.cpp Outdated Show resolved Hide resolved
orchagent/portsorch.cpp Outdated Show resolved Hide resolved
orchagent/portsorch.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

As comments

@@ -115,6 +115,7 @@ NatOrch::NatOrch(DBConnector *appDb, DBConnector *stateDb, vector<table_name_wit
if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_NOTICE("Failed to get the SNAT available entry count, rv:%d", status);
handleSaiGetStatus(SAI_API_SWITCH, status);
Copy link
Contributor

@qiluo-msft qiluo-msft Jul 2, 2021

Choose a reason for hiding this comment

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

handleSaiGetStatus

If this get api is not implemented, original code will log and continue, but new code will throw. Is it intended? #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought the change is mainly intended to give enough warning when the SAI API is not implemented. Yet I do agree that this is not necessary for the scenarios where it could proceed without successful execution of the get operations. Removed the handling here and a few other similar scenarios.

qiluo-msft
qiluo-msft previously approved these changes Jul 4, 2021
@qiluo-msft
Copy link
Contributor

Please fix the conflicts

@shi-su
Copy link
Contributor Author

shi-su commented Jul 5, 2021

Please fix the conflicts

Done. Please help review again. Thanks.

@shi-su shi-su requested a review from qiluo-msft July 5, 2021 00:47
@shi-su shi-su merged commit 5295f91 into sonic-net:master Jul 7, 2021
judyjoseph pushed a commit that referenced this pull request Aug 10, 2021
What I did
Add failure handling for SAI get operations. The function allows handling failures in SAI get operations according to the orch type, SAI type, SAI status.

Why I did it
Enable custom failure handling for SAI get operations.
shi-su added a commit to shi-su/sonic-swss that referenced this pull request Aug 17, 2021
What I did
Add failure handling for SAI get operations. The function allows handling failures in SAI get operations according to the orch type, SAI type, SAI status.

Why I did it
Enable custom failure handling for SAI get operations.
shi-su added a commit to shi-su/sonic-swss that referenced this pull request Aug 17, 2021
What I did
Add failure handling for SAI get operations. The function allows handling failures in SAI get operations according to the orch type, SAI type, SAI status.

Why I did it
Enable custom failure handling for SAI get operations.
shi-su added a commit that referenced this pull request Aug 18, 2021
What I did
Backport SAI failure handling related commits into the 202012 branch. The following is a list of backported commits:

941875a Deactivate mirror session only when session status is true in updateLagMember (#1666)
be12482 Ignore ALREADY_EXIST error in FDB creation (#1815)
c9c1aa2 Add failure handling for SAI get operations (#1768)
47b4276 [BufferOrch] Don't call SAI API for BUFFER_POOL/PROFILE handling in case the op is DEL and the SAI OID is NULL (#1786)
db9238f Add failure notification for orchagent (#1665)
fc8e43f [synchronous mode] Add failure notification for SAI failures in synchronous mode (#1596)

Why I did it
202012 image needs to include failure handling mechanism for enough notification in the presence of SAI failures.
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-swss that referenced this pull request Oct 5, 2021
What I did
Add failure handling for SAI get operations. The function allows handling failures in SAI get operations according to the orch type, SAI type, SAI status.

Why I did it
Enable custom failure handling for SAI get operations.
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
…ers enablement after fast-reboot (sonic-net#1768)

#### What I did
Set flex counters delay indicator to prevent flex counters enablement after fast-reboot.

#### How I did it
Modify config DB json file with 'true' status for delay of flex counters indicator.

#### How to verify it
Run fast-reboot and observe counters are created only when enable_counters script is called, even if the tables are present in config DB.
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.

3 participants