Bug 1260592 - [7.2] sosreport encounters regex error while running openstack swift plugin.
[7.2] sosreport encounters regex error while running openstack swift plugin.
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: sos (Show other bugs)
1.0 (Essex)
Unspecified Unspecified
medium Severity medium
: async
: 7.0 (Kilo)
Assigned To: Lee Yarwood
nlevinki
: Triaged, ZStream
Depends On:
Blocks: 1259158
  Show dependency treegraph
 
Reported: 2015-09-07 06:45 EDT by Poornima
Modified: 2016-04-26 10:14 EDT (History)
11 users (show)

See Also:
Fixed In Version: sos-3.2-36.el7ost.1
Doc Type: Bug Fix
Doc Text:
Previously, the Swift sos plug-in used an incorrect regular expression for the location of the Swift configuration files. Consequently, irrelevant files matched the regular expression, and the plug-in encountered an error. This update fixes the regular expression. As a result, only the intended files match, and the error no longer occurs.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-19 18:30:23 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
see container.ring.gz (9.25 KB, application/x-xz)
2015-09-07 06:49 EDT, Poornima
no flags Details

  None (edit)
Description Poornima 2015-09-07 06:45:31 EDT
Description of problem:
sosreport reports regex errors on openstack deployment.

Version-Release number of selected component (if applicable):
sos-3.2-16.el7ost.3.noarch

How reproducible:
Always

Steps to Reproduce:
1. run below command for openstack profile or only openstack_swift plugin

# mkdir -p /tmp/bug/regex
# sosreport -p openstack --batch --tmp-dir /tmp/bug/regex
# sosreport -o openstack_swift --batch --tmp-dir /tmp/bug/regex
		

Actual results: Below errors are observed:

 Running 10/10: openstack_swift...        

[plugin:openstack_swift] regex substitution failed for '/etc/swift/container.builder' with: ''utf8' codec can't decode byte 0x80 in position 0: invalid start byte'
[plugin:openstack_swift] regex substitution failed for '/etc/swift/container.ring.gz' with: ''utf8' codec can't decode byte 0x8b in position 1: invalid start byte'
Creating compressed archive...


Expected results: sosreport must run without any errors.

Additional info:

1. sharing resultant sosreport in attachments: 

2. Shared patch to fix this: https://github.com/sosreport/sos/pull/636
Comment 1 Poornima 2015-09-07 06:49:12 EDT
Created attachment 1070946 [details]
see container.ring.gz
Comment 3 Pavel Moravec 2015-09-07 07:03:04 EDT
https://bugzilla.redhat.com/show_bug.cgi?id=1247630(In reply to Poornima from comment #0)
> Version-Release number of selected component (if applicable):
> sos-3.2-16.el7ost.3.noarch

Is it reproducible with some el7 (not el7ost) package?

If not, please reassign product/component like https://bugzilla.redhat.com/show_bug.cgi?id=1247630 has.
Comment 4 Bryn M. Reeves 2015-09-07 07:31:01 EDT
The openstack_swift plugin in sos-3.2-16.el7 does not do *ANY* regex processing:

$ rhpkg gitbuildhash sos-3.2-16.el7
687b32d6f85696e0acb7e46f73b3d69a2524495a

$ git checkout 687b32d6f85696e0acb7e46f73b3d69a2524495a

$ rhpkg --dist=rhel-7.1 prep
[...]

$ grep postproc sos-3.2/sos/plugins/openstack_swift.py | wc -l
0

So this is nothing to do with the RHEL product or RHEL packages; please re-direct this bug to the OST sos maintainers.

I suspect it's a problem in:

osp-bz1244241-openstack-obfuscate-passwords-secrets.patch

Which maps to upstream:

commit 02ef6e2ba8d1a8fe4468aaa8be0ae88f8c74646a
Author: Lee Yarwood <lyarwood@redhat.com>
Date:   Wed Jul 15 15:42:50 2015 +0100

    [openstack] Ensure openstack passwords and secrets are obfuscated.
    
    - 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>
Comment 11 nlevinki 2015-11-19 02:23:08 EST
automation passed
Comment 13 errata-xmlrpc 2015-11-19 18:30:23 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2015:2496

Note You need to log in before you can comment on or make changes to this bug.