sosreport is broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
The Ubuntu-power-systems project |
New
|
High
|
Canonical Server | ||
sosreport (Ubuntu) |
New
|
Undecided
|
Ubuntu on IBM Power Systems Bug Triage |
Bug Description
sosreport seems to be broken in the area of capturing /var/log files. I am seeing symlinks create for essential log files like "kernel.log" and "syslog" for which the target files are not getting included. For example:
$ ls -l sosreport/var/log/
total 124
-rw-r-----+ 1 guest guest 114 Feb 2 18:07 apport.log
-rw-r-----+ 1 guest guest 878 Jan 1 22:08 apport.log.1
drwxr-x---+ 2 guest guest 4096 Jan 1 06:25 apt
drwxr-x---+ 2 guest guest 4096 Jan 31 06:25 cups
-rw-r-----+ 1 guest guest 2846 Feb 2 11:29 dpkg.log
drwxr-x---+ 3 guest guest 4096 Dec 20 11:34 installer
lrwxrwxrwx. 1 guest guest 46 Feb 6 08:39 kern.log -> ../../sos_
lrwxrwxrwx. 1 guest guest 48 Feb 6 08:39 kern.log.1 -> ../../sos_
drwxr-x---+ 3 guest guest 4096 Dec 20 15:51 libvirt
drwxr-x---+ 2 guest guest 4096 Feb 5 13:21 lxd
lrwxrwxrwx. 1 guest guest 44 Feb 6 08:39 syslog -> ../../sos_
-rw-r-----+ 1 guest guest 48223 Jan 31 06:25 syslog.1
drwxr-x---+ 2 guest guest 4096 Dec 20 11:45 unattended-upgrades
$ ls sosreport/
date free java lsof ps sos_logs usr
dev hostname last lspci pstree sos_reports var
df initctl lib mount route sys version.txt
dmidecode installed-debs lsb-release netstat run uname vgdisplay
etc ip_addr lsmod proc sos_commands uptime
$
It appears to be some attempt to shorten logs, although that itself is disconcerting. Unclear what options were used to run sosreport.
====
My hunch is that the "--log-size" option is being used, either automatically or manually, but that option is failing to include the "sos_strings" subdirectory in the archive.
== ==
I have confirmed that this issue still exists. On Ubuntu 18.04 I and another distro, I ran the following command:
sosreport --log-size=1
I then copied the sosreport off to another system and unpacked it. In the case of the other distro sosreport, the var/log/messages files was a symlink but was readable (existed). However, in the case of Ubuntu the var/log/syslog file was a broken symlink "syslog -> ../../sos_
sosreport 3.5-1ubuntu3 (Ubuntu 18.04)
vs.
sos-3.5-
tags: | added: architecture-ppc64le bugnameltc-164312 severity-high targetmilestone-inin1804 |
Changed in ubuntu: | |
assignee: | nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) |
affects: | ubuntu → sosreport (Ubuntu) |
tags: | removed: bugnameltc-164312 severity-high |
tags: | added: bugnameltc-164312 severity-high |
Changed in ubuntu-power-systems: | |
importance: | Undecided → High |
assignee: | nobody → Canonical Server Team (canonical-server) |
tags: | added: triage-g |
Error output: logs-plugin- errors. txt sosreport/ sos/sosreport. py", line 1300, in collect sosreport/ sos/plugins/ __init_ _.py", line 877, in collect _collect_ strings( ) sosreport/ sos/plugins/ __init_ _.py", line 860, in _collect_strings splitlines( )[0]).decode( 'utf8', 'ignore'))
# cat sos_logs/
Traceback (most recent call last):
File "/usr/share/
plug.collect()
File "/usr/share/
self.
File "/usr/share/
(content.
AttributeError: 'str' object has no attribute 'decode'