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

[Bug]: Failed to start logrotate.service - Rotate log files after "tests/clock/test_clock.py" #16055

Open
nhe-NV opened this issue Dec 13, 2024 · 0 comments

Comments

@nhe-NV
Copy link
Contributor

nhe-NV commented Dec 13, 2024

Issue Description

Due to the limitations of the gzip file format, the timestamp of the log must fall within the range of “1970-01-01 00:00:01 through 2106-02-07 06:28:15 UTC”, but it seems the clock test could set the time date in the test far beyond this:

for example: in time clock test it set the time date to "2228-05-05 22:56:20"

and in another time clock test, it set the time date to "2109-12-23 20:22:33"

Since gzip cannot handle the timestamp beyond the range, the log rotate will fail. Another issue in this test is that the time is not restored correctly after the test.

The date/time is not restored after the clock test, following test happened on 9/1, as you can see after the test, the time stamp is not correct.

YEAR OUT OF RANGE(1967-2099) Dec 23 20:33:24.561698 r-SN4600C-15 INFO systemd[1]: resolv-config.service: Deactivated successfully.

YEAR OUT OF RANGE(1967-2099) Dec 23 20:33:24.561952 r-SN4600C-15 INFO systemd[1]: Stopped resolv-config.service - Update DNS configuration.

YEAR OUT OF RANGE(1967-2099) Dec 23 20:33:24.562039 r-SN4600C-15 INFO systemd[1]: rsyslog-config.service: Deactivated successfully.

YEAR OUT OF RANGE(1967-2099) Dec 23 20:33:24.562119 r-SN4600C-15 INFO systemd[1]: Stopped rsyslog-config.service - Update rsyslog configuration.

2024 Jun 16 12:44:33.169246 r-SN4600C-15 INFO systemd-modules-load[367]: Inserted module 'i2c_dev'

2024 Jun 16 12:44:33.170365 r-SN4600C-15 INFO systemd-modules-load[367]: Inserted module 'pmbus'

2024 Jun 16 12:44:33.170406 r-SN4600C-15 INFO systemd-modules-load[367]: Inserted module 'tps53679'

2024 Jun 16 12:44:33.170414 r-SN4600C-15 INFO systemd-modules-load[367]: Inserted module 'max1363'

2024 Jun 16 12:44:33.170425 r-SN4600C-15 INFO systemd-modules-load[367]: Inserted module 'coretemp'

Results you see

After the test case, we will see err msg in other test case:
ERR systemd[1]: Failed to start logrotate.service - Rotate log files.

Results you expected to see

The clock test case could restore the time correctly, and no err msg happen in other test case introduced by this test.

Is it platform specific

generic

Relevant log output

No response

Output of show version

No response

Attach files (if any)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant