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

Improve log information when exception is caught in Orch2 class #3401

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

DavidZagury
Copy link
Contributor

@DavidZagury DavidZagury commented Nov 28, 2024

What I did
Add the information regarding which class the exception is originated from when Orch2 catches an exception.

Why I did it
An Exception was thrown, and the error log given was:
ERR swss#orchagent: :- doTask: Logic error: map::at
This gives almost no information on where the exception happened.

How I verified it
Compiled SWSS which I forced an exception to be thrown from addOperation in VxlanTunnelOrch.
The log resulted is:

ERR swss#orchagent: :- doTask: Logic error in 15VxlanTunnelOrch: map::at
Which focus you to a specific class.
Bigger improvement would need a larger refactor.

Details if related

@DavidZagury DavidZagury requested a review from prsunny as a code owner November 28, 2024 09:55
@prsunny prsunny merged commit 390c603 into sonic-net:master Dec 2, 2024
16 of 17 checks passed
@prsunny
Copy link
Collaborator

prsunny commented Dec 2, 2024

Bypassing coverage since its an exception path

bradh352 pushed a commit to bradh352/sonic-swss that referenced this pull request Dec 4, 2024
…c-net#3401)

What I did
Add the information regarding which class the exception is originated from when Orch2 catches an exception.

Why I did it
An Exception was thrown, and the error log given was:
ERR swss#orchagent: :- doTask: Logic error: map::at 
This gives almost no information on where the exception happened.
bradh352 pushed a commit to bradh352/sonic-swss that referenced this pull request Dec 4, 2024
…c-net#3401)

What I did
Add the information regarding which class the exception is originated from when Orch2 catches an exception.

Why I did it
An Exception was thrown, and the error log given was:
ERR swss#orchagent: :- doTask: Logic error: map::at 
This gives almost no information on where the exception happened.
divyachandralekha pushed a commit to divyachandralekha/sonic-swss that referenced this pull request Dec 12, 2024
…c-net#3401)

What I did
Add the information regarding which class the exception is originated from when Orch2 catches an exception.

Why I did it
An Exception was thrown, and the error log given was:
ERR swss#orchagent: :- doTask: Logic error: map::at 
This gives almost no information on where the exception happened.
divyachandralekha pushed a commit to divyachandralekha/sonic-swss that referenced this pull request Dec 12, 2024
…c-net#3401)

What I did
Add the information regarding which class the exception is originated from when Orch2 catches an exception.

Why I did it
An Exception was thrown, and the error log given was:
ERR swss#orchagent: :- doTask: Logic error: map::at 
This gives almost no information on where the exception happened.
@bingwang-ms
Copy link
Contributor

@DavidZagury, @prsunny I added the cherry-pick label for 202411 branch. It will not be cherry-picked to 202405 as it's considered as an enhancement.

@DavidZagury
Copy link
Contributor Author

DavidZagury commented Dec 16, 2024

@DavidZagury, @prsunny I added the cherry-pick label for 202411 branch. It will not be cherry-picked to 202405 as it's considered as an enhancement.

@bingwang-ms there is no need to cherry pick to 202411 as this is already part of the branch. This was merged before the branch out.

mssonicbld pushed a commit to mssonicbld/sonic-swss that referenced this pull request Dec 24, 2024
…c-net#3401)

What I did
Add the information regarding which class the exception is originated from when Orch2 catches an exception.

Why I did it
An Exception was thrown, and the error log given was:
ERR swss#orchagent: :- doTask: Logic error: map::at 
This gives almost no information on where the exception happened.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #3441

mssonicbld pushed a commit that referenced this pull request Dec 24, 2024
What I did
Add the information regarding which class the exception is originated from when Orch2 catches an exception.

Why I did it
An Exception was thrown, and the error log given was:
ERR swss#orchagent: :- doTask: Logic error: map::at 
This gives almost no information on where the exception happened.
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.

5 participants