Skip to content

Workaround python2 bug on strptime with threading#911

Merged
qiluo-msft merged 1 commit intosonic-net:masterfrom
qiluo-msft:qiluo/strptime
May 11, 2019
Merged

Workaround python2 bug on strptime with threading#911
qiluo-msft merged 1 commit intosonic-net:masterfrom
qiluo-msft:qiluo/strptime

Conversation

@qiluo-msft
Copy link
Contributor

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "ptftests/advanced-reboot.py", line 769, in peer_state_check
    self.fails[ip], self.info[ip], self.cli_info[ip], self.logs_info[ip] = ssh.run()
  File "ptftests/arista.py", line 157, in run
    log_data = self.parse_logs(log_lines)
  File "ptftests/arista.py", line 218, in parse_logs
    result_bgp, initial_time_bgp = self.extract_from_logs(bgp_r, data)
  File "ptftests/arista.py", line 205, in extract_from_logs
    raw_data.append((datetime.datetime.strptime(m.group(1), "%b %d %X"), m.group(2), m.group(3)))
AttributeError: 'module' object has no attribute '_strptime'

```
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "ptftests/advanced-reboot.py", line 769, in peer_state_check
    self.fails[ip], self.info[ip], self.cli_info[ip], self.logs_info[ip] = ssh.run()
  File "ptftests/arista.py", line 157, in run
    log_data = self.parse_logs(log_lines)
  File "ptftests/arista.py", line 218, in parse_logs
    result_bgp, initial_time_bgp = self.extract_from_logs(bgp_r, data)
  File "ptftests/arista.py", line 205, in extract_from_logs
    raw_data.append((datetime.datetime.strptime(m.group(1), "%b %d %X"), m.group(2), m.group(3)))
AttributeError: 'module' object has no attribute '_strptime'

```
@qiluo-msft qiluo-msft merged commit eb21a7f into sonic-net:master May 11, 2019
@qiluo-msft qiluo-msft deleted the qiluo/strptime branch May 11, 2019 23:09
yxieca pushed a commit that referenced this pull request May 14, 2019
```
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "ptftests/advanced-reboot.py", line 769, in peer_state_check
    self.fails[ip], self.info[ip], self.cli_info[ip], self.logs_info[ip] = ssh.run()
  File "ptftests/arista.py", line 157, in run
    log_data = self.parse_logs(log_lines)
  File "ptftests/arista.py", line 218, in parse_logs
    result_bgp, initial_time_bgp = self.extract_from_logs(bgp_r, data)
  File "ptftests/arista.py", line 205, in extract_from_logs
    raw_data.append((datetime.datetime.strptime(m.group(1), "%b %d %X"), m.group(2), m.group(3)))
AttributeError: 'module' object has no attribute '_strptime'

```
auspham pushed a commit to auspham/sonic-mgmt that referenced this pull request Feb 3, 2026
…#911)

<!--
Please make sure you've read and understood our contributing guidelines;
https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md

Please provide following information to help code review process a bit easier:
-->
### Description of PR
<!--
- Please include a summary of the change and which issue is fixed.
- Please also include relevant motivation and context. Where should reviewer start? background context?
- List any dependencies that are required for this change.
-->

Summary:
Fixes IDF isolation test failures on LT2

Fixes # (issue)

### Type of change

<!--
- Fill x for your type of change.
- e.g.
- [x] Bug fix
-->

- [x] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] New Test case
 - [ ] Skipped for non-supported platforms
- [ ] Test case improvement

### Back port request
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [ ] 202505
- [ ] 202511

### Approach
#### What is the motivation for this PR?
test_seq_idf_isolation.py fails on LT2

#### How did you do it?
Since IDF isolation script only applies to T1 neighbors, filter only T1 neighbors before prefix/community validation on neighbors

#### How did you verify/test it?
Ran test_seq_idf_isolation.py on LT2

#### Any platform specific information?

#### Supported testbed topology if it's a new test case?

### Documentation
<!--
(If it's a new feature, new test case)
Did you update documentation/Wiki relevant to your implementation?
Link to the wiki page?
-->
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
[201911][show] Fix abbreviations for 'show ip bgp ...' commands (sonic-net#909)
Changes to support acl-loader and mirror-session config commands for
multi-npu platforms. (sonic-net#908)
Changes to commands  config reload/load-minigraph (sonic-net#919)
Stop/Start restapi server upon config reload (sonic-net#911)
[config] Add 'interface transceiver' subgroup with 'lpmode' and
'reset' subcommands (sonic-net#904)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants