-
Notifications
You must be signed in to change notification settings - Fork 692
[portsorch]: Don't print error when alias equal to PortConfigDone #503
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
Merged
pavel-shirshov
merged 1 commit into
sonic-net:master
from
pavel-shirshov:pavelsh/portconfigdone
May 14, 2018
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1220,7 +1220,7 @@ void PortsOrch::doPortTask(Consumer &consumer) | |
| } | ||
|
|
||
| Port p; | ||
| if (!getPort(alias, p)) | ||
| if (!getPort(alias, p) && alias != "PortConfigDone") | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like it is late in the review since it is "merged", but to not calling the getPort unnecessarily , we should use below logic: |
||
| { | ||
| SWSS_LOG_ERROR("Failed to get port id by alias:%s", alias.c_str()); | ||
| } | ||
|
|
@@ -1332,7 +1332,9 @@ void PortsOrch::doPortTask(Consumer &consumer) | |
| } | ||
| } | ||
| else | ||
| { | ||
| SWSS_LOG_ERROR("Unknown operation type %s", op.c_str()); | ||
| } | ||
|
|
||
| it = consumer.m_toSync.erase(it); | ||
| } | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PORT_TABLE contains two non-port "flag" entries:
PortConfigDoneandPortInitDone. You will probably want to ignore both.We really need to devise a way to remove them from the table. They don't belong there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Joe, I agree with you, but in this PR I want to make a fast fix of the wrong error message.
I don't want to change the swss architecture in this PR
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood. For this PR I suggest you also ignore
PortInitDone. Do we not see a similar error message forPortInitDone?Changing the underlying architecture is a TODO for the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't see
PortInitDonebecause the code exits from the method as soon as it sees alias 'PortInitDone'.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/Azure/sonic-swss/blob/master/orchagent/portsorch.cpp#L1095
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with you both, we should find a new location in redisDB for all this metadata, or identify a different channel to transfer this state. PortInitDone and PortConfigDone are not the only cases, we also have "CONFIG_DB_INITIALIZED" and i'm sure i'm missing one or two examples more.