Skip to content

Bug: Tacacs test is failing while syslog is absent due to test design #20452

@AharonMalkin

Description

@AharonMalkin

Is it platform specific

generic

Importance or Severity

Critical

Description of the bug

The local accounting test fails due to missing logs on syslog:
Failed: Failed to find an expected log message by pattern: /ansible.legacy.command Invoked/D; /INFO audisp-tacplus.+Accounting: user: test_rwuser,.*, command: .*grep,/P

However, due to the following PR: #17350
Which improved the test and added retry, it also added a "truncate option which deletes the syslog each retry:
"cleanup_tacacs_logs"

Image

Image

When doing the truncate function we are causing the syslogs from the test timeframe to be almost empty, this make really hard to debug and understand possible failures on the test.

In addition the flush log option which forces writing logs from cache to the disk, also may case potential log loss.

Steps to Reproduce

Run test_accounting

Actual Behavior and Expected Behavior

Test fails with:
`Failed: Failed to find an expected log message by pattern: /ansible.legacy.command Invoked/D; /INFO audisp-tacplus.+Accounting: user: test_rwuser,.*, command: .*grep,/P

But there are no syslogs to debug.

Relevant log output

Output of show version

Attach files (if any)

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions