Bug 1260592 - [7.2] sosreport encounters regex error while running openstack swift plugin.
Summary: [7.2] sosreport encounters regex error while running openstack swift plugin.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: sos
Version: 1.0 (Essex)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: async
: 7.0 (Kilo)
Assignee: Lee Yarwood
QA Contact: nlevinki
URL:
Whiteboard:
Depends On:
Blocks: 1259158
TreeView+ depends on / blocked
 
Reported: 2015-09-07 10:45 UTC by Poornima
Modified: 2023-02-22 23:02 UTC (History)
10 users (show)

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.
Clone Of:
Environment:
Last Closed: 2015-11-19 23:30:23 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2496 0 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform 7 Bug Fix and Enhancement Advisory 2015-11-20 03:33:03 UTC

Description Poornima 2015-09-07 10:45:31 UTC
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 10:49:12 UTC
Created attachment 1070946 [details]
see container.ring.gz

Comment 3 Pavel Moravec 2015-09-07 11:03:04 UTC
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 11:31:01 UTC
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>
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>

Comment 11 nlevinki 2015-11-19 07:23:08 UTC
automation passed

Comment 13 errata-xmlrpc 2015-11-19 23:30:23 UTC
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.