-
Notifications
You must be signed in to change notification settings - Fork 549
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
[portsorch]: Don't print error when alias equal to PortConfigDone #503
[portsorch]: Don't print error when alias equal to PortConfigDone #503
Conversation
…:PortConfigDone error
@@ -1220,7 +1220,7 @@ void PortsOrch::doPortTask(Consumer &consumer) | |||
} | |||
|
|||
Port p; | |||
if (!getPort(alias, p)) | |||
if (!getPort(alias, p) && alias != "PortConfigDone") |
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: PortConfigDone
and PortInitDone
. 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
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 for PortInitDone
?
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 PortInitDone
because 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.
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.
@@ -1220,7 +1220,7 @@ void PortsOrch::doPortTask(Consumer &consumer) | |||
} | |||
|
|||
Port p; | |||
if (!getPort(alias, p)) | |||
if (!getPort(alias, p) && alias != "PortConfigDone") |
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.
Looks like it is late in the review since it is "merged", but to not calling the getPort unnecessarily , we should use below logic:
if (alias == "PortConfigDone" || !getPort(alias, p))
{
if (alias != "PortConfigDone")
{
SWSS_LOG_ERROR("Failed to get port id by alias:%s", alias.c_str());
}
}
* [techsupport] add option to collect logs since given date Allow user to dump logs newer some specific date to reduce dump archive size e.g: admin@sonic:~$ show techsupport --since=yesterday Signed-off-by: Stepan Blyschak <[email protected]> * [generate_dump] add specific error codes Signed-off-by: Stepan Blyschak <[email protected]> * [generate_dump] exclude mellanox folders in /etc/ Signed-off-by: Stepan Blyschak <[email protected]> * [generate_dump] disable logrotate during log collection Signed-off-by: Stepan Blyschak <[email protected]> * [generate_dump] add +w for procfs dump files Signed-off-by: Stepan Blyschak <[email protected]> * [generate_dump] SINCE_DATE is epoch by default Signed-off-by: Stepan Blyschak <[email protected]> * [generate_dump] change find_logs to find_files Signed-off-by: Stepan Blyschak <[email protected]> * [generate_dump] add mstdump Signed-off-by: Stepan Blyschak <[email protected]> * [generate_dump] fix noop mode when generating sai/sdk/fw dump Signed-off-by: Stepan Blyschak <[email protected]>
Don't print 'orchagent: :- doPortTask: Failed to get port id by alias PortConfigDone error'
What I did
Don't print 'orchagent: :- doPortTask: Failed to get port id by alias PortConfigDone error'
Why I did it
Because this error message was an error
How I verified it
Build swss and run it
Details if related