| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Older versions of the python runtime would add a newline to output
obtained via pipe.communicate(). Current versions do not leading
to output being stored in reports without a trailing newline
character.
Remove the workaround to ensure that stored content matches that
obtained via simple shell redirection ("/some/command > file").
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The networking module previously checked that its hard-coded path
for the brctl command existed before collecting output. This was
missed in the conversion to using policy defined PATH search for
external commands in commit e0d132e.
Similar problems were fixed in commits 8b10cb0, 374da99, 8883155.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an attempt is made to apply command output substitution via
Plugin.do_cmd_output_sub() and no output has been collected (i.e.
called['file'] == None) an exception is thrown by os.path.join().
The exception is also not logged properly due to an attempt in
the do_cmd_output_sub() exception handler to access an unbound
local variable (path - the exception occurs before it is
assigned).
Fix both of these by checking for an empty file entry and avoiding
access to the path variable from the exception handler.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the default policy object will exit without logging any
errors if an exception (e.g. EOF while reading line) is caught
during reads for interactive mode prompts.
Instead re-set the report name to a sane value (localname) and
attempt to continue.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 6ea48cbb introduced an isatty() check on stdin and
automatically sets batch mode if we're not attached to a TTY.
Although the logic of this seems simple enough the combination of
this and commit 4b46e04 breaks valid uses that have worked since
sos-1.x, e.g.:
Traceback (most recent call last):
File "/usr/sbin/sosreport", line 23, in <module>
main(sys.argv[1:])
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1171, in main
sos.execute()
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1133, in execute
self._setup_logging()
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 630, in _setup_logging
self.opts.batch = True
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 324, in batch
self._check_options_initialized()
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 229, in _check_options_initialized
+ "from command line")
ValueError: SoSOptions object already initialized from command line
Given the actual semantics of --batch (do not prompt for or read
user input from stdin) there is no need to enable it if stdin is
a pipe or other non-TTY file descriptor.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|\
| |
| |
| |
| | |
Add new plugin for apt
Signed-off by: Adam Stokes <adam.stokes@ubuntu.com>
|
|/
|
|
| |
Closes #201
|
|
|
|
| |
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Note: Changed original filename from openstack-heat.py to openstack_heat.py as
the plugin would fail to load with the original filename.
Closes #190
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Closes #199
Signed-off-by: Eoghan Glynn <eglynn@redhat.com>
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
| |
| |
| |
| | |
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
| |
| |
| | |
Replace travis-ci status image with that of this upstream repo.
|
| |
| |
| |
| |
| | |
Signed-off-by: Flavio Percoco <fpercoco@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|\ \
| | |
| | | |
Split Swift out of openstack's plugin. #184
|
| |/
| |
| |
| | |
Signed-off-by: Flavio Percoco <flaper87@gmail.com>
|
|\ \
| | |
| | | |
Split Glance out of openstack's plugin
|
| |/
| |
| |
| | |
Signed-off-by: Flavio Percoco <flaper87@gmail.com>
|
|\ \
| |/
|/| |
import sys - Module sys is used but it is not imported.
|
|/
|
|
| |
Module sys is used but not imported.
|
|
|
|
|
|
|
|
|
|
| |
The semanage tool fails to write to a path within the temporary
report tree on some distributions due to an SELinux AVC denial.
Force the command to write data to stdout instead by passing
'-o -'.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a convenience method to construct an absolute path for
command output from a relative path or file name. This can be
used for e.g. to pass an output path to an external program that
produces output at a named path rather than on stdout and can be
used internally by the Plugin.make_cmd_dirs() method.
Convert the SELinux plug-in to use the new method when passing
output paths to the semanage command.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some plug-ins want to store command output in subdirectories of
their 'sos_commands/<plugin>/' directory. Currently there are
various hand-rolled methods to build this in different plug-ins.
Add a single method to the base Plugin class that builds the
correct path string and recursively creates the directories via
os.makedirs() in a single step.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
The method to retrieve the path into which a plug-in's collected
command output returns a path as a string rather than a directory
object.
Make this clear by renaming the method to 'get_cmd_path()'.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Recent cluster stacks using the pacemaker stack include a
crm_report script to generate debugging information for the
cluster.
Call it in single-node mode in the cluster module.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The cluster plug-in attempted to support three prior generations
of cluster components in a single plug-in. These will never be
required today since all current versions where sos-3.x would be
used are all using much later packages.
Remove this code and simplify the overall plug-in organisation.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The s390 plug-in has some strange checks on the distribution
version before collecting a couple of s390-specific commands. The
entire code block is also wrapped in try/except.
Remove this: all add_cmd_output() succeed without exceptions even
if the command does not exist or cannot be run. The exception
handling also does nothing useful.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The networking plug-in scoops up /proc/net. There are some pseudo-
files in here that we should avoid touching. These either have
side-effects or hang the reading process.
Add a forbidden path for the /proc/net/rpc/*/{channel,flush}
files as these will cause side-effects for RPC applications
running on the host.
Forward port of commit 61585d4 on rhel-6 branch.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
The networking plug-in scoops up /proc/net. There are some pseudo-
files in here that we should avoid touching. These either have
side-effects or hang the reading process.
Add a forbidden path for the /proc/net/rpc/use-gss-proxy file.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Recent versions of kexec-utils automatically generate a text
file containing the dmesg buffer of the captured vmcore.
This is useful for first-fault debugging and should be included.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 'ipsec barf' debugging command has a nasty bug where it runs
grep on /var/log/lastlog. Since this can be a multi-gigabyte
sparse file this doesn't work very well and consumes huge amounts
of memory. This can lead to timeouts and aborts when running sos
since the openswan plug-in calls this command by default.
The barf information is seldom useful anyway - turn it off by
default to avoid this problem.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
Add the pam_ldap.conf file to the data collected by the ldap
plug-in and tidy up substitution strings for this plug-in.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
Use multi-line style for add_copy_specs() invocations in the ldap
plug-in per the recommendations in Issue #173.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The lvm2 lvmdump options were a bit crazy, allowing the user to
specify a default ('lvmdump'), or an advanced collection
('lvmdump-a') but not the raw metadata ('-m') option which is
often useful for support purposes.
Replace 'lvmdump-a' with 'lvmdump-am' to collect both.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
The lvmdump-a option currently collects 'advanced' data but not
raw metadata. Since it's off by default and the metadata is often
of interest in support cases rename the option to lvmdump-am and
have it also pass the '-m' (raw metadata) option to the lvmdump
script.
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>
|
|
|
|
|
|
|
|
|
| |
New plug-in to collect OpenHPI configuration files. These files
may contain passwords; a regex substitution rule has been added
based on information from the reporter but this needs testing
with a range of actual configuration files.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
| |
Update unittests to reflect 4a594b6dce129f8d9837c0d93768576badf2b2b7
|
|
|
|
|
|
|
|
| |
This commit brings sos-3.x behaviour into line with earlier
releases and produces captured command output that is consistent
with typical shell redirection use.
Resolves: bz971420
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid collecting kerberos keytabs to prevent unintended
information disclosures. Instead retrieve a list using the klist
command.
Also remove the duplicative collection of this information from
the ipa plug-in (which should only be collecting non-system
keytabs that are specific to the IPA tools).
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The krb5 data collection in the samba plug-in is misplaced. Since
this is collecting information about the system keytab move it
to its own plug-in that can be activated on any kerberos enabled
system.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|\
| |
| | |
Update debian changelog and watch file
|
| |\
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a default call to rpm -V/--verify for a targeted subset of
packages. This greatly reduces the time taken relative to rpm -Va
while still capturing important diagnostic information.
In future this capability could be made a feature of the
PackageManager class interface and available to all ports/modules.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The samba module calls the wbinfo command to collect user and
group information. This by default will search all domains to
which the host has access. In a large AD environment with a number
of trusted domains this causes the winbindd process to consume
excessive CPU and memory resources.
The Samba developers have commented that fixing this would require
a complete rewrite of the winbind protocol and wbinfo client.
Since listing out the _entire_ set of visible users is unlikely
to be of any use anyway pass the --domain='.' option to restrict
the search to the current domain of the system.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|