[portsorch] process PortsOrch tables in specific order#1108
[portsorch] process PortsOrch tables in specific order#1108qiluo-msft merged 4 commits intosonic-net:masterfrom
Conversation
| } | ||
| } | ||
|
|
||
| void PortsOrch::doTask() |
There was a problem hiding this comment.
doTask [](start = 16, length = 6)
Why you override Orch::doTask()? It will leave tasks in other tables undone. #Closed
There was a problem hiding this comment.
Which tables? everything that m_consumerMap has will be processed #Closed
There was a problem hiding this comment.
I see you are trying to specify drain order. How about reuse Orch::doTask for your second half?
In reply to: 339998153 [](ancestors = 339998153)
There was a problem hiding this comment.
If I reuse Orch::doTask failed items from APP_PORT_TABLE will be processed again, thats why a condition if (consumer == portConsumer) to skip port table was added in second half.
Another scenario - when portsorch processes "PortInitDone" it explicitly returns because other orchs can start their operations. Orch::doTask reuse will make PortsOrch proceed after PortinitDone and configure port attributes like admin status, mtu, speed and so on, before BufferOrch apply buffers so there will be a chance that ports will be operationaly up when buffers are applied.
21e4061 to
7475254
Compare
7475254 to
334040d
Compare
| { | ||
| auto tableName = it.first; | ||
| auto consumer = it.second.get(); | ||
| if (find(tableOrder.begin(), tableOrder.end(), tableName) != tableOrder.end()) |
There was a problem hiding this comment.
find(tableOrder.begin(), tableOrder.end(), tableName) != tableOrder.end() [](start = 12, length = 73)
The code shows if tableName is found in tableOrder, it will be drained.
I guess you wanted to drain ones not found in tableOrder. #Closed
There was a problem hiding this comment.
There was a problem hiding this comment.
You are correct, this is a bug. I'm fixing it.
Test passes because tableOrder contains all tables which PortsOrch uses, so no more tables had to be drained.
|
retest this please |
|
retest this please |
| */ | ||
|
|
||
| for (auto it = 0; it < 4; it++) | ||
| for (auto it = 0; it < 3; it++) |
There was a problem hiding this comment.
make this iteration count as define ? or constexpr ? with proper name
|
According to log from test run on jenkins: The vlan was actually removed but 2 seconds later, by that time the test already finishes with failure. |
|
if its building against sairedis-master, then it can be related to this change: sonic-net/sonic-sairedis#543, its causing vs test to fail, but seems to fail in different test than yours, im investigaiting to fix this |
|
@kcudnik any update? can we move forward with this PR? |
|
Hey, you closed this PR ?? |
|
Please resolve the conflict. #Closed |
0da27e7 to
5dd2275
Compare
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com> Conflicts: tests/mock_tests/portsorch_ut.cpp
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
Don't care if PORT_TABLE was not processed fully, we care about LAG, LAG_TABLE, VLAN and VLAN_TABLE. Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
5dd2275 to
2a71444
Compare
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
|
retest this please |
|
retest vs please |
|
retest this please |
* [portsorch] process PortsOrch tables in specific order * [portsorch] fix other tables not drained and make tableOrder constexpr * [portsorch_ut] fix test according to fix in portsorch Don't care if PORT_TABLE was not processed fully, we care about LAG, LAG_TABLE, VLAN and VLAN_TABLE. * [tests] fix ut after unsuccessful conflict resolution
* [portsorch] process PortsOrch tables in specific order * [portsorch] fix other tables not drained and make tableOrder constexpr * [portsorch_ut] fix test according to fix in portsorch Don't care if PORT_TABLE was not processed fully, we care about LAG, LAG_TABLE, VLAN and VLAN_TABLE. * [tests] fix ut after unsuccessful conflict resolution
What I did
Why I did it
How I verified it
Details if related
To support hitless warm reboot on Mellanox we need to add lag member before any other objects are created that depend on LAG, like RIF