From 854642ca16dc92d050107e20edbf60c323b819c7 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Thu, 25 Jul 2013 19:16:32 +0100 Subject: 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 --- sos/plugins/openstack.py | 16 +++++++++------- 1 file 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" + ]) -- cgit