Skip to content

Add portchannel interface changing event count in test#758

Merged
qiluo-msft merged 2 commits intosonic-net:masterfrom
qiluo-msft:qiluo/potime
Dec 12, 2018
Merged

Add portchannel interface changing event count in test#758
qiluo-msft merged 2 commits intosonic-net:masterfrom
qiluo-msft:qiluo/potime

Conversation

@qiluo-msft
Copy link
Copy Markdown
Contributor

@qiluo-msft qiluo-msft commented Dec 11, 2018

Sample output

2018-12-10 19:33:31 : LACP/BGP were down for (extracted from cli):
2018-12-10 19:33:31 : --------------------------------------------------
2018-12-10 19:33:31 :     10.10.247.196 - lacp:   0.000 (0) po_events: (1) bgp v4:   0.000 (0) bgp v6:   0.000 (0)

BTW, the underlying command I am using

ARISTA03T1#show interface port-Channel 1 | json
{
    "interfaces": {
        "Port-Channel1": {
            "lastStatusChangeTimestamp": 1544502263.8816288,

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
Sample output
```
2018-12-10 19:33:31 : LACP/BGP were down for (extracted from cli):
2018-12-10 19:33:31 : --------------------------------------------------
2018-12-10 19:33:31 :     10.10.247.196 - lacp:   0.000 (0) po_events: (1) bgp v4:   0.000 (0) bgp v6:   0.000 (0)
```

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@pavel-shirshov pavel-shirshov left a comment

Choose a reason for hiding this comment

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

as comments

self.wait_until_vlan_cpu_port_down()
self.cancel_timeout()
try:
self.log("Schedule to reboot the remote switch in %s sec" % self.reboot_delay)
Copy link
Copy Markdown
Contributor

@pavel-shirshov pavel-shirshov Dec 11, 2018

Choose a reason for hiding this comment

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

why do we need try block here? #Resolved

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.

It cover many cases. One is:

  1. 'warm-reboot' may fail, and it will throw a KeyboardInterrupt exception
  2. try block catch it and come into final block

Another one is interrupt a long running (or infinite loop) test, we still get some meaningful log output.


In reply to: 240769373 [](ancestors = 240769373)


return is_down_count, sum(res[False]) # summary_downtime

def check_change_time(self, output, entity, what):
Copy link
Copy Markdown
Contributor

@pavel-shirshov pavel-shirshov Dec 11, 2018

Choose a reason for hiding this comment

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

I'd suggest to rename what to more meaningful name #Resolved

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.

How about check_event_count? Or do you prefer else?


In reply to: 240769593 [](ancestors = 240769593)

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.

Offline discussed, seems 'what' is good


In reply to: 240792087 [](ancestors = 240792087,240769593)

@qiluo-msft qiluo-msft merged commit 16aa112 into sonic-net:master Dec 12, 2018
@qiluo-msft qiluo-msft deleted the qiluo/potime branch December 12, 2018 02:14
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
Submodule src/sonic-utilities ae274e5..8237848:
  > [fast/warm reboot] ignore errors after shutting down critical service(s) (sonic-net#761)
  > [neighbor advertiser] raise exception when http endpoint return failure (sonic-net#758)

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
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