aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix verbose file loggingBryn M. Reeves2014-02-032-1/+2
| | | | | | | | | Prior versions of sos enable debug logging to the embedded log file (sos_logs/sos.log) when a single '-v' is given. Restore this behaviour and ensure that command-not-found messages are reported at 'info' rather than 'warning' level. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Fix get_option() use in cluster pluginBryn M. Reeves2014-02-031-3/+3
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Fix cluster postproc regressionBryn M. Reeves2014-01-311-0/+2
| | | | | | | Commit 4ab4b08 inadvertently removed the postprocessing rules for luci configuration. Revert that part of the commit. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Ensure superclass postproc method is called in ldap pluginBryn M. Reeves2014-01-311-0/+2
| | | | | | | | | Since the ldap plugins add files and post-processing methods at multiple class levels (Ldap, RedHatLdap etc.) derived classes must explicitly call their parent class's postproc() method to apply all substitutions to collected data. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Remove obsolete diagnostics code from ldap pluginBryn M. Reeves2014-01-311-12/+0
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Fix cluster module crm_report supportBryn M. Reeves2014-01-311-8/+19
| | | | | | | | | | | | | The cluster plugin used an obsolete sos-2.2 method to determine the command output directory. This causes an excaption at runtime since the referenced properties no longer exist. The crm_report script also expects a --from date and will not collect data unless this is passed. Default to passing a value 72 hours before the current time and add a 'crm_from' option to the cluster module to allow the user to override this. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Update debian changelog3.1Adam Stokes2014-01-271-1/+0
| | | | Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Add /etc/network/interfaces to networking pluginAdam Stokes2014-01-271-0/+1
| | | | Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Force foreman to be quietAdam Stokes2014-01-271-1/+1
|\ | | | | | | | | | | Fixes #230 Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
| * Force foreman plugin to be quietLukas Zapletal2014-01-201-1/+1
| |
* | Fix unittests to report on strings and not binaryAdam Stokes2014-01-271-2/+2
| | | | | | | | Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* | Fix plugin load error due to Popen returning binary data. Other fixes listedAdam Stokes2014-01-274-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | below sos/plugins/anacron.py: - add one line description during verbose output for anacron sos/archive.py, sos/utilities.py: - make sure to return a string after a Popen call which initially returns binary sos/plugins/named.py: - Remove unused import of commands Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* | Tidy up formatting of UI preamble textBryn M. Reeves2014-01-242-29/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The formatting of the template preamble used a narrow terminal width since there is no native python method for obtaining the actual terminal geometry and the common methods for doing this are non-portable (e.g. Windows specific ioctls or shelling out to stty). This causes the top of the message to scroll off the screen on a standard 80x25 terminal (e.g. putty or a non-resized gnome-terminal or xterm window). Remove the paragraph indentation and increase the assumed width from 58 to 72 chars. This causes the message to fill a standard 80x25 terminal without scrolling. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | Remove obsolete rhel_version() usage from yum pluginBryn M. Reeves2014-01-241-2/+0
| | | | | | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | Remove --upload optionBryn M. Reeves2014-01-244-118/+25
|/ | | | | | | | | | | | The --upload option has a lot of limitations and has not been widely used. Recent trends are to handle uploading data in higher-level tools (e.g. redhat-support-tool or web based management UIs) and the python ftp library does not support modern requirements like HTTP proxy traversal or encryption. Fixes Issue #217 Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Update debian packaging to use pybuild and prep for 3.1 release.Adam Stokes2014-01-155-17/+23
| | | | Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Fix XS-Python-Version to XS-Python3-VersionAdam Stokes2014-01-151-1/+1
| | | | Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Fix missing depends on python3:DependsAdam Stokes2014-01-151-1/+1
| | | | Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Capture MAAS services' upstart logs.Raphael Badin2014-01-151-0/+1
| | | | | | | Fixes #229 Signed-off-by: Raphael Badin <raphael.badin@canonical.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Add Raphael Badin to AUTHORS:::::::::::::::::::: Adam :::::::::::::::::: Stokes2014-01-061-0/+1
| | | Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Capture /var/log/apache2. Capture the versions of relevant packages.Raphael Badin2014-01-061-6/+10
| | | | | | | Fixes #227 Signed-off-by: Raphael Badin <raphael.badin@canonical.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Fixed config file collection for Debian/UbuntuLouis Bouchard2013-12-171-3/+20
| | | | | | | Fixes: #222 Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Fix print syntax error to be compatible with py2 and py3Adam Stokes2013-12-091-1/+1
| | | | Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Rename OpenStack Quantum to NeutronAlan Pevec2013-12-022-90/+90
| | | | | | | | This rename happened in now current release OpenStack Havana. Fixes #220 Signed-off-by: Alan Pevec <apevec@redhat.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Make command quoting in log messages consistentBryn M. Reeves2013-11-261-1/+1
| | | | | | | | The last commit adds a log message for commands that time out but is inconsistent with other messages that include an external command string. Quote the command for better readability. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Log a warning when external commands time outBryn M. Reeves2013-11-261-3/+11
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Do not collect anaconda-ks.cfg in general plug-inBryn M. Reeves2013-11-261-2/+2
| | | | | | | | | The anaconda kickstart file is Red Hat specific and should not be collected in the general plugin. It may also contain plaintext or encrypted passwords - these are handled properly in the anaconda plugin itself but are missing from the copy in general. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Revert change to --plugin-options parser actionBryn M. Reeves2013-11-181-1/+1
| | | | | | | | | | | | | | | | | | Commit 6ea48cb changed the action for the -k/--plugin-option command line argument from 'extend' to 'append'. This breaks the handling of options that are chained with a ',': logs.logsize 1,logs.all_logs max size (MiB) to collect per syslog file logs.all_logs off collect all log files defined in syslog.conf vs: logs.logsize 1 max size (MiB) to collect per syslog file logs.all_logs on collect all log files defined in syslog.conf Revert to an 'append' action for this switch. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Reclasify 'error' messages as 'warning'Bryn M. Reeves2013-11-183-4/+4
| | | | | | | | | | Several log messages used the 'error' level when reporting an event that is not necessarily an error (and does not prevent sos from continuing). Reclassify these to the 'warning' log level instead. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Change default console log level to WARNING to match sos-2.2Bryn M. Reeves2013-11-181-1/+1
| | | | | | | | | | Commit 6ea48cb changed the default log level for console output from WARNING to ERROR and reclassified several messages. This causes plug-in validation messages to be silent at the default verbosity. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* debian/control: fix typo from python to python3Adam Stokes2013-11-151-1/+1
| | | | Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* debian/rules: switch to with-python3 argumentAdam Stokes2013-11-151-1/+1
| | | | Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Make ethernet interface detection more robustBryn M. Reeves2013-11-151-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The networking module parses the link information in the output of the 'ip -o addr' command to determine a list of ethernet interfaces on which to run ethtool. An upstream change in the iproute package appears to have introduced a regression in the output of this command which causes link information to not be displayed: 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000\ link/ether 52:54:00:ce:9d:6d brd ff:ff:ff:ff:ff:ff 2: eth0 inet 192.168.122.31/24 brd 192.168.122.255 scope global eth0\ valid_lft forever preferred_lft forever 2: eth0 inet6 fe80::5054:ff:fece:9d6d/64 scope link \ valid_lft forever preferred_lft forever vs: 2: eth0 inet 192.168.122.31/24 brd 192.168.122.255 scope global eth0\ valid_lft forever preferred_lft forever 2: eth0 inet6 fe80::5054:ff:fece:9d6d/64 scope link \ valid_lft forever preferred_lft forever This breaks detection of ethernet interfaces and all ethtool data collection. This was introduced in the following iproute commit: commit af9d406f99853848054162ed7aefbe71dc03e433 Author: Mike Frysinger <vapier@gentoo.org> Date: Mon Aug 13 08:09:52 2012 -0700 Fix regression with 'ip address show' Which appears to fix a different problem (i.e. the change to link info was unintended). Make this more robust by switching the networking module to use 'ip -o link' instead which explicitly requests the required information. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Change tab -> space in sunrpc and nfs pluginsBryn M. Reeves2013-11-142-2/+2
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Fix regressions introduced with --build optionBryn M. Reeves2013-11-142-22/+27
| | | | | | | | | | | | | | | The changes to reinstate the --build option introduced two regressions: - Running sosreport with no otions generates a backtrace due to a non-existant _build member in the SoSOptions object - Running sosreport without --build leaves the temporary archive directory in places with the sos_logs directory containing sos.log and ui.log due to changes in the order of log shutdown and archive creation. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Replace print statements with six.print_() callsBryn M. Reeves2013-11-142-12/+14
| | | | | | | | | | | | | | | | | | | | | | Using the print statement as though it was a function leads to incorrect behaviour in a python2 runtime. E.g.: print() print( "Some examples:") print() Produces: () Some examples: () Instead replace use of the print keyword with a call to the six module's print_() function. Fixes Issue #219 Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Remove unused urllib import from plugins moduleBryn M. Reeves2013-11-141-1/+1
| | | | | | | | | | | | The urllib import via six.moves in the plugins module is unused. This causes an exception on some distributions when attempting to import the moved module. Drop the import since nothing in the plugin classes is using it. Fixes Issue #218 Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Remove debug statements from logs pluginBryn M. Reeves2013-11-131-3/+0
| | | | | | | | The 'all_logs' path of the logs plugin has three leftover debug print statements. Remove them to avoid cluttering the console output when the option is used. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Increase plugin name padding in list_plugins outputAdam Stokes2013-11-121-2/+2
| | | | | | | openstack-* is longer than the allotted 15 spaces, increased to 20 to make things line up again. Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* sos plugins filesyste, xfs, python2/python3 compatbilityAdam Stokes2013-11-122-5/+5
| | | | Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* sos/sosreport.py: more py3/py2 compatability changesAdam Stokes2013-11-122-6/+14
| | | | Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Fixes #209Adam Stokes2013-11-129-63/+110
|\ | | | | | | | | | | Forward merges from master to make this PR mergeable again. Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
| * Fix typo in yum add_forbidden_paths()Bryn M. Reeves2013-11-121-2/+2
| | | | | | | | | | | | | | The PKI files that should be omitted are in /etc/pki/entitlement, not /etc/pki/entitlements as the plug-in currently uses. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
| * Add simple nfs plug-inBryn M. Reeves2013-11-081-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There has been an nfsserver plug-in for some time however no corresponding client-side data is collected. This was added to sos-2.2 earlier this year. This commit is a forward port of those changes: commit 71066b4a7d4fd97692b50bf231ad6810df5ec3d0 Author: root <root@rhel6-vm2.(none)> Date: Wed Jul 10 17:11:52 2013 +0100 Collect additional nfs-client relevant files Additional NFS client-side data collection: "/etc/nfsmount.conf", "/proc/fs/nfsfs/servers", "/proc/fs/nfsfs/volumes" Signed-off-by: Bryn M. Reeves <bmr@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
| * Fix regex substitution in openhpi plug-inBryn M. Reeves2013-11-071-6/+2
| | | | | | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
| * Fix traceback when sar module is force-enabledBryn M. Reeves2013-11-071-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Forward port of the following sos-2.2 fix: commit d4e3bcc3ed247d8d9a1228c3661b6456f534daf4 Author: Bryn M. Reeves <bmr@redhat.com> Date: Mon Aug 12 18:42:48 2013 +0100 Fix traceback when sar module is force-enabled The sar plug-in assumes that when it runs the /var/lib/sa directory and binaries exist (they are part of checkenabled() for this module). This leads to a traceback when the plug-in lists a non-existent directory on hosts where sar is not installed but '-o sar' is specified on the command line. Catch the exception and exit gracefully. (Edited by bmr to improve error message logged). Signed-off-by: David Kutálek <dkutalek@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
| * Fix foreman and katello for sos-3.xBryn M. Reeves2013-11-072-26/+16
| | | | | | | | | | | | | | | | | | | | | | The foreman and katello plug-ins committed in 4650d3f use the sos-2.2 APIs and class names. This breaks sos since the plug-ins will not load under 3.0. Fix up the modules to use the new names and API conventions and ensure that they load correctly. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
| * Restore --build command line optionBryn M. Reeves2013-11-073-26/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Releases of sos prior to 3.0 included the '--build' option to disable creation of a compressed archive and to leave the temporary build tree in place. This was removed with the reorganisation of the archive classes to support in-line archiving. Since all supported policies are now using an archive that derives from FileCacheArchive (commit 0178d5f) the option can be re-introduced. Archive classes that do not accumulate files in a temporary directory will return the path to the in-progress archive file. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
| * Normalize temporary directory pathBryn M. Reeves2013-11-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The archive and temporary file handling classes expect to operate on absolute paths. If a user specifies a relative path via the command line --tmp-dir switch it must be normalized before being passed to these classes to provide correct behaviour. Failing to do this causes a variety of errors: the final archive cannot be created since the path is constructed incorrectly and temporary files are not cleaned up since they are not at the "expected" location. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | fix print syntaxes for py2 and py3 also address an issue with powerpc pluginAdam Stokes2013-11-065-77/+78
| | | | | | | | | | | | that was formatted with tabs. Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>