[juju] Fix backtrace from juju plugin

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>
[sos] bump release to 3.2b1

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[keyutil] add kernel keyring tools support

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>
[keyutils] add to the storage profile

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>
[apt] switching shell crap to python syntax

Avoid long string of piped shell commands at all cost
Fixes: #398

Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
[apt] Removing leftover debugging code

Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
[docs] update references to report options

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>
[utilities] do not pass unicode to shlex on PY2 runtimes

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>
[archive] introduce py2.6 TarFile compat wrapper

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>
[openstack_neutron] set correct plugin name

Fixes #394.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[general] collect 'hostname' as well as 'hostname -f'

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>
[emc,symcli] move symcli collection into its own plugin.

Related: #257.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[emc,navicl] move navicli collection into its own plugin.

Related: #257.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[emc,powerpath] move PowerPath collection into its own plugin

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>
[general] fix typo in hostname symlink

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[cups] add /etc/cups/*.types

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[kpatch] new plugin

Based on a suggestion from Marc Milgram in rhbz#1110918.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>