cannot collect rotated syslog.1

Bug #1356211 reported by Nobuto Murata
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sosreport (Ubuntu)
Fix Released
Undecided
Unassigned
Trusty
In Progress
Medium
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Yakkety
Fix Released
Undecided
Unassigned

Bug Description

[SRU justification]
All rotated logs may be required for analysis

[Impact]
Missing log information without this fix.

[Fix]
Collect all the rotated logs.

[Test Case]
Without the fix, running sosreport will only collect the current log in /var/log.

With the fix,all the rotated logfiles will be collected.

[Regression]
None expected, this modification is already running in X,Y & Z

[Original description of the problem]
Cannot collect rotated syslog.1 or syslog.2.gz by sosreport. If syslog is rotated daily, syslog only contains logs in less than 24 hours.

I expect sosreport collects syslog and syslog.1 to see logs at least for 24 hours. Or it would be nice if sosreport has options to switch to collect old logs or not.

====
$ sudo logrotate -f /etc/logrotate.conf
$ ls -alF /var/log/syslog*
-rw-r----- 1 syslog adm 1984 Aug 13 16:12 /var/log/syslog
-rw-r----- 1 syslog adm 30816 Aug 13 16:11 /var/log/syslog.1
-rw-r----- 1 syslog adm 1332 Aug 13 15:55 /var/log/syslog.2.gz
-rw-r----- 1 syslog adm 6095 Aug 13 15:43 /var/log/syslog.3.gz

$ sudo sosreport -a -l | grep logs
 logs Basic system information for Debian based distributions
 logs Basic system information for Ubuntu based distributions
 apache.log on gathers all apache logs
 auditd.logsize 15 maximum size (MiB) of logs to collect
 logs.logsize 15 max size (MiB) to collect per syslog file
 logs.all_logs on collect all log files defined in syslog.conf
 logs.logsize 15 max size (MiB) to collect per syslog file
 logs.all_logs on collect all log files defined in syslog.conf
 nscd.nscdlogsize 50 max size (MiB) to collect per nscd log file
 openstack-cinder.log on gathers openstack cinder logs
 openstack-glance.log on gathers openstack-glance logs
 openstack-keystone.log on gathers openstack keystone logs
 openstack-swift.log on gathers openstack-swift logs

$ sudo sosreport -a --batch
$ sudo tar tf /tmp/sosreport-nobuto-local-machine-1-20140813161158.tar.xz | grep syslog
sosreport-nobuto-local-machine-1-20140813161158/var/log/juju/rsyslog-cert.pem
sosreport-nobuto-local-machine-1-20140813161158/var/log/juju/rsyslog-key.pem
sosreport-nobuto-local-machine-1-20140813161158/var/log/syslog
sosreport-nobuto-local-machine-1-20140813161158/etc/logrotate.d/rsyslog
sosreport-nobuto-local-machine-1-20140813161158/etc/rsyslog.conf
sosreport-nobuto-local-machine-1-20140813161158/etc/default/rsyslog
sosreport-nobuto-local-machine-1-20140813161158/etc/init/rsyslog.conf

^ syslog.1 is not collected.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: sosreport 3.1-1ubuntu2
ProcVersionSignature: User Name 3.16.0-6.11-generic 3.16.0-rc7
Uname: Linux 3.16.0-6-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
Date: Wed Aug 13 15:52:09 2014
Dependencies: python3-six 1.5.2-1
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: sosreport
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Nobuto Murata (nobuto) wrote :
Louis Bouchard (louis)
Changed in sosreport (Ubuntu):
status: New → Triaged
Revision history for this message
Bryan Quigley (bryanquigley) wrote :
Revision history for this message
Bryan Quigley (bryanquigley) wrote :
Revision history for this message
Adam Stokes (adam-stokes) wrote :

Merged upstream

Louis Bouchard (louis)
Changed in sosreport (Ubuntu):
status: Triaged → Fix Released
Louis Bouchard (louis)
Changed in sosreport (Ubuntu Yakkety):
status: New → Fix Released
Changed in sosreport (Ubuntu Xenial):
status: New → Fix Released
Changed in sosreport (Ubuntu Trusty):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Louis Bouchard (louis-bouchard)
Louis Bouchard (louis)
description: updated
Louis Bouchard (louis)
Changed in sosreport (Ubuntu Trusty):
status: Triaged → In Progress
Louis Bouchard (louis)
tags: added: sts-sru
tags: added: sts-sru-needed
removed: sts-sru
Louis Bouchard (louis)
Changed in sosreport (Ubuntu Trusty):
assignee: Louis Bouchard (louis) → nobody
tags: removed: sts-sru-needed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.