Skip to content

Updated test_po_cleanup.py for multi-asic platforms.#3069

Merged
abdosi merged 10 commits intosonic-net:masterfrom
abdosi:pc
Mar 10, 2021
Merged

Updated test_po_cleanup.py for multi-asic platforms.#3069
abdosi merged 10 commits intosonic-net:masterfrom
abdosi:pc

Conversation

@abdosi
Copy link
Copy Markdown
Contributor

@abdosi abdosi commented Mar 1, 2021

What/Why I did:

  • Enhanced test_po_cleanup.py for multi-asic platforms.
  • Also instead of stopping teamd stopping swss. This is done because when we stop teamd swss sends continuously lot of Error message like below because of which logAnalyzer is not able to capture end marker message in /tmp/syslog which is resulting VS test failure. This does not happen consistently and will need further debug. With this change /tmp/syslog size reduce from Mb to Kb
Mar  3 22:58:27.071962 vlab-01 ERR swss#orchagent: :- removeLag: Failed to remove ref count 3 LAG PortChannel0002
Mar  3 22:58:27.071962 vlab-01 ERR swss#orchagent: :- removeLag: Failed to remove ref count 3 LAG PortChannel0003
Mar  3 22:58:27.071962 vlab-01 ERR swss#orchagent: :- removeLag: Failed to remove ref count 3 LAG PortChannel0004
Mar  3 22:58:27.072054 vlab-01 ERR swss#orchagent: :- removeLag: Failed to remove ref count 3 LAG PortChannel0001
Mar  3 22:58:27.072054 vlab-01 ERR swss#orchagent: :- removeLag: Failed to remove ref count 3 LAG PortChannel0002
Mar  3 22:58:27.072054 vlab-01 ERR swss#orchagent: :- removeLag: Failed to remove ref count 3 LAG PortChannel0003
Mar  3 22:58:27.072054 vlab-01 ERR swss#orchagent: :- removeLag: Failed to remove ref count 3 LAG PortChannel0004
Mar  3 22:58:27.077367 vlab-01 ERR swss#orchagent: :- removeLag: Failed to remove ref count 3 LAG PortChannel0001
Mar  3 22:58:27.077367 vlab-01 ERR swss#orchagent: :- removeLag: Failed to remove ref count 3 LAG PortChannel0002
Mar  3 22:58:27.077367 vlab-01 ERR swss#orchagent: :- removeLag: Failed to remove ref count 3 LAG PortChannel0003
Mar  3 22:58:27.077367 vlab-01 ERR swss#orchagent: :- removeLag: Failed to remove ref count 3 LAG PortChannel0004
Mar  3 22:58:27.082845 vlab-01 ERR swss#orchagent: :- removeLag: Failed to remove ref count 3 LAG PortChannel0001

How I did:
Run the test case on all the asic's.

How I verify:
Verified on both single and multi-asic platforms.

@abdosi abdosi requested a review from a team as a code owner March 1, 2021 22:58
@abdosi abdosi requested a review from judyjoseph March 1, 2021 22:59
abdosi added 2 commits March 1, 2021 22:34
Signed-off-by: Abhishek Dosi <[email protected]>
Signed-off-by: Abhishek Dosi <[email protected]>
def check_kernel_po_interface_cleaned(duthost, asic_index):
namespace = duthost.get_namespace_from_asic_id(asic_index)
res = duthost.shell(duthost.get_linux_ip_cmd_for_namespace("ip link show | grep -c PortChannel", namespace),module_ignore_errors=True)["stdout_lines"][0].decode("utf-8")
return res == '0'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine but would be good to generalize by overriding "shell" (similar to command) in sonic_asic.py and use something like the following. Up to you.

duthost.asic_instance(enum_asic_index).shell(ip link show | grep -c PortChannel", module_ignore_errors=True)

Copy link
Copy Markdown
Contributor

@smaheshm smaheshm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: Just wait for tests to pass.

duthost = duthosts[rand_one_dut_hostname]
mg_facts = duthost.get_extended_minigraph_facts(tbinfo)

if len(mg_facts['minigraph_portchannels'].keys()) == 0:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would need to check this per namespace/asic_index now ? as the test_po_cleanup is run per asic

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@judyjoseph updated.
Will still check only once and not per asic and for multi-asic it will always run as backend is always port-channel.

Signed-off-by: Abhishek Dosi <[email protected]>
@abdosi
Copy link
Copy Markdown
Contributor Author

abdosi commented Mar 10, 2021

/Azurepipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@abdosi
Copy link
Copy Markdown
Contributor Author

abdosi commented Mar 10, 2021

/Azurepipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@abdosi abdosi merged commit 17dc195 into sonic-net:master Mar 10, 2021
@abdosi abdosi deleted the pc branch March 10, 2021 20:24
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…atically (sonic-net#17757)

#### Why I did it
src/sonic-utilities
```
* 651a80b1 - (HEAD -> 202305, origin/202305) Modify teamd retry count script to base BGP status on default BGP status (sonic-net#3069) (22 hours ago) [Saikrishna Arcot]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants