| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Add a cleanup() method to the Archive classes and ensure that it
is called during normal and abnormal termination (unless the pdb
debugger has been invoked during --debug mode).
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
The logs module has a paramter 'logsize' but some code still uses
the old 'syslogsize' name. Make all uses consistent.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new level to the Archive class hierarchy. This class may
be used by any archive class that needs to temporarily cache
files in the file system during collection.
Classes deriving from FileCacheArchive must supply
_build_archive() and _compress() methods which will be called
during archive finalization.
This fixes the TarFileArchive problems caused by attempting to
apply read-modify-write updates to content already present in the
archive.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
| |
Policies may wish to influence the choice of temporary directory.
Move the TempFileUtil initialisation to be after the call to
load policy.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The logic in add_copy_spec_limit() only attempted to collect a
'tailed' version of a file that is over the size limit in the case
that it is the first file in the list of specs.
Change this to always collect the tailed version for the first
file to exceed the size limit and improve the variable naming
to be more consistent with related methods.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pythons os.path.join behaviour returns only the last path given
when that path is absolute. This means that when make_path() is
given an absolute destination path (e.g. /etc/foo) it will return
an archive path of '/etc/foo' causing an error when copying into
the temporary tree.
Check for absolute paths and use lstrip to remove leading
instances of os.sep from the string.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow clients of the Archive classes to create arbitrary
directories. Sos needs to be able to do this to create the report
directory structure within a temporary file system tree.
This work also paves the way for improviyng the robustness of the
tree copying code in Plugin (which presently relies on the Archive
class to recurse up to root, adding parent directories that do not
already exist in the archive to ensure the corret permissions and
context are stored in the archive). This would also allow the
Archive.add_parent() hack to be removed.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
Improve code formatting and readability in _set_archive() ahead
of new temporary tree archive code.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
The RedHatSANLock initialiser used the wrong class name when
determining the parent class initialiser to invoke.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
| |
s/)[/])/
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The system plug-in tries to pass a naked string to add_copy_specs().
This causes each character of the string to be passed down to an
invocation of add_copy_spec():
add_copy_specs(copyspecs=/proc/sys, sub=None)
add_copy_spec(copyspec=/, sub=None)
add_copy_spec(copyspec=p, sub=None)
add_copy_spec(copyspec=r, sub=None)
[...]
Collecting '/' is clearly a bad idea (see Issue #141).
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|\
| |
| | |
Update system.py, Typo
|
|/
|
| |
Typo, IPv6 not IPv8
|
|\
| |
| | |
Patch debian fixes
|
| |
| |
| |
| | |
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) lintian information, you should run lintian with '-IE --pedantic',
lintian will tell you more if there are any problem. There are still
some lintian information, but I don't care of them. you may fix them
when you polish your package.
2) You use old format copyright files, it is better to switch to
DEP5[1] compatible format. lintian shows this information.
3) The section is python, but I think admin should be better, after
all, sosreport is a sysadmin tool
4) Please move LICENSE file to usr/share/doc/sosreport, rather than
remove it.
A note about 4. I have removed the actual installing of the LICENSE file
in the Makefile in favor of the distribution specific packaging handle it.
For example, within Debian everything is placed in debian/copyright which
removes the need for our Makefile to do anything with the LICENSE file.
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
| |
Move all the syslog collection from the general plug-in to a new
logs plug-in and factor out the all_logs support from the
RedHatLogs class into the Logs superclass.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
The kernel ring buffer is certainly more 'kernel' than 'general'.
Put it where it belongs and remove the duplicate dmesg call and
'dmesg_now' suggested filename (there's no need as it's in a
separate directory to the saved version at var/log/dmesg and the
normal action of dmesg is to print the current content).
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
| |
The hardware plug-in has been split up into separate ata, block,
pci, scsi, and usb plug-ins remove the data collected for these
subsystems from the hardware module.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
Add a new plug-in, processor, to capture CPU related information
and separate out all the CPU data from the old hardware plug-in.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
| |
Separate out the scsi data from the hardware plug-in.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
Separate the PCI related data into its own plug-in and remove it
from the hardware plug-in.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
| |
Separate the ATA and IDE code from the hardware god-object and
put them in a separate plug-in that is activated by the presence
of hdparm or smartmontools.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
| |
Collect /proc/partitions in the block plug-in where it belongs
(not in the cluster or file system plug-ins where it has hidden
in the past!).
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing initrd plug-in is default-disabled so it rarely
collects anything useful. The command used to extract the init
script from the initramfs image is also broken for modern systems
as the pattern ("initrd*") does not match and the file /init on
systems using systemd is actually a symbolic link to the systemd
binary.
Replace the collection of this file with a listing of the current
initramfs image (via lsinitrd). Optionally collect a listing from
each non-kdmump image present in /boot.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
This partially reverts commit fbbb6ac. Renaming the module was a
mistake; internationalization is just too long.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Add a new grub2 plug-in and separate the grub and lilo support
from the bootloader module which now collects legacy and special
purpose or arch bootloader configuration and a directory listing
of /boot.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The filesys module has long had a lot of (very weird) code for
detecting and processing a list of whole-disk devices in the
system. Apart from being garbage this doesn't really belong in
the file systems module - move it to block and replace the
hokey /proc-and-hdparm-or-regex thing with the existing directory
walk over /sys/block.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
| |
Disk partition data does not belong in the cluster code (or the
file systems module for that matter but that's a topic for the
next commit). Remove it.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
The abrt plug-in's check_enabled() just checks for one package and
one file; add .packages and .files members to the plug-in class
and delete the method.
Also tidies up some long lines and string formatting.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|\
| |
| | |
Remove methods related to java and internationalization.
|
|/
|
|
|
|
|
| |
- Old methods not needed anymore, set_i18n and _get_classloader both only
useful if we were still supporting jython.
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
|
|
|
|
|
|
| |
The anacron plugin falsely declares itself to be named 'anaconda'
(it started life as a copy of it). Fix it.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
The squid plug-in can potentially collect large volumes of logs.
Limit it to 15M to be consistent with similar modules.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|\
| |
| | |
Patch improve makefile debian
|
| |
| |
| |
| | |
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
| |
| |
| |
| |
| |
| | |
reflect the new build task name for debian builds.
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Since removing the jboss/application server bits we no longer need
those build tasks in the Makefile.
- Remove building gpgkeys entirely since it is not referenced anywhere in
the code.
- Update the creation of tarballs to exclude-vcs directories such as .git, .bzr,
etc.
- Move build tasks from deb-unsign to deb because its less to type and still
properly explains what the task is.
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
| |
| |
| |
| |
| |
| |
| | |
The Red Hat and Debian/Ubuntu system plug-ins are identical. Get
rid of them and have a comon System class.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
Ntp information belongs in the ntp plug-in.. Duh. Move the few
files collected in the system module to ntp.py.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The cron data does not belong in the system plug-in and it seems
pointless to have a separate module just for crontabs (but not
for cron!). Move the cron logs and tabs into a new plug-in named
cron.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's unwise to collect user crontabs (especially "for all accounts
with a directory in /home"..) since they could contain
confidential information. The icky shell call-out also has not
worked in some time - remove it all.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
| |
| |
| |
| |
| | |
The system plug-in is a dumping ground of all sorts of random
bits and pieces. Move the anacron stuff to its own file.
|