View Bazaar branches
Get this repository:
git clone https://git.launchpad.net/sosreport

See all merge proposals.

Import details

Import Status: Reviewed

This repository is an import of the Git repository at https://github.com/sosreport/sos.

The next import is scheduled to run .

Last successful import was .

Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 1 minute — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 30 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-5 and finished taking 40 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-4 and finished taking 40 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-3 and finished taking 1 minute — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-3 and finished taking 40 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-3 and finished taking 40 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-3 and finished taking 40 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-2 and finished taking 1 minute — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 3 minutes — see the log

Branches

Name Last Modified Last Commit
main 2024-07-23 23:43:06 UTC
[pam] Capture authselect config file

Author: Jose Castillo
Author Date: 2024-07-16 06:49:46 UTC

[pam] Capture authselect config file

Capture authselect config file

Related: RHEL-48608

Signed-off-by: Jose Castillo <jcastillo@redhat.com>

legacy-3.9 2024-03-02 16:05:05 UTC
[foreman] scrub admin init password in installer logs

Author: Barbora Vassova
Author Date: 2024-01-11 12:18:43 UTC

[foreman] scrub admin init password in installer logs
Obfuscate several instances of passwords:

"--foreman-initial-admin-password", "mySecret",
+candlepin.amqp.keystore_password=secretHash1
+jpa.config.hibernate.connection.password=secretHash2

by enhancing the scrubbing of:

--password='secretPwd'

Relevant: #3475

Signed-off-by: Barbora Vassova <bvassova@redhat.com>

bmr-misc-fixes 2020-05-22 11:57:18 UTC
[policies/cos] eliminate 'id' local variable

Author: Bryn M. Reeves
Author Date: 2020-05-22 11:53:47 UTC

[policies/cos] eliminate 'id' local variable

The string 'id' is a Python keyword: do not use it as a local
variable name.

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

bmr-py2less-tests 2020-02-17 17:05:43 UTC
[tests] add license header to source files

Author: Bryn M. Reeves
Author Date: 2020-02-17 17:05:43 UTC

[tests] add license header to source files

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

bmr-container-runtime-policy 2020-02-14 20:24:17 UTC
[podman] Update plugin to utilize policy container runtime

Author: Jake Hunsaker
Author Date: 2019-12-17 17:44:07 UTC

[podman] Update plugin to utilize policy container runtime

Updates the plugin to use the new `ContainerRuntime` abstraction
provided by the loaded `Policy` rather than shelling out again to get
the same data loaded during `Policy` initialization.

Resolves: #1873

Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>

bmr-ts-perf 2020-02-14 18:16:35 UTC
[policies] fix LinuxPolicy performance regression (test suite)

Author: Bryn M. Reeves
Author Date: 2020-02-14 18:03:11 UTC

[policies] fix LinuxPolicy performance regression (test suite)

Commit 285873a introduces a regression in the performance of
LinuxProfile class initialisation:

  commit 285873a4f753822a88d475a1b030ab622bf4c72e
  Author: Bryan Quigley <bryan.quigley@canonical.com>
  Date: Tue Feb 11 15:03:16 2020 -0800

      [policies] Detect systemd use instead of hardcoding it

All the patch does is to switch from testing self.init to
determine whether to use the SystemdInit() class or the
basic InitSystem() one, to looking for '/run/systemd/system'
in the file system.

This has more broad side effects than it might seem since
the test suite uses LinuxPolicy() as a mock policy object
for a large number of tests. Since SystemdInit() calls out
to systemctl to obtain the state of the init system this
both increases the run time for the tests and causes high
resource use in systemd itself:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
  1 root 20 0 177196 13504 4512 R 92.7 0.1 5:24.04 systemd

This causes the run time for the Python2 and 3 test suite
(plus pep8/pycodestyle) to grow from ~5s to over 1m20s on
my test system:

285873a~1 real 0m5.683s
285873a real 1m20.353s

Allow direct users of LinuxPolicy to override the init
system detection by specifying an init= kwarg initialised
to an InitSystem-like object directly, and use this in the
test suite to avoid the cost of initialising the full
SystemdInit() class.

Resolves: #1953

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

bmr-sysroot-fixes 2019-11-04 10:48:01 UTC
[Plugin] improve _copy_dir() variable naming

Author: Bryn M. Reeves
Author Date: 2019-11-04 10:48:01 UTC

[Plugin] improve _copy_dir() variable naming

Directory entries found in _copy_dir() may be either files or
sub-directories: reflect this in the names of local variables.

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

bmr-archive-tar-wrapper 2019-10-23 14:59:36 UTC
[archive] remove obsolete TarFile wrapper

Author: Bryn M. Reeves
Author Date: 2019-10-23 14:27:19 UTC

[archive] remove obsolete TarFile wrapper

The _TarFile wrapper in sos.archive is only needed for python 2.6
and earlier: remove it since we no longer support this version.

Closes: #1834
Resolves: #1838

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

bmr-lgtm-regex-fixes 2019-10-09 11:28:31 UTC
[ovirt] fix regex formatting

Author: Bryn M. Reeves
Author Date: 2019-10-09 11:21:42 UTC

[ovirt] fix regex formatting

LGTM warns about unmatchable caret and dollar symbols in ovirt's
DB_PASS_FILES since they are surrounded by leading and trailing
whitespace.

Resolves: #1823

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

bmr-kubernetes-split 2019-09-24 17:59:10 UTC
[kubernetes] simplify UbuntuPlugin kube_cmd setting

Author: Bryn M. Reeves
Author Date: 2019-09-24 15:00:44 UTC

[kubernetes] simplify UbuntuPlugin kube_cmd setting

Since the snap path for kubctl is always valid on Ubuntu don't
test for the presence of the config file in setup().

Related: #1795

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

bmr-release-script 2019-04-01 12:30:23 UTC
[sos] add simple release script

Author: Bryn M. Reeves
Author Date: 2019-04-01 12:19:00 UTC

[sos] add simple release script

Add a simple release script:

  - Update version strings in sos/__init__.py and sos.spec
  - Create signed-off version bump commit
  - Create annoted sos-x.y release tag
  - Push commits and tags to origin

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

bmr-vdsm 2019-03-27 17:57:21 UTC
[vdsm] drop explicit size limiting

Author: Bryn M. Reeves
Author Date: 2019-03-27 17:57:21 UTC

[vdsm] drop explicit size limiting

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

bmr-predicates 2019-03-22 18:31:09 UTC
[Plugin] always use current predicate in log messages

Author: Bryn M. Reeves
Author Date: 2019-03-22 18:09:02 UTC

[Plugin] always use current predicate in log messages

The 'pred' local in collection methods is unused when a default
(command or plugin) predicate is in use. Always retrieve the
active predicate via get_predicate() when logging predicate
decisions.

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

bmr-direct-write-cmd-output 2019-02-27 11:58:50 UTC
[Plugin] have add_journal() request direct command output

Author: Bryn M. Reeves
Author Date: 2019-02-27 11:57:58 UTC

[Plugin] have add_journal() request direct command output

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

sos-pmoravec-blueprints-plugin 2018-12-12 10:36:09 UTC
[composer] avoid running 'blueprints list' twice

Author: Bryn M. Reeves
Author Date: 2018-12-12 10:36:09 UTC

[composer] avoid running 'blueprints list' twice

Use get_cmd_output_now() to store the first call to composer-cli's
'blueprints list' command in the report, and then use that file to
find the list of available blueprints.

Related: #1447

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

bmr-get-option-fix-1498 2018-12-12 10:17:40 UTC
[Plugin] fix get_option() on Python3 runtimes

Author: Bryn M. Reeves
Author Date: 2018-12-12 10:17:40 UTC

[Plugin] fix get_option() on Python3 runtimes

The get_option() method uses an internal helper function, _check(),
that tests for matching options that are either strings (equality
test), or iterable types (value present test).

The function assumes that if an __iter__ attribute is present that
it is dealing with an iterable - a list or tuple for e.g.. In the
Python3 string classes this attribute is present (since a string
can be iterated to obtain the characters it contains).

Fix the test by instead testing for the presence of the 'encode'
method which is present on all string types in supported Python 2
and 3 runtimes.

Resolves: #1498.

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

bmr-make-leading-fix 2018-09-12 15:14:44 UTC
[archive] canonicalise paths for link follow up

Author: Bryn M. Reeves
Author Date: 2018-09-12 15:11:07 UTC

[archive] canonicalise paths for link follow up

Ensure that the canonical path is used when processing link follow
up actions: the actual link path may contain one or more levels of
symbolic links, leading to broken links if the link target path is
assumed to be relative to the containing directory.

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

bmr-make-leading-fix-extra-debug 2018-09-12 15:14:44 UTC
[DEBUG] omg-debug-me-harder

Author: Bryn M. Reeves
Author Date: 2018-09-11 16:32:04 UTC

[DEBUG] omg-debug-me-harder

bmr-openstack-triggers 2018-09-04 14:27:48 UTC
[openstack_*] restore package verification for OpenStack plugins

Author: Bryn M. Reeves
Author Date: 2018-09-04 14:27:48 UTC

[openstack_*] restore package verification for OpenStack plugins

Now that the containerised trigger changes have been implemented,
and the in-plugin package verification removed, restore package
verification for these plugins by setting the verify_packages
member of the plugin. The list used is the original package list
for non-containerised deployments (meaning that these types of
system will continue to verify packages as normal, although we
still cannot verify the status of packages inside a container
deployment).

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

bmr-fix-archive-leading-paths 2018-09-03 15:44:44 UTC
[archive] replace FileCacheArchive._makedirs()

Author: Bryn M. Reeves
Author Date: 2018-08-31 11:58:01 UTC

[archive] replace FileCacheArchive._makedirs()

The Python os.makedirs() implementation is inadequate for sos's
needs: it will create leading directories given an intended path
destination, but it is not able to reflect cases where some of
the intermediate paths are actually symbolic links.

Replace the use of os.makedirs() with a method that walks over
the path, and either creates directories, or symbolic links (and
their directory target) to better correspond with the content of
the host file system.

This fixes a situation where two plugins can race in the archive,
leading to an exception in the plugin that runs last:

 - /foo/bar exists and is a link to /foo/bar.qux
 - One plugin attempts to collect /foo/bar
 - Another plugin attempts to collect a link /foo/qux -> /foo/bar/baz

If the 2nd plugin happens to run first it will create the path
"/foo/bar" as a _directory_ (via _makedirs()). Since the archive
now checks for matching object types when a path collision occurs,
the first plugin will arrive at add_dir(), note that "/foo/bar" is
present and is not a symbolic link, and will raise an exception.

Correct this by ensuring that whichever plugin executes first, the
correct link/directory path structure will be set up.

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

bmr-logs-parseconf 2018-07-20 20:55:13 UTC
[logs] parse configuration from implicit /etc/rsyslog.d include

Author: Bryn M. Reeves
Author Date: 2018-07-20 20:27:03 UTC

[logs] parse configuration from implicit /etc/rsyslog.d include

The /etc/rsyslog.d $IncludeConfig is included implicitly in many
builds (at least RHEL, Fedora etc.). Always check for config
files at this location and do not rely on an explicit directive
in the main rsyslog.conf.

Resolves: #1384

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

bmr-unpackaged 2018-06-22 15:33:37 UTC
[unpackaged] add plugin

Author: Pierguido Lambri
Author Date: 2018-04-28 17:49:51 UTC

[unpackaged] add plugin

This plugin will collect a list of all binary files that are
available in the standard $PATH and that are not managed by the
distribution package manager.

For now this works only for the distributions that use the
RedHatPolicy (RHEL and Fedora): other policies may add support by
implementing the 'files_command' policy initialiser callback, and
adding the relevant tagging class to the plugin.

Resolves: #1066

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

bmr-products 2018-06-20 16:26:44 UTC
[policies/redhat] update Red Hat product presets

Author: Bryn M. Reeves
Author Date: 2018-06-20 16:26:44 UTC

[policies/redhat] update Red Hat product presets

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

bmr-reentrant-archive 2018-06-18 11:05:29 UTC
[archive] make FileCacheArchive methods re-entrant

Author: Bryn M. Reeves
Author Date: 2018-06-14 14:37:19 UTC

[archive] make FileCacheArchive methods re-entrant

Since plugins are now run concurrently the Archive class must be
re-entrant: different plugins may attempt to create the same
paths in the archive, and since they are executing in parallel
and with no locking, there exists a TOCTOU race between the use
of os.path.{exists,isdir, etc.}() and the subsequent creation of
a new path.

Address this by implementing a simple monitor-style locking scheme
for the FileCacheArchive class. A `_path_lock` member is added to
the class and this must be held across any operation that modifies
the namespace of the archive (including file, directory, symlink,
and special node creation).

Additionally, the `_check_path()` Archive method (which checks
for the existence of path components up to the basename of the
file, creating directories as required) is extended to also carry
out a test for the existence of the path, and if the path does
exist, that the object is of the expected type. A mismatch in the
object type generates a ValueError with an appropriate string
description of the problem.

Benchmarking shows a consistent small improvement with the patch:
this is a result of reduced redundant copy operations that the
previous archive structure allowed (since duplicate operations
are now aborted as soon as the _path_lock is acquired).

Resolves: #1340

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

bmr-auto-sizelimit 2018-05-29 13:26:29 UTC
[plugins] automatically set copy spec sizelimit from --log-size

Author: Bryn M. Reeves
Author Date: 2018-05-29 13:26:29 UTC

[plugins] automatically set copy spec sizelimit from --log-size

Related: #1325

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

sos-3.5.1 2018-05-29 11:52:20 UTC
[dist] bump release (3.5.1)

Author: Bryn M. Reeves
Author Date: 2018-05-29 11:52:20 UTC

[dist] bump release (3.5.1)

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

jcastillo-rabbitmq-elude-default-password 2018-04-04 15:27:45 UTC
[rabbitmq] Mask default password in rabbitmq.conf

Author: Jose Castillo
Author Date: 2017-09-09 10:00:59 UTC

[rabbitmq] Mask default password in rabbitmq.conf

Use do_file_sub() to mask the default password in
the config file /etc/rabbitmq/rabbitmq.conf, and solve
issue #840.

Fixes: #840
Closes: #1100

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

bmr-per-plugin-verify 2017-11-01 14:32:30 UTC
[system] add zlib to verify_packages list

Author: Bryn M. Reeves
Author Date: 2017-11-01 14:30:48 UTC

[system] add zlib to verify_packages list

Fixes: #1079

Suggested-by: Pavel Moravec <pmoravec@redhat.com>

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

bmr-jars-key-is-not-a-string 2017-03-29 11:33:14 UTC
[jars] fix maven_id dictionary encoding

Author: Bryn M. Reeves
Author Date: 2017-03-29 11:29:46 UTC

[jars] fix maven_id dictionary encoding

The dictionary must contain string types, not byte arrays.

Causes an exception when packing strings with Python3:

  [sos.sosreport:setup] executing 'sosreport -vvv --batch --debug -o jars'
   Setting up plugins ...
  Traceback (most recent call last):
    File "./sosreport", line 25, in <module>
      main(sys.argv[1:])
    File "/home/breeves/src/git/sos/sos/sosreport.py", line 1632, in main
      sos.execute()
  TypeError: key b'version' is not a string

Resolves: #984.

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

bmr-sos-fix-fdopen-clutter 2017-03-27 12:28:45 UTC
[sosreport] use archive.add_file(FileObj) for HTML and text report

Author: Bryn M. Reeves
Author Date: 2017-03-27 12:27:25 UTC

[sosreport] use archive.add_file(FileObj) for HTML and text report

Pass the file object in which HTML and text reports have been
generated to the archiving class. Since the files received are
instances of TempFileUtil files, they will use fdopen and cannot
return a valid file name.

bmr-atomichost-updates 2016-07-13 14:13:35 UTC
[atomichost] improve 'atomic info' collection loop

Author: Bryn M. Reeves
Author Date: 2016-07-13 14:13:35 UTC

[atomichost] improve 'atomic info' collection loop

Remove redundant code from the loop that drives 'atomic info'
collection and make the bracketing and indenting style match
other plugins.

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

bmr-networking-quote-fix 2016-07-08 17:59:21 UTC
[networking] single quote innermost strings in nmcli commands

Author: Bryn M. Reeves
Author Date: 2016-07-08 17:59:21 UTC

[networking] single quote innermost strings in nmcli commands

Network Manager names may contain embedded quotes (" and '). These will
cause an exception in shlex.split() if the quotes are unbalanced. This
may happen with names like: "Foobar's Wireless Network". Although the
problen will occur for both single and double quote characters the
former is considerably more likely in object names since it is
syntactically valid in many human languages.

Reverse the normal sos quoting convention here and place double quotes
around the innermost quoted string.

RHBZ# 1353992

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

sbradley-log_limits 2016-06-07 17:10:59 UTC
[sosreport] Print measurement used for log_size option

Author: Shane Bradley
Author Date: 2016-06-07 17:10:59 UTC

[sosreport] Print measurement used for log_size option

The measurement being used for log_size option was not
stated when option descriptions were printed and end
user did not know if log_size was for KB,MB, or GB.

Signed-off-by: Shane Bradley <sbradley@redhat.com>

bmr-add-journal-interface 2016-06-02 15:11:40 UTC
[targetcli] convert to add_journal interface

Author: Bryn M. Reeves
Author Date: 2016-06-01 18:31:45 UTC

[targetcli] convert to add_journal interface

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

bmr-suse-sysroot-fix 2016-05-05 10:47:22 UTC
[suse] fix constructor sysroot argument

Author: Bryn M. Reeves
Author Date: 2016-05-05 10:47:22 UTC

[suse] fix constructor sysroot argument

The Policy class hierarchy requires a 'sysroot' kwarg for class
constructors. This is used to pass the location of the actual
host root file system for container configurations.

The SuSE policy is currently missing this argument, leading to an
exception during policy loading:

  Traceback (most recent call last):
  File "/usr/sbin/sosreport", line 25, in
  main(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1592, in
  main
  sos = SoSReport(args)
  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 676, in
  init
  self.policy = sos.policies.load(sysroot=self.opts.sysroot)
  File "/usr/lib/python2.7/site-packages/sos/policies/init.py", line 38,
  in load
  cache['policy'] = policy(sysroot=sysroot)
  TypeError: init() got an unexpected keyword argument 'sysroot'

Fixes #809.

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

bmr-suse-policy 2015-03-03 15:48:06 UTC
[policies] add SuSE policy

Author: Bryn M. Reeves
Author Date: 2015-03-03 14:39:03 UTC

[policies] add SuSE policy

Add a basic policy for SuSE distributions. Currently does not make
a distinction between OpenSuSE and the various SuSE Enterprise
releases and uses the RedHatPlugin taging class as the policy's
allowed plugin set.

Fixes #523.

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

rhel-6 2014-09-09 17:33:51 UTC
[plugintools] preserve permissions on directories containing links

Author: Bryn M. Reeves
Author Date: 2014-09-09 17:33:51 UTC

[plugintools] preserve permissions on directories containing links

rhel-7 2014-03-20 19:03:13 UTC
Call rhsm-debug with the --sos switch

Author: Bryn M. Reeves
Author Date: 2014-03-20 18:56:58 UTC

Call rhsm-debug with the --sos switch

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

html-report-gen 2013-12-09 16:03:29 UTC
Merge branch 'master' into html-report-gen

Author: Adam Stokes
Author Date: 2013-12-09 16:03:29 UTC

Merge branch 'master' into html-report-gen

rhel-6-openstack 2013-10-25 13:12:04 UTC
Merge pull request #207 from apevec/rhel-6-openstack

Author: Bryn M. Reeves
Author Date: 2013-10-25 13:12:04 UTC

Merge pull request #207 from apevec/rhel-6-openstack

fixups for rhel-6-openstack backports

140 of 40 results

Other repositories

Name Last Modified
lp:sosreport 4 hours ago
lp:~dnegreira/sosreport 2024-07-02
lp:~arif-ali/sosreport 2024-07-02
13 of 3 results
You can't create new repositories for sosreport.