[portsorch]: Don't print error when alias equal to PortConfigDone#503
Conversation
…:PortConfigDone error
|
|
||
| Port p; | ||
| if (!getPort(alias, p)) | ||
| if (!getPort(alias, p) && alias != "PortConfigDone") |
There was a problem hiding this comment.
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.
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.
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.
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.
There was a problem hiding this comment.
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.
|
|
||
| Port p; | ||
| if (!getPort(alias, p)) | ||
| if (!getPort(alias, p) && alias != "PortConfigDone") |
There was a problem hiding this comment.
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 <stepanb@mellanox.com> * [generate_dump] add specific error codes Signed-off-by: Stepan Blyschak <stepanb@mellanox.com> * [generate_dump] exclude mellanox folders in /etc/ Signed-off-by: Stepan Blyschak <stepanb@mellanox.com> * [generate_dump] disable logrotate during log collection Signed-off-by: Stepan Blyschak <stepanb@mellanox.com> * [generate_dump] add +w for procfs dump files Signed-off-by: Stepan Blyschak <stepanb@mellanox.com> * [generate_dump] SINCE_DATE is epoch by default Signed-off-by: Stepan Blyschak <stepanb@mellanox.com> * [generate_dump] change find_logs to find_files Signed-off-by: Stepan Blyschak <stepanb@mellanox.com> * [generate_dump] add mstdump Signed-off-by: Stepan Blyschak <stepanb@mellanox.com> * [generate_dump] fix noop mode when generating sai/sdk/fw dump Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
…:PortConfigDone error (sonic-net#503)
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