Skip to content

[action] [PR:10135] Ignore Failed to parse lldp age error log#10136

Merged
mssonicbld merged 1 commit intosonic-net:202305from
mssonicbld:cherry/202305/10135
Sep 26, 2023
Merged

[action] [PR:10135] Ignore Failed to parse lldp age error log#10136
mssonicbld merged 1 commit intosonic-net:202305from
mssonicbld:cherry/202305/10135

Conversation

@mssonicbld
Copy link
Copy Markdown
Collaborator

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205
  • 202305

Approach

What is the motivation for this PR?

If ntp server changes, local time stamp may jump and will cause the age value in lldpctl json output turns to negative time such as '00:-54:-15'. During lldp-syncd deamon process, it will fail and print an error log when parsing age:
[ [lldp_syncd] ERROR: Failed to parse lldp age 0 day, 00:-54:-15 -- #012Traceback (most recent call last):#012 File "/usr/local/lib/python3.9/dist-packages/lldp_syncd/daemon.py", line 49, in parse_time#012 struct_time = time.strptime(hour_min_secs, LLDPD_TIME_FORMAT)#012 File "/usr/lib/python3.9/_strptime.py", line 562, in _strptime_time#012 tt = _strptime(data_string, format)[0]#012 File "/usr/lib/python3.9/_strptime.py", line 349, in _strptime#012 raise ValueError("time data %r does not match format %r" %#012ValueError: time data '00:-54:-15' does not match format '%H:%M:%S']

lldp error syslog may be hold and just got printed one line for duplicated messages, such as message repeated for 6 times.
Even lldp-syncd updates once per 10s, but this syslog could be printed out more than 1 min later, which will impact next test case.

How did you do it?

Add this unharmful syslog into ignore list.

How did you verify/test it?

Run test_ntp.py then run other test case with log analyzer enable.

Any platform specific information?

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

Documentation

If ntp server changes, local time stamp may jump and will cause the age value in lldpctl json output turns to negative time such as '00:-54:-15'. During lldp-syncd deamon process, it will fail and print an error log when parsing age. Add this unharmful syslog into ignore list.

Signed-off-by: Zhaohui Sun <[email protected]>
@mssonicbld
Copy link
Copy Markdown
Collaborator Author

Original PR: #10135

@mssonicbld mssonicbld merged commit 4de6570 into sonic-net:202305 Sep 26, 2023
@mssonicbld mssonicbld deleted the cherry/202305/10135 branch February 4, 2024 09:39
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