Skip to content

Ignore Failed to parse lldp age error log#10135

Merged
ZhaohuiS merged 1 commit intosonic-net:masterfrom
ZhaohuiS:fix/ignore_lldp_age_log
Sep 26, 2023
Merged

Ignore Failed to parse lldp age error log#10135
ZhaohuiS merged 1 commit intosonic-net:masterfrom
ZhaohuiS:fix/ignore_lldp_age_log

Conversation

@ZhaohuiS
Copy link
Contributor

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

Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
@ZhaohuiS ZhaohuiS merged commit 6371b23 into sonic-net:master Sep 26, 2023
@mssonicbld
Copy link
Collaborator

@ZhaohuiS PR conflicts with 202012 branch

@mssonicbld
Copy link
Collaborator

@ZhaohuiS PR conflicts with 202205 branch

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Sep 26, 2023
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 <zhaohuisun@microsoft.com>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202305: #10136

mssonicbld pushed a commit that referenced this pull request Sep 26, 2023
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 <zhaohuisun@microsoft.com>
wangxin pushed a commit that referenced this pull request Sep 28, 2023
Cherry pick #10135 into 202205

Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
wangxin pushed a commit that referenced this pull request Sep 28, 2023
Cherry pick #10135

Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Jan 25, 2024
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 <zhaohuisun@microsoft.com>
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.

4 participants