-
Notifications
You must be signed in to change notification settings - Fork 541
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
sos report --all-logs -a does not gather all the older syslog, kern.log or boot.log files for Ubuntu #3393
Comments
I think there are some cases where the information being logged to syslog isnt in the journal, but 8c2b07a does not consider this situation. So the --all-logs command becomes misleading because it does not actually gather all-logs from the logs plugin - https://github.com/sosreport/sos/blob/main/sos/report/plugins/logs.py#L65 when it detects the journal service
|
I guess you complain that sos/sos/report/plugins/logs.py Line 48 in ab36ea6
speech-dispatcher or private were ignored?
I expect the sos/sos/report/plugins/logs.py Line 44 in ab36ea6
--all-logs variant. And I would need to have debug sos logs to understand why it skipped collecting auth.log.* files.
|
I think the auth.log.* files are not collected because this else isnt true - sos/sos/report/plugins/logs.py Line 77 in ab36ea6
I'd initially opened this issue because I felt --all-logs should collect all the compressed .1.gz files for syslog, boot logs and kern.log too, but I see the code's point that the journal should have it all. There's been some reports of journal logs not containing the logs the syslog has, @desrod reported such instances. I also feel its better (intuitively) that all-logs does in fact collect all the logs in /var/log, maybe at the risk of duplicity in that those logs may also exist in the journal. As for the auth.log.* files, we'd need to add collecting them to https://github.com/sosreport/sos/blob/ab36ea641f6c2145ef8a52dcb3e70abb5ee8e9b9/sos/report/plugins/logs.py#L44C1-L54C11 I guess? And as for --all-logs, for the journal case, yes I agree we need to consider --all-logs even in the first part of the if, i.e here - sos/sos/report/plugins/logs.py Line 65 in ab36ea6
|
Looking closer, if we are assuming journal logs will capture everything meant for syslog, auth.log and messages, then the only thing to do in this PR is to add auth.log collection for the default collections before the if loops. I will send a MR for this in a bit. If we decide syslog and indeed even kern.log have logs that do not somehow make it into the journal then we will revisit this one, tagging @desrod for awareness. |
Resolves: sosreport#3393 Signed-off-by: Nikhil Kshirsagar <nikhil.kshirsagar@canonical.com>
Some testing results
The text was updated successfully, but these errors were encountered: