| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Everything the kpatch plugin does requires the list of available
kpatch patches obtained from 'kpatch list'. If this fails return
immediately from the setup method.
Fixes #417.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
|
|
|
|
|
|
|
|
|
|
| |
Split add_cmd_output to use suggest_filename since the
output of apt-cache policy for each installed package
would create an incredibly long filename.
Fixes #415.
Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
|
|
|
|
|
|
|
| |
Syncs up the version within the changelog to the latest
release.
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
|
|
|
|
|
|
| |
Fixes #418
Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
|
|
|
|
|
|
|
|
| |
The plugin currently tests whether policy().get_arch() is equal
to "ppc64". On little endian PowerPC machines this method returns
"ppc64le". Change the check_enabled() method to test whether the
returned string contains "ppc64".
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Old versions of six do not include a 'PY2' attribute leading to
an exception in sos_get_command_output(). Invert the sense of the
test and check that six.PY3 is false instead as all versions of
the module include this attribute.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Old versions of six do not include a 'PY2' attribute leading to
an exception in sos_get_command_output(). Invert the sense of the
test and check that six.PY3 is false instead as all versions of
the module include this attribute.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Merge add_copy_specs() into add_copy_spec() and treat any strings
passed to the new method as though they were a single item list.
Mirrors the prior change to add_cmd_outputs().
Fixes #301.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Remove add_cmd_outputs() and allow add_cmd_output() to accept a
list of commands to invoke. Add a check and warn via the logs if
a plugin attempts to use 'root_symlink' or 'suggest_filename'
with a command list of length > 1.
Fixes #301.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
| |
Based on a suggestion from Marc Milgram in rhbz#1110918.
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>
|
|
|
|
|
|
|
|
|
| |
Move PowerPath functionality into a new powerpath plugin and
remove the (now empty) EMC plugin.
Fixes: #257.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
| |
Related: #257.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
| |
Related: #257.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The --fqdn option to hostname depends on the system resolver
configuration. On hosts where the fqdn is undefined the command
may return:
"hostname: Name or service not known"
Since hostname will at least give the locally configured name
regardless of resolver or DNS state collect both commands.
Fixes #404.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
| |
Fixes #394.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Python 2.6 lacks the filter parameter to TarFile.add() that the
TarFileArchive uses to preserve permissions on archive content.
Work around this by creating a wrapper class that implements the
missing functionality (duplicated from the py2.7.5 tarfile.py)
and use it whenever running on a python version less than 2.7.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Running sos-3.2beta on a python2.6 runtime leads to:
File "/usr/sbin/sosreport", line 25, in <module>
main(sys.argv[1:])
File "/usr/lib/python2.6/site-packages/sos/sosreport.py", line 1408, in main
sos.execute()
TypeError: execve() argument 1 must be encoded string without NULL bytes, not str
> /usr/lib64/python2.6/subprocess.py(1234)_execute_child()
-> raise child_exception
This occurs because some command output is interpreted as unicode
by the Python runtime. When this output is processed in a plugin
and passed back down to sos_get_command_output() it leads to the
above exception.
Work around the problem by encoding strings passed to shlex.split
on older Python versions.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The --report switch was changed to --no-report a while back.
Update the docs to reflect the new option.
Fixes #396.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
|
|
|
|
|
|
| |
Avoid long string of piped shell commands at all cost
Fixes: #398
Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
|
|
|
|
|
|
|
| |
Since keyutils is used by several storage components (NFS idmap
service, cifs) add it to the 'storage' profile.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
Based on a request from Bill Yodlowsky. Collect request-key
configuration and the output of 'keyctl show'.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
| |
Restrict plugin execution to when juju is installed
Fixes #400
Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
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>
|
|
|
|
|
|
|
|
|
| |
And define a new 'memory' profile to group related plugins
together.
Fixes #226.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Plugins are currently listed as 'not default' if the plugin's
default_enabled() method evaluates to False:
sendmail inactive sendmail service
snmp inactive Simple network management protocol
soundcard not default Sound devices
squid inactive Squid caching proxy
It sounds odd and it looks ugly in the plugin listing. Change the
description to 'optional':
sendmail inactive sendmail service
snmp inactive Simple network management protocol
soundcard optional Sound devices
squid inactive Squid caching proxy
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>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add a listing of available profiles at the end of --list-plugins
output and add plugin and profile counts to the output of both
--list-plugins and --list-profiles.
Also factor out some common code for formatting commas-separated
multi-line lists.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A return status of 126 indicates 'found but not executable'. This
is returned from timeout for some malformed commands when running
as a normal user but not when running as root, e.g.:
Running 1/1: multipath...
[plugin:multipath] collecting path '/etc/multipath/'
[plugin:multipath] unpacked command tuple: ('['multipath -l', 'multipath -v4 -ll']', 'None', 'None', 300, 'None')
[plugin:multipath] collecting output of '['multipath -l', 'multipath -v4 -ll']'
Traceback (most recent call last):
File "/usr/sbin/sosreport", line 25, in <module>
main(sys.argv[1:])
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1389, in main
sos.execute()
AttributeError: 'list' object has no attribute 'split'
> /usr/lib/python2.7/site-packages/sos/plugins/__init__.py(563)get_cmd_output_now()
-> % (exe.split()[0], time() - start))
(Pdb) bt
/usr/sbin/sosreport(25)<module>()
-> main(sys.argv[1:])
/usr/lib/python2.7/site-packages/sos/sosreport.py(1389)main()
-> sos.execute()
/usr/lib/python2.7/site-packages/sos/sosreport.py(1369)execute()
-> self.collect()
/usr/lib/python2.7/site-packages/sos/sosreport.py(1144)collect()
-> plug.collect()
/usr/lib/python2.7/site-packages/sos/plugins/__init__.py(633)collect()
-> self._collect_cmd_output()
/usr/lib/python2.7/site-packages/sos/plugins/__init__.py(613)_collect_cmd_output()
-> timeout=timeout, runat=runat)
> /usr/lib/python2.7/site-packages/sos/plugins/__init__.py(563)get_cmd_output_now()
-> % (exe.split()[0], time() - start))
(Pdb) result
{'status': 126, 'output': u"timeout: failed to run command '[multipath -l,': Permission denied\n"}
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Not all systems are required to have the generic hostname command return
the FQDN. We have encountered customers who require the a short name by
default. Adding the "-f" output helps to get that information.
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
If no syslog exists collect the last three days worth of
journald logs by default and allow the user to specify a "log_days"
option to control the data collected.
Fixes #325.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
| |
Break the logic of the combined 'onlyplugins' and profile check
out to make it more readable and fix a bug that caused all default
plugins to be enabled when running '-o someplug'.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
This options provides the user the ability to pull
logs from all containers including the terminated/stopped.
Fixes #360
Fixes #365
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
|
|
|
|
|
|
|
| |
All plugins belong to the null (empty) plugin. Fix the test in
_is_in_profile() to check against the list of active profiles and
not the list of all detected profiles.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
| |
There's no reason to truncate mangled command names within an
archive. This isn't MS-DOS 3.1 and there are cases where the 64
character limit causes a loss of uniqueness and resulting name
collisions (e.g. namespaced network commands).
Fixes #388.
|
|
|
|
|
|
| |
Fixes #395.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Allow the user to fine-tune the set of enabled plugins using the
-o (--only-plugins) and -n (--skip-plugins) options. These add
and remove plugins from the set defined by the active profile(s).
Both options may be specified multiple times, or given lists of
plugins to operate on. E.g.:
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|