diff options
author | Poornima <pkshiras@redhat.com> | 2015-09-03 15:57:23 +0530 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2015-09-10 13:59:33 +0100 |
commit | 887fc720db5eb980088f771187311e85e04598f9 (patch) | |
tree | f936f0c37541b4becde0cd03ed39436524af4c60 | |
parent | 08ba22aebb066de389cffed414a725e61a6b86d7 (diff) | |
download | sos-887fc720db5eb980088f771187311e85e04598f9.tar.gz |
[openstack_swift] fix regex issue in postproc method
"The regex currently used by openstack_swift is:
"/etc/swift/*.conf*"
This matches any filename beginning with 'con': "/etc/swift/con*"
and causes the plugin to attempt regex substitution on several binary
files in the directory causing errors:
"substitution failed for '/etc/swift/container.builder'"
"regex substitution failed for '/etc/swift/container.ring.gz'"
Purposing a fix by changing the regex to match only intended configuration
files (*.conf*) in this directory.
Fixes #636.
Signed-off-by: Poornima M. Kshirsagar pkshiras@redhat.com
-rw-r--r-- | sos/plugins/openstack_swift.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/plugins/openstack_swift.py b/sos/plugins/openstack_swift.py index f3373314..aa4c7f1f 100644 --- a/sos/plugins/openstack_swift.py +++ b/sos/plugins/openstack_swift.py @@ -42,7 +42,7 @@ class OpenStackSwift(Plugin): ] regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys) - self.do_path_regex_sub("/etc/swift/*.conf*", regexp, r"\1*********") + self.do_path_regex_sub("/etc/swift/.*\.conf.*", regexp, r"\1*********") class DebianOpenStackSwift(OpenStackSwift, DebianPlugin, UbuntuPlugin): |