Package: sosreport
Version: 3.2-2
Severity: normal
Dear Maintainer,
When running sosreport with the --all-logs option, a 0-byte log is
created if the original log is greater than the log_size (10 mb) set in
/usr/share/sosreport/sos/sosreport.py. Sosreport generates this 0-byte
log only when the environment is python3. When the environment is
python, we get the expected non-0 byte log from sosreport.
# using sosreport as installed from the jessie repo (v3.2-2)
$ head -1 /usr/share/sosreport/sosreport
#!/usr/bin/python3
# backup the original auth.log and create an 11mb log (just because it's
larger than 10mb)
$ mv /var/log/auth.log /var/log/auth.log.orig
$ dd if=/dev/zero of=/var/log/auth.log bs=11000000 count=1
# run sosreport, untar bundle, and see 0-byte log
$ sosreport --all-logs
$ sudo tar xvf /tmp/sosreport-jessie-20150717130809.tar.xz
$ ls -l sosreport-jessie-20150717130809/var/log/auth.log
lrwxrwxrwx 1 root root 46 Jul 17 13:08
sosreport-jessie-20150717130809/var/log/auth.log ->
../../sos_strings/logs/var.log.auth.log.tailed
$ ls -l
sosreport-jessie-20150717130809/sos_strings/logs/var.log.auth.log.tailed
-rw-r--r-- 1 root root 0 Jul 17 13:08
sosreport-jessie-20150717130809/sos_strings/logs/var.log.auth.log.tailed
The above log should not be zero. We see that if sosreport is run with
environment python (instead of python3), our log is an appropriate size.
# using sosreport as installed from the jessie repo with only the
environment changed
$ head -1 /usr/share/sosreport/sosreport
#!/usr/bin/python
# run sosreport, untar bundle, and see 10mb log
$ sosreport --all-logs
$ tar xvf /tmp/sosreport-jessie-20150717131216.tar.xz
$ ls -l sosreport-jessie-20150717131216/var/log/auth.log
lrwxrwxrwx 1 root root 46 Jul 17 13:09
sosreport-jessie-20150717131216/var/log/auth.log ->
../../sos_strings/logs/var.log.auth.log.tailed
$ ls -l
sosreport-jessie-20150717131216/sos_strings/logs/var.log.auth.log.tailed
-rw-r--r-- 1 root root 10485760 Jul 17 13:12
sosreport-jessie-20150717131216/sos_strings/logs/var.log.auth.log.tailed
Why is the sosreport package being packaged with python3 when the
upstream source is not?
Are we sure this package is even compatible with python3?
An alternative workaround would be to increase the log_size value in
sosreport.py but that's not a good solution unless we want to make this
number arbitrarily large or constantly monitor and change the value.
Thank you for looking at this issue,
Heather
-- System Information:
Debian Release: 8.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages sosreport depends on:
ii python3-six 1.8.0-1
pn python3:any <none>
sosreport recommends no packages.
sosreport suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org