Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[202205][syslog]: Log files are disappeared(cleaned) after reboot #15895

Closed
nazariig opened this issue Jul 18, 2023 · 1 comment · Fixed by sonic-net/sonic-mgmt#9094
Closed

Comments

@nazariig
Copy link
Collaborator

Description

The issue is caused by:

commit 365afbb3f031ab3e5e5aa0f4a2104b62ddb9d8c2 (HEAD -> 202205, origin/202205)
Author: mssonicbld <[email protected]>
Date:   Thu Jul 13 05:01:14 2023 +0800

    Move /var/log to RAM for Mellanox SN2700, Nokia 7215 and Dell S6100 (#15077) (#15804)

It blocks verification of warm/fast reboot flows, since loganalyzer loses it's markers.

Before:

root@sonic:/home/admin# df -h /var/log
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop1      3.9G  8.9M  3.7G   1% /var/log

After:

root@sonic:/home/admin# df -h /var/log
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           790M  2.8M  788M   1% /var/log

Steps to reproduce the issue:

  1. Check /var/log/syslog file content
  2. Reboot DUT
  3. Check /var/log/syslog file content (syslog.1, etc.)

Describe the results you received:

Logs are removed

Describe the results you expected:

Logs should be stored/rotated

Output of show version:

  • N/A

Output of show techsupport:

  • N/A

Additional information you deem important (e.g. issue happens only occasionally):

@vaibhavhd
Copy link
Contributor

This is not an image issue. Moving logs to tmpfs is done to minimize risk to the disk. Disappearing log files is expected after reboot.

As for test issues related to missing logs for LogAnalyzer -- we have a way to detect if logs are in tmpfs and take a backup for loagnalyzer to work - https://github.com/sonic-net/sonic-mgmt/blob/a29ea09e6d707f0dd233a8b0e17d9dbb8c1f7ccf/tests/platform_tests/conftest.py#L489

If there is an issue w/ sonic-mgmt code, then let's raise a bug there, attach failure logs. You can assign that to me.

@nazariig please close this buildimage issue if you agree w/ my analysis.

vaibhavhd added a commit to sonic-net/sonic-mgmt that referenced this issue Jul 27, 2023
Fix the tests failing on newly addded platforms where logs are moved to tmpfs.

Related PR: sonic-net/sonic-buildimage#15077

Fixes: sonic-net/sonic-buildimage#15895
This change updates the check from hwsku match to platform match
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this issue Jan 25, 2024
…et#9094)

Fix the tests failing on newly addded platforms where logs are moved to tmpfs.

Related PR: sonic-net/sonic-buildimage#15077

Fixes: sonic-net/sonic-buildimage#15895
This change updates the check from hwsku match to platform match
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants