aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix config file regressionBryn M. Reeves2013-10-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Changes in the organisation of sos in commit 6ea48cb broke the reading of custom configuration files (either the default /etc/sos.conf or one specified on the command line using --config-file): 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 1167, in main sos.execute() File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1133, in execute self._set_tunables() File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 798, in _set_tunables if not opt.split('.')[0] in self.disabled: AttributeError: 'SoSReport' object has no attribute 'disabled' The code attempts to reference the obsolete 'disabled' list of plug-ins (rather than calling self._get_disabled_plugins()) and failed to initialise the plugopts list to an empty deque. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* This patch defines a new PowerPC Plugin to collect generic Power logs.Bryn M. Reeves2013-10-301-0/+73
| | | | | | | | | | | | | | | Based on further platform checks,IBM Power System specific logs and commands will be collected. This would help IBM Power system users to collect system data in one shot by running sosreport. Signed-off-by: Bharani C.V. <bharanve@linux.vnet.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com> --- sos/plugins/powerpc.py | 73 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sos/plugins/powerpc.py
* Fix --alloptionsBryn M. Reeves2013-10-301-1/+2
| | | | | | | | | | During the re-organisation of sosreport.py the code to apply all boolean options to plug-ins was factored out into its own function, _set_all_options() however this was never called from the main execute() method. Fix this to allow the option to work as previously. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Check for usable temporary directoryBryn M. Reeves2013-10-301-0/+6
| | | | | | | | A user may override the sos temporary directory via --tmp-dir to a non-existent or unwritable location. Check for this before initialising temporary files and exit with an error message. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Remove version checks in gluster plug-inBryn M. Reeves2013-10-291-16/+2
| | | | | | | Current distributions do not include the legac package versions that the plug-in was checking for. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Limit default sar data collectionBryn M. Reeves2013-10-291-1/+11
| | | | | | | | | | | By default the general module will scoop up all files under the /var/log/sa directory. With some configurations this path could contain many GB of data. Use add_copy_spec_limit() by default for sar data and add a new option sar.all_sar=False to allow the user to override this. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Move sar data colletion to sar plug-inBryn M. Reeves2013-10-292-1/+1
| | | | | | | | | | | Historically the general plug-in collected the content of the /var/log/sa directory while a separate sar plug-in handles the text formatted summary files. This makes little sense and adds to the bloat in the "general" module; move the collection to the sar plug-in itself. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Remove capturing redundant database export in MAASAdam Stokes2013-10-251-1/+0
| | | | Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Remove OpenStack Dashboard plug-inBryn M. Reeves2013-10-221-82/+0
| | | | | | | | | Following the reorganisation of the OpenStack plug-ins the dashboard module now duplicates functionality provided by the horizon plug-in. Remove it and keep all the horizon and dashboard support in a single module. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Make OpenStack Keystone password removal defaultBryn M. Reeves2013-10-221-16/+15
| | | | | | | | The keystone plug-in used a command line option to enable password removal. This should be the default behaviour - remove the option and always apply the password replacement rules. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Fix configuration files paths for novaXavier Queralt2013-10-221-3/+2
| | | | Signed-off-by: Xavier Queralt <xqueralt@redhat.com>
* Fix password protection for novaXavier Queralt2013-10-221-14/+11
| | | | Signed-off-by: Xavier Queralt <xqueralt@redhat.com>
* Split out Cinder, Dashboard, Nova and Quantum from OpenStackBryn M. Reeves2013-10-225-135/+357
| | | | | | | | Split out support for the OpenStack Cinder, Dashboard, Nova and Quantum components from the single OpenStack plug-in. Signed-off-by: Jeremy Agee <jagee@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Update AUTHORSAdam Stokes2013-10-211-0/+1
|
* Merge pull request #206 from jamesodhunt/masterAdam Stokes2013-10-212-0/+66
|\ | | | | | | Addition of plugins for procenv and upstart. Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
| * Added plugin for Upstart (event-based init daemon).James Hunt2013-10-211-0/+41
| | | | | | | | Signed-off-by: James Hunt <james.hunt@ubuntu.com>
| * Added plugin for procenv (process environment).James Hunt2013-10-211-0/+25
|/ | | | Signed-off-by: James Hunt <james.hunt@ubuntu.com>
* Update readme to point to contributor guidelinesAdam Stokes2013-10-181-3/+11
| | | | Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Improve plugin by adding apt log collection and update AUTHORSAdam Stokes2013-10-182-1/+2
|\ | | | | | | | | | | | | | | Closes: #204 Added Lukas to AUTHORS file for his contribution of katello/foreman Signed-off-by: Louis Bouchard <louis.bouchard@ubuntu.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
| * Improve plugin by adding apt log collectionLouis Bouchard2013-10-161-1/+1
| | | | | | | | Closes: #204
* | Adding plugins foreman and katelloAdam Stokes2013-10-183-38/+72
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since CloudForms 1.0 has been renamed to Satellite 6.0, I am deleting this plugin and providing two other plugins. Both projects Katello and Foreman are upstream projects for Satellite 6.0 Red Hat products. Since both projects support deployment on non-redhat systems, they both deliver own reporting script that collects information from target system. Both scripts have options not to create tarball and to provide output to desired directory. This has been tested on RHEL 6.4. Signed-off-by: Lukas Zapletal <lzap+git@redhat.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
| * | Adding plugins foreman and katelloLukas Zapletal2013-10-143-38/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since CloudForms 1.0 has been renamed to Satellite 6.0, I am deleting this plugin and providing two other plugins. Both projects Katello and Foreman are upstream projects for Satellite 6.0 Red Hat products. Since both projects support deployment on non-redhat systems, they both deliver own reporting script that collects information from target system. Both scripts have options not to create tarball and to provide output to desired directory. This has been tested on RHEL 6.4. Signed-off-by: Lukas Zapletal <lzap+git@redhat.com>
* | | Fix shell output unittestsAdam Stokes2013-10-181-2/+2
| | | | | | | | | | | | | | | | | | Since fix for 0ed431a went in we revert our unittests to the old (working) behavior. Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* | | Move Quantum/Neutron collection into its own plugin.Brent Eagles2013-10-172-14/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed quantum specific collection commands from the openstack plugin and put them into a separate module. The plugin is also neutron/quantum agnostic and should work for basic collection in grizzly and havana based OpenStack installs. Open vSwitch and network namespace collection also added. Conflicts: sos/plugins/openstack.py Signed-off-by: Brent Eagles <beagles@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | | Verify fewer packages in rpm plug-inBryn M. Reeves2013-10-161-1/+4
| |/ |/| | | | | | | | | | | | | The current default set of packages to verify includes debuginfo and devel subpackages. Filter these out to reduce the time spent running rpm -V. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | Add OpenStack Keystone and Horizon plug-insBryn M. Reeves2013-10-153-18/+149
| | | | | | | | | | | | | | | | Split out the Keystone and Horizon support from the main OpenStack plug-in and put them in their own modules. Signed-off-by: Jeremy Agee <jagee@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | Remove obsolete workaround for newline added by pipe.communicate()Bryn M. Reeves2013-10-151-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Remove useless os.path.exists check for brctl executableBryn M. Reeves2013-10-151-6/+5
|/ | | | | | | | | | | 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>
* Fix exception in command output substitutionBryn M. Reeves2013-10-061-1/+4
| | | | | | | | | | | | | | | | 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>
* Include /etc/yaboot.conf in boot plug-inBryn M. Reeves2013-10-041-0/+1
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Do not exit on interactive mode read exceptionsBryn M. Reeves2013-10-031-1/+1
| | | | | | | | | | | 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>
* No TTY should not imply batch modeBryn M. Reeves2013-10-031-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge pull request #202 from karibou/masterAdam Stokes2013-09-301-0/+31
|\ | | | | | | | | Add new plugin for apt Signed-off by: Adam Stokes <adam.stokes@ubuntu.com>
| * Add new plugin for aptLouis Bouchard2013-09-301-0/+31
|/ | | | Closes #201
* Update AUTHORSAdam Stokes2013-09-091-0/+2
| | | | Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Merge branch 'master' of github.com:jpeeler/sosreport into jpeeler-masterAdam Stokes2013-09-091-0/+59
|\ | | | | | | | | | | | | | | | | | | 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>
| * Add new plugin for openstack-heatJeff Peeler2013-08-271-0/+59
| |
* | Add new plugin for openstack-ceilometer.Eoghan Glynn2013-09-091-0/+53
| | | | | | | | | | | | | | Closes #199 Signed-off-by: Eoghan Glynn <eglynn@redhat.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* | Update travis-ci notifications for ircAdam Stokes2013-09-081-0/+4
| | | | | | | | Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* | Update README.mdAdam Stokes2013-09-081-1/+1
| | | | | | Replace travis-ci status image with that of this upstream repo.
* | Split Cinder out of openstack's plugin. #183Flaper Fesp2013-09-072-18/+65
| | | | | | | | | | Signed-off-by: Flavio Percoco <fpercoco@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | Merge pull request #188 from FlaPer87/issue/184Bryn M. Reeves2013-09-072-18/+55
|\ \ | | | | | | Split Swift out of openstack's plugin. #184
| * | Split Swift out of openstack's plugin. #184Flaper Fesp2013-09-072-18/+55
| |/ | | | | | | Signed-off-by: Flavio Percoco <flaper87@gmail.com>
* | Merge pull request #187 from FlaPer87/issue/182Bryn M. Reeves2013-09-072-15/+54
|\ \ | | | | | | Split Glance out of openstack's plugin
| * | Split Glance out of openstack's plugin. #182Flaper Fesp2013-09-072-15/+54
| |/ | | | | | | Signed-off-by: Flavio Percoco <flaper87@gmail.com>
* | Merge pull request #194 from wenjianhn/import-sysAdam Stokes2013-09-041-0/+1
|\ \ | |/ |/| import sys - Module sys is used but it is not imported.
| * import sysJian Wen2013-09-041-0/+1
|/ | | | Module sys is used but not imported.
* Make semange use stdout instead of output pathBryn M. Reeves2013-08-221-2/+1
| | | | | | | | | | 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 Plugin method to build command output pathsBryn M. Reeves2013-08-212-6/+15
| | | | | | | | | | | | | 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>
* Add Plugin method to create new command output directoriesBryn M. Reeves2013-08-211-0/+5
| | | | | | | | | | | | 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>