aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2013-07-25 19:16:32 +0100
committerBryn M. Reeves <bmr@redhat.com>2013-07-25 19:16:32 +0100
commit854642ca16dc92d050107e20edbf60c323b819c7 (patch)
tree4d9317282ef0dad4c0b8dfb787a0081ac89e3883
parent8b2af7f9123b22aa139b8d1e0221f5c82a99bc90 (diff)
downloadsos-854642ca16dc92d050107e20edbf60c323b819c7.tar.gz
Fix add_copy_specs(string) bugs in openstack.py
OpenStack was full of the add_copy_specs(string) anti-pattern. While we should address this properly these instances all need fixing to avoid collecting the whole file system. They should also have been tested before being put forward as a pull request. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/openstack.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/sos/plugins/openstack.py b/sos/plugins/openstack.py
index 10ed59f3..07d17fbb 100644
--- a/sos/plugins/openstack.py
+++ b/sos/plugins/openstack.py
@@ -79,7 +79,7 @@ class OpenStack(Plugin):
"/var/log/quantum/"])
# Swift
- self.add_copy_specs("/etc/swift/")
+ self.add_copy_spec("/etc/swift/")
def postproc(self):
self.do_file_sub('/etc/keystone/keystone.conf',
@@ -154,13 +154,13 @@ class DebianOpenStack(OpenStack, DebianPlugin, UbuntuPlugin):
def setup(self):
# Nova
- self.add_copy_specs("/etc/sudoers.d/nova_sudoers")
+ self.add_copy_spec("/etc/sudoers.d/nova_sudoers")
# Cinder
- self.add_copy_specs("/etc/sudoers.d/cinder_sudoers")
+ self.add_copy_spec("/etc/sudoers.d/cinder_sudoers")
# Quantum
- self.add_copy_specs("/etc/sudoers.d/quantum_sudoers")
+ self.add_copy_spec("/etc/sudoers.d/quantum_sudoers")
class RedHatOpenStack(OpenStack, RedHatPlugin):
@@ -187,6 +187,8 @@ class RedHatOpenStack(OpenStack, RedHatPlugin):
def setup(self):
# Nova
- self.add_copy_specs(["/var/lib/nova/",
- "/etc/polkit-1/localauthority/50-local.d/50-nova.pkla",
- "/etc/sudoers.d/nova"])
+ self.add_copy_specs([
+ "/var/lib/nova/",
+ "/etc/polkit-1/localauthority/50-local.d/50-nova.pkla",
+ "/etc/sudoers.d/nova"
+ ])