Fix the issue when persistent DVS is used to run pytest which has number of front-panel ports < 32#1373
Conversation
and ports are created dynamically (ref pr: sonic-net/sonic-buildimage#4499). There were two issues: a) since number of dynamic front port can be < 32 test case fails as it expect always 32. Make sure to udpate persitent DVS to always have 32 ports/server link as part of test run and save the current config db b) after test is done persistent DVS need to be moved to original state. Make dure to remove extra port/server link and restore back config db Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Which tests are always expecting 32 ports? I am OK with this change as a short-term fix, but I think the real issue here is that the tests are hard-coded for 32 ports instead of checking in the Config DB. We should open an issue and track this. |
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
@daall . Many test case are using hard-coded server indexing For eg: test_fdb_update.py we use dvs.servers[17].runcmd |
ack, I will open an issue to track this. Thanks for pointing this out! |
|
retest this please |
2 similar comments
|
retest this please |
|
retest this please |
|
retest this please |
1 similar comment
|
retest this please |
|
@lguohan can you review this. |
|
retest this please |
1 similar comment
|
retest this please |
|
maybe we can just check if persistent dvs has 32 ports, if not, then we just abort and say persistent dvs has to be 32 ports instead of reconfiguration here? |
@lguohan i think it is better to keep using existing persistent dvs and we can run pytest on top of that |
Updated Readme Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
|
This pull request introduces 1 alert and fixes 12 when merging d821218 into 879f45b - view on LGTM.com new alerts:
fixed alerts:
|
|
This pull request introduces 1 alert and fixes 12 when merging 6629b67 into 879f45b - view on LGTM.com new alerts:
fixed alerts:
|
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Co-authored-by: Danny Allen <daall@microsoft.com>
|
retest vs please |
…ber of front-panel ports < 32 (sonic-net#1373) * Fix the issue where persistent DVS is used to run pytest and ports are created dynamically (ref pr: sonic-net/sonic-buildimage#4499). There were two issues: a) since number of dynamic front port can be < 32 test case fails as it expect always 32. Make sure to udpate persitent DVS to always have 32 ports/server link as part of test run and save the current config db b) after test is done persistent DVS need to be moved to original state. Make dure to remove extra port/server link and restore back config db Signed-off-by: Abhishek Dosi <abdosi@microsoft.com> * Review Comments fix Signed-off-by: Abhishek Dosi <abdosi@microsoft.com> * Added option for force persitent dvs if port < 32 Updated Readme Signed-off-by: Abhishek Dosi <abdosi@microsoft.com> * Fix LGTM Signed-off-by: Abhishek Dosi <abdosi@microsoft.com> * Fix LGTM and compile error Signed-off-by: Abhishek Dosi <abdosi@microsoft.com> * Update tests/conftest.py Co-authored-by: Danny Allen <daall@microsoft.com> Co-authored-by: Danny Allen <daall@microsoft.com>
Why/What I did
Fix the issue where persistent DVS is used to run pytest
and ports are created dynamically (ref pr#
sonic-net/sonic-buildimage#4499). There were two
issues:
How I verified it
a) Verified Persistent DVS < 32 ports without forcedvs option then abort else DVS restarted with 32 ports.
b) Manually Verified VS Docker has correct interface config/port.ini/ip link after test is completed and restored original config db
c) Verified on host ip netns list has expected server link only after is completed