aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [networking] iptables: check module version and do ipv6Germano Veit Michel2015-09-291-2/+15
| | | | | | | | | | | | | If we grep for "mangle", both ipv4 and ipv6 versions might come up. This patch ensure that the right version is considered. Also, do the same we do for ipv4, but for ipv6. Filter, Mangle, NAT and exact counters. Closes #630 Signed-off-by: Germano Veit Michel <germano@redhat.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* [gluster] added new commandshari gowtham2015-09-291-3/+14
| | | | | | | | | | The new commands added to gluster in the recent release were missing. this commit is to add those commands to the plugin. Closes #633 Signed-off-by: hari gowtham <hgowtham@redhat.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Update travis-ci build propertiesAdam Stokes2015-09-291-2/+1
| | | | | | | Utilize their container based build system for faster runs. Update test version matrix. Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* [kubernetes] Change 'minions' to 'nodes'.Jake Hunsaker2015-09-291-1/+1
| | | | | | | | | | | | Kube no longer uses 'minions' and only accepts 'nodes' in kubectl. Previous versions of kubectl all accepted both 'nodes' and 'minions' however since v1.0, 'minions' has been deprecated. Closes #638 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* [docs] add contributor guidelines link to patch docsBryn M. Reeves2015-09-291-0/+3
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [config] remove 'general' section from example sos.confBryn M. Reeves2015-09-291-7/+0
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openstack] New openstack_instack plugin.Lee Yarwood2015-09-251-0/+75
| | | | | | | | | | | | | | | | | | | | | Add a new plugin for instack [1] and instack-undercloud [2]. These two components are currently used to drive the deployment of the undercloud in RDO Manager and RHEL OSP director environments. Instack itself is considered low level tooling and is in turn called by higher level user applications such as the RDO Manager Openstack client plugin [3]. This plugin also adds a new openstack_undercloud profile to be used to tag simillar Openstack plugins that are only found in the undercloud. [1] https://github.com/rdo-management/instack [2] https://github.com/rdo-management/instack-undercloud [3] https://github.com/rdo-management/python-rdomanager-oscplugin Resolves #620. Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
* [openstack_swift] fix regex issue in postproc methodPoornima2015-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | "The regex currently used by openstack_swift is: "/etc/swift/*.conf*" This matches any filename beginning with 'con': "/etc/swift/con*" and causes the plugin to attempt regex substitution on several binary files in the directory causing errors: "substitution failed for '/etc/swift/container.builder'" "regex substitution failed for '/etc/swift/container.ring.gz'" Purposing a fix by changing the regex to match only intended configuration files (*.conf*) in this directory. Fixes #636. Signed-off-by: Poornima M. Kshirsagar pkshiras@redhat.com
* [openstack_neutron] obfuscate server_auth in restproxy.iniPavel Moravec2015-09-071-1/+1
| | | | | | | | | server_auth secrets in /etc/neutron/plugins/ml2/restproxy.ini need to be obfuscated. Resolves: #639 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [ovirt] obfuscate passwords in aaa profilesTim Speetjens2015-09-041-0/+10
| | | | | | | | | | | With aaa profiles configured in /etc/ovirt-engine/aaa, all .properties files in this directory may contain passwords in keys vars.password, pool.default.ssl.truststore.password and potentially pool.default.auth.simple.password Resolves #588 Signed-off-by: Tim Speetjens <tim.speetjens@redhat.com>
* [memory] collect swapon --show output in bytesBryn M. Reeves2015-08-271-1/+1
| | | | | | | | | | | | | | | | Default is human readable: $ swapon --show NAME TYPE SIZE USED PRIO /dev/dm-0 partition 1.5G 0B -1 Should be: $ swapon --show --bytes NAME TYPE SIZE USED PRIO /dev/dm-0 partition 1610608640 0 -1 Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [networking] brctl command is run when bridge kernel module is loaded onlyKeigo Noha2015-08-272-7/+19
| | | | | | | | | | | | | | | Previously, bridge information were collected even if bridge kernel module were not loaded. brctl command requires and loads bridge and related kernel modules to accomplish its purporse. This behaviour causes unexpected and unnecessary kernel module loading. sosreport should not change the system configuration. This patch will change this behaviour to run brctl command only if bridge module is loaded. Closes #616 Signed-off-by: Keigo Noha <knoha@redhat.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* [openstack] New Ironic plugin.Lee Yarwood2015-08-271-0/+84
| | | | | | | | | | | Add a new plugin for Ironic, a bare metal provisioning service for openstack. Closes #577 [1] https://wiki.openstack.org/wiki/Ironic Signed-off-by: Lee Yarwood <lyarwood@redhat.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* [sosreport] fix command-line report defaultsPavel Moravec2015-08-271-1/+1
| | | | | | | | | | Original commit a7ef3ca was accidentally reverted in cb3d265. This commit applies the a7ef3ca again. Fixes #625 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* [ldap] Fix plugin runtime failure on debian basedLouis Bouchard2015-08-261-2/+2
| | | | | | | | | | Plugin should call DebianPlugin class and missing comma in call. Closes #626 Closes #627 Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* [landscape] Collect landscape statusBryan Quigley2015-08-171-0/+1
| | | | | | | | | | The lsctl command gives more details on the current status of landscape. Closes #622 Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* [sapnw] call self methods properlyPavel Moravec2015-08-041-2/+2
| | | | | | Call methods from the self class within "self." scope. Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [sapnw] Add check if saphostctrl is not presentPavel Moravec2015-08-031-13/+17
| | | | | | | | | | | | Split listing&collecting instances and dbs from lengthy setup(). Break execution when "inst_out = self.get_cmd_output_now" returns None. db_out is already checked this way. Resolves: #614 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [logs] fix reference to missing 'rsyslog_conf' variableBryn M. Reeves2015-08-031-0/+1
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [Plugin] fix handling of symlinks in non-sysroot environmentsBryn M. Reeves2015-08-031-0/+2
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sapnw] uses a deprecated Sets modulePavel Moravec2015-07-291-2/+1
| | | | | | | | | Use built-in set class instead of deprecated Set for sidsunique Resolves: #608 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* [openstack] Ensure openstack passwords and secrets are obfuscated.Lee Yarwood2015-07-1711-48/+100
| | | | | | | | | | | | | - Add a postproc method to ceilometer, cinder, glance, hoirzon and swift. - Add missing keys to the remaining plugins. - Modify the regular expression used by all plugins to ignore commented out keys. - Modify all plugins to use do_path_regex_sub() to apply regex to all collected configuration files. Resolves: #574 Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
* [plugin] pass stderr through _collect_cmd_outputPavel Moravec2015-07-131-1/+1
| | | | | | | | | | | | Commit f06efd6 removed passing stderr in _collect_cmd_output to get_cmd_output_now. That prevents passing stderr=False in several scenarios. This fix adds the argument to be passed back. Resolves: #600 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [juju] Update log collection to have limitsBryan Quigley2015-07-121-1/+21
| | | | | | | | | | | | | | | | | | | Juju can name files differently depending on the deployment so we need iterate over all the files and capture at least some of them all. At the same time the files can get quite big so we need to be able to limit their size. Now captures upstart/juju-db.log which is usually quite small. Juju local is usually used for testing so we just capture all-machines.log for that (format /var/log/juju-name-name/) Lastly we capture the ls of all of the key directories just in case we missed something. Closes #593 Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* [networking] Collect plotnetcfg output.Lee Yarwood2015-07-081-0/+1
| | | | | | | | | | | | | | | | The plotnetcfg tool [1] has recently been packaged for Fedora and provides a useful method for visualising complex host network toplogies. In the case of Openstack hosts this includes Openvswitch devices, flows etc. The resulting file can be used to generate a PDF visualising this with the following command : `cat plotnetcfg | dot -Tpdf > output.pdf` [1] https://github.com/jbenc/plotnetcfg Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
* [last] information about login actionsAlexandru Juncu2015-07-081-0/+33
| | | | | | | | | | | This is useful information to be correlated with shutdown/reboot events in /var/log/messages to identify graceful shutdowns/reboots and lower false positives about system crashes. Resolves #572. Signed-off-by: Alexandru Juncu <alexj@linux.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [kernel, kernelrt] Collect clock source for all kernelsPeter Portante2015-07-082-4/+7
| | | | | | | Resolves #580. Signed-off-by: Peter Portante <peter.portante@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [plugins] trim leading '../' from links when sysroot is setBryn M. Reeves2015-07-082-0/+4
| | | | | | | | When SYSROOT is not '/' relative symlinks need to be trimmed to remove the extra leading '../' returned by abspath('/sysroot/...'). Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [plugins] do not strip SYSROOT when copying link targetsBryn M. Reeves2015-07-081-1/+2
| | | | | | | | The abspath() call in _copy_symlink returns a host-relative path (when SYSROOT is not '/'). Pass this directly to _do_copy_path() without stripping the SYSROOT path component. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [kubernetes] add journal output for kube servicesNeependra Khare2015-07-081-0/+4
| | | | | | | | | | | | Add journalctl output for the following kubernetes units: kube-apiserver kube-controller-manager kube-scheduler kube-proxy Signed-off-by: Neependra Khare <nkhare@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [plugins] automatically re-try chroot'ed commands in the hostBryn M. Reeves2015-07-082-5/+12
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [docker] add 'docker' to the package list for Red Hat distrosJeremy Eder2015-07-081-1/+1
| | | | | | | | | The docker package is named 'docker-io' in Fedora and 'docker' in RHEL and other downstream products. Add the 'docker' name to the package list in RedHatDocker to ensure the plugin runs. Signed-off-by: Jeremy Eder <jeder@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [policies/redhat] add Red Hat Atomic Host policyBryn M. Reeves2015-07-081-1/+38
| | | | | | Add a new policy for the Red Hat Atomic Host. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [policies/redhat] automatically set tmp_dir in containersBryn M. Reeves2015-07-081-2/+5
| | | | | | | | | | | | | Now that policies have the infrastructure to detect that they are running in a container and to use the HOST environment variable if present enable automatic setting of self._tmp_dir in appriate container environments. This causes reports to be automatically written to $HOST/var/tmp when $HOST is set while still allowing users to override the tmp path manually by specificying --tmp-dir=PATH. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [kubernetes] add services and pod logs collectionNeependra Khare2015-07-081-0/+12
| | | | | Signed-off-by: Neependra Khare <nkhare@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [etcd] split etcd functionality from kubernetes into new pluginNeependra Khare2015-07-082-8/+36
| | | | | Signed-off-by: Neependra Khare <nkhare@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosoptions] ensure '_sysroot' and '_chroot' are initialisedBryn M. Reeves2015-07-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure the sysroot and chroot members of the SoSOptions object are initialised to prevent exceptions when these are not set on the command line: sosreport 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 1490, in main sos = SoSReport(args) File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 673, in __init__ self.policy = sos.policies.load(sysroot=self.opts.sysroot) File "/usr/lib/python2.7/site-packages/sos/policies/__init__.py", line 40, in load cache['policy'] = policy(sysroot=sysroot) File "/usr/lib/python2.7/site-packages/sos/policies/redhat.py", line 192, in __init__ super(FedoraPolicy, self).__init__(sysroot=sysroot) File "/usr/lib/python2.7/site-packages/sos/policies/redhat.py", line 58, in __init__ if self.package_manager.all_pkgs()['filesystem']['version'][0] == '3': File "/usr/lib/python2.7/site-packages/sos/policies/__init__.py", line 116, in all_pkgs self.packages = self.get_pkg_list() File "/usr/lib/python2.7/site-packages/sos/policies/__init__.py", line 99, in get_pkg_list pkg_list = shell_out(cmd, chroot=self.chroot).splitlines() File "/usr/lib/python2.7/site-packages/sos/utilities.py", line 191, in shell_out return sos_get_command_output(cmd, chroot=chroot, chdir=runat)['output'] File "/usr/lib/python2.7/site-packages/sos/utilities.py", line 156, in sos_get_command_output raise e OSError: [Errno 1] Operation not permitted: '/' Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [policies] pass --sysroot down to policy classesBryn M. Reeves2015-07-085-17/+22
| | | | | | | | | Policies that don't auto-detect a container environment with a host file system need to pass the value of --sysroot down to the PackageManager class in order to obtain package details from the chroot environment. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [firewalld] work around command hangs in container environmentsBryn M. Reeves2015-07-081-1/+3
| | | | | | | Add a 10s timeout to firewalld-cmd execution to avoid long dbus timeouts in docker containers. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] set SYSROOT by policyBryn M. Reeves2015-07-081-3/+10
| | | | | | | | If --sysroot is not given on the command line and Policy.in_container() is True set sysroot automatically if Policy.get_host_sysroot() is not '/'. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [policies] add container support to Red Hat policyBryn M. Reeves2015-07-081-2/+21
| | | | | | | | | | | | | Check for the presence of container-specific environment variables and set _host_sysroot if present: container_uuid=UUID HOST=/path If both a container environment variable and HOST are present run the PackageManager query command in a chroot. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [policies] make PackageManager and Policy sysroot-awareBryn M. Reeves2015-07-081-2/+20
| | | | | | | | | Add methods to Policy to get the host root file system path and to test if sos is running in a container and allow Policy classes to pass a chroot path into the PackageManager constructor in order to obtain package data from the chroot. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [utilities] add chroot support to shell_out()Bryn M. Reeves2015-07-081-2/+3
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [docs] fix documentation of --sysroot parameterBryn M. Reeves2015-07-081-1/+1
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [kubernetes] new pluginNeependra Khare2015-07-081-0/+46
| | | | | | | Add a plugin for Kubernetes support. Signed-off-by: Neependra Khare <nkhare@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [plugin] handle ELOOP in _copy_dir()Bryn M. Reeves2015-07-081-4/+12
| | | | | | | | | | | | | | | | | | | | | A problem with systemd's management of the binfmt_misc automount point in Atomic environments causes attempts to access this path to fail with ELOOP: >>> import os >>> os.listdir("/host/proc/sys/fs/binfmt_misc/") Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: [Errno 2] No such file or directory: '/host/proc/sys/fs/binfmt_misc/' For reasons that are not yet clear this causes the entire sos process to immediately terminate. For now avoid the problem by enclosing the problem os.listdir in a try/except block that explicitly handles the one errno value implicated here. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [docs] add --chroot to sosreport.1Bryn M. Reeves2015-07-081-0/+8
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [lvm2] don't chroot if tmp is not inside sysrootBryn M. Reeves2015-07-081-1/+1
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [logs] fix do_regex_find_all() use for --sysrootBryn M. Reeves2015-07-081-4/+4
| | | | | | | | The logs plugin searches syslog configuration files. When using --sysroot the plugin needs to use join_sysroot() to open the correct path. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [libvirt] use join_sysroot() before calling os.path.existsBryn M. Reeves2015-07-081-1/+1
| | | | | | | The libvirt plugin tests for the presence of files. Use join_sysroot() to ensure the correct path is tested. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>