Blob Blame History Raw
From 665b85fcf25c016cbb467f8d9e3e93c2005b0fb9 Mon Sep 17 00:00:00 2001
From: Bogdan Dobrelya <bdobreli@redhat.com>
Date: Wed, 28 Jun 2017 21:34:39 +0200
Subject: [PATCH] [plugins] Tripleo specific containerized services logs
 (#1046)

Add Tripleo Pike opinionated logs paths to be collected
for services, when running in containers. This is a temporary
and will be reworked for Queens, like switching those to syslog
or fluentd shipping logs to Elasticsearch cluster.

Partial bug: https://bugs.launchpad.net/tripleo/+bug/1700909
Related blueprint: https://review.openstack.org/#/c/462900

Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
Signed-off-by: Adam Stokes <battlemidget@users.noreply.github.com>
---
 sos/plugins/mongodb.py              |  3 ++-
 sos/plugins/mysql.py                |  2 ++
 sos/plugins/openstack_ceilometer.py |  7 +++++--
 sos/plugins/openstack_cinder.py     |  8 ++++++--
 sos/plugins/openstack_glance.py     |  8 ++++++--
 sos/plugins/openstack_heat.py       |  8 ++++++--
 sos/plugins/openstack_horizon.py    |  8 ++++++--
 sos/plugins/openstack_instack.py    | 12 ++++++++----
 sos/plugins/openstack_ironic.py     |  8 ++++++--
 sos/plugins/openstack_keystone.py   |  8 ++++++--
 sos/plugins/openstack_manila.py     |  6 ++++--
 sos/plugins/openstack_neutron.py    |  8 ++++++--
 sos/plugins/openstack_nova.py       |  8 ++++++--
 sos/plugins/openstack_sahara.py     |  8 ++++++--
 sos/plugins/openstack_swift.py      |  8 ++++++--
 sos/plugins/openstack_trove.py      |  8 ++++++--
 sos/plugins/pacemaker.py            |  3 ++-
 sos/plugins/rabbitmq.py             |  3 ++-
 sos/plugins/redis.py                |  6 ++++--
 19 files changed, 95 insertions(+), 35 deletions(-)

diff --git a/sos/plugins/mongodb.py b/sos/plugins/mongodb.py
index 5d7d601..46b0251 100644
--- a/sos/plugins/mongodb.py
+++ b/sos/plugins/mongodb.py
@@ -30,7 +30,8 @@ class MongoDb(Plugin, DebianPlugin, UbuntuPlugin):
     def setup(self):
         self.add_copy_spec([
             "/etc/mongodb.conf",
-            "/var/log/mongodb/mongodb.log"
+            "/var/log/mongodb/mongodb.log",
+            "/var/log/containers/mongodb/mongodb.log"
         ])
 
     def postproc(self):
diff --git a/sos/plugins/mysql.py b/sos/plugins/mysql.py
index b750ed3..7bf933a 100644
--- a/sos/plugins/mysql.py
+++ b/sos/plugins/mysql.py
@@ -40,12 +40,14 @@ class Mysql(Plugin):
             # Required for MariaDB under pacemaker (MariaDB-Galera)
             "/var/log/mysqld.log",
             "/var/log/mysql/mysqld.log",
+            "/var/log/containers/mysql/mysqld.log",
             "/var/log/mariadb/mariadb.log",
         ])
 
         if self.get_option("all_logs"):
             self.add_copy_spec([
                 "/var/log/mysql*",
+                "/var/log/containers/mysql*",
                 "/var/log/mariadb*"
             ])
 
diff --git a/sos/plugins/openstack_ceilometer.py b/sos/plugins/openstack_ceilometer.py
index 8e3e8e9..2c3a809 100644
--- a/sos/plugins/openstack_ceilometer.py
+++ b/sos/plugins/openstack_ceilometer.py
@@ -32,9 +32,12 @@ class OpenStackCeilometer(Plugin):
         # Ceilometer
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec("/var/log/ceilometer/", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/ceilometer/",
+                                "/var/log/containers/ceilometer/"],
+                               sizelimit=self.limit)
         else:
-            self.add_copy_spec("/var/log/ceilometer/*.log",
+            self.add_copy_spec(["/var/log/ceilometer/*.log",
+                                "/var/log/containers/ceilometer/*.log"],
                                sizelimit=self.limit)
         self.add_copy_spec("/etc/ceilometer/")
         if self.get_option("verify"):
diff --git a/sos/plugins/openstack_cinder.py b/sos/plugins/openstack_cinder.py
index 0383a8a..ffec62b 100644
--- a/sos/plugins/openstack_cinder.py
+++ b/sos/plugins/openstack_cinder.py
@@ -40,9 +40,13 @@ class OpenStackCinder(Plugin):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec("/var/log/cinder/", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/cinder/",
+                                "/var/log/containers/cinder/"],
+                               sizelimit=self.limit)
         else:
-            self.add_copy_spec("/var/log/cinder/*.log", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/cinder/*.log",
+                                "/var/log/containers/cinder/*.log"],
+                               sizelimit=self.limit)
 
         if self.get_option("verify"):
             self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
diff --git a/sos/plugins/openstack_glance.py b/sos/plugins/openstack_glance.py
index 1aa0cb7..88d06e3 100644
--- a/sos/plugins/openstack_glance.py
+++ b/sos/plugins/openstack_glance.py
@@ -38,9 +38,13 @@ class OpenStackGlance(Plugin):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec("/var/log/glance/", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/glance/",
+                                "/var/log/containers/glance/"],
+                               sizelimit=self.limit)
         else:
-            self.add_copy_spec("/var/log/glance/*.log", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/glance/*.log",
+                                "/var/log/containers/glance/*.log"],
+                               sizelimit=self.limit)
 
         self.add_copy_spec("/etc/glance/")
 
diff --git a/sos/plugins/openstack_heat.py b/sos/plugins/openstack_heat.py
index 451bad3..2dad83f 100644
--- a/sos/plugins/openstack_heat.py
+++ b/sos/plugins/openstack_heat.py
@@ -45,9 +45,13 @@ class OpenStackHeat(Plugin):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec("/var/log/heat/", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/heat/",
+                                "/var/log/containers/heat/"],
+                               sizelimit=self.limit)
         else:
-            self.add_copy_spec("/var/log/heat/*.log", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/heat/*.log",
+                                "/var/log/containers/heat/*.log"],
+                               sizelimit=self.limit)
 
         self.add_copy_spec("/etc/heat/")
 
diff --git a/sos/plugins/openstack_horizon.py b/sos/plugins/openstack_horizon.py
index f778b91..75ad3ce 100644
--- a/sos/plugins/openstack_horizon.py
+++ b/sos/plugins/openstack_horizon.py
@@ -32,9 +32,13 @@ class OpenStackHorizon(Plugin):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec("/var/log/horizon/", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/horizon/",
+                                "/var/log/containers/horizon/"],
+                               sizelimit=self.limit)
         else:
-            self.add_copy_spec("/var/log/horizon/*.log", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/horizon/*.log",
+                                "/var/log/containers/horizon/*.log"],
+                               sizelimit=self.limit)
 
         self.add_copy_spec("/etc/openstack-dashboard/")
         self.add_forbidden_path("*.py[co]")
diff --git a/sos/plugins/openstack_instack.py b/sos/plugins/openstack_instack.py
index 3c87de8..87ec59f 100644
--- a/sos/plugins/openstack_instack.py
+++ b/sos/plugins/openstack_instack.py
@@ -34,14 +34,18 @@ class OpenStackInstack(Plugin):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec("/var/log/mistral/",
+            self.add_copy_spec(["/var/log/mistral/",
+                                "/var/log/containers/mistral/"],
                                sizelimit=self.limit)
-            self.add_copy_spec("/var/log/zaqar/",
+            self.add_copy_spec(["/var/log/zaqar/",
+                                "/var/log/containers/zaqar/"],
                                sizelimit=self.limit)
         else:
-            self.add_copy_spec("/var/log/mistral/*.log",
+            self.add_copy_spec(["/var/log/mistral/*.log",
+                                "/var/log/containers/mistral/*.log"],
                                sizelimit=self.limit)
-            self.add_copy_spec("/var/log/zaqar/*.log",
+            self.add_copy_spec(["/var/log/zaqar/*.log",
+                                "/var/log/containers/zaqar/*.log"],
                                sizelimit=self.limit)
 
         vars = [p in os.environ for p in [
diff --git a/sos/plugins/openstack_ironic.py b/sos/plugins/openstack_ironic.py
index f225427..e4e320d 100644
--- a/sos/plugins/openstack_ironic.py
+++ b/sos/plugins/openstack_ironic.py
@@ -31,9 +31,13 @@ class OpenStackIronic(Plugin):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec("/var/log/ironic/", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/ironic/",
+                                "/var/log/containers/ironic/"],
+                               sizelimit=self.limit)
         else:
-            self.add_copy_spec("/var/log/ironic/*.log", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/ironic/*.log",
+                                "/var/log/containers/ironic/*.log"],
+                               sizelimit=self.limit)
 
         self.add_cmd_output('ls -laRt /var/lib/ironic/')
 
diff --git a/sos/plugins/openstack_keystone.py b/sos/plugins/openstack_keystone.py
index cb8a626..5a8f4e2 100644
--- a/sos/plugins/openstack_keystone.py
+++ b/sos/plugins/openstack_keystone.py
@@ -37,9 +37,13 @@ class OpenStackKeystone(Plugin):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec("/var/log/keystone/", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/keystone/",
+                                "/var/log/containers/keystone/"],
+                               sizelimit=self.limit)
         else:
-            self.add_copy_spec("/var/log/keystone/*.log", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/keystone/*.log",
+                                "/var/log/containers/keystone/*.log"],
+                               sizelimit=self.limit)
 
         if self.get_option("verify"):
             self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
diff --git a/sos/plugins/openstack_manila.py b/sos/plugins/openstack_manila.py
index ce50a31..c1e6609 100644
--- a/sos/plugins/openstack_manila.py
+++ b/sos/plugins/openstack_manila.py
@@ -29,10 +29,12 @@ class OpenStackManila(Plugin):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec("/var/log/manila/*",
+            self.add_copy_spec(["/var/log/manila/*",
+                                "/var/log/containers/manila/*"],
                                sizelimit=self.limit)
         else:
-            self.add_copy_spec("/var/log/manila/*.log",
+            self.add_copy_spec(["/var/log/manila/*.log",
+                                "/var/log/containers/manila/*.log"],
                                sizelimit=self.limit)
 
     def postproc(self):
diff --git a/sos/plugins/openstack_neutron.py b/sos/plugins/openstack_neutron.py
index 62fd1c3..b0f6699 100644
--- a/sos/plugins/openstack_neutron.py
+++ b/sos/plugins/openstack_neutron.py
@@ -29,9 +29,13 @@ class OpenStackNeutron(Plugin):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec("/var/log/neutron/", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/neutron/",
+                                "/var/log/containers/neutron/"],
+                               sizelimit=self.limit)
         else:
-            self.add_copy_spec("/var/log/neutron/*.log", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/neutron/*.log",
+                                "/var/log/containers/neutron/*.log"],
+                               sizelimit=self.limit)
 
         self.add_copy_spec("/etc/neutron/")
         self.add_copy_spec("/var/lib/neutron/")
diff --git a/sos/plugins/openstack_nova.py b/sos/plugins/openstack_nova.py
index 14bdfbd..3dda7af 100644
--- a/sos/plugins/openstack_nova.py
+++ b/sos/plugins/openstack_nova.py
@@ -63,9 +63,13 @@ class OpenStackNova(Plugin):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec("/var/log/nova/", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/nova/",
+                                "/var/log/containers/nova/"],
+                               sizelimit=self.limit)
         else:
-            self.add_copy_spec("/var/log/nova/*.log", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/nova/*.log",
+                                "/var/log/containers/nova/*.log"],
+                               sizelimit=self.limit)
 
         self.add_copy_spec("/etc/nova/")
 
diff --git a/sos/plugins/openstack_sahara.py b/sos/plugins/openstack_sahara.py
index adbad32..adaedf9 100644
--- a/sos/plugins/openstack_sahara.py
+++ b/sos/plugins/openstack_sahara.py
@@ -32,9 +32,13 @@ class OpenStackSahara(Plugin):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec("/var/log/sahara/", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/sahara/",
+                                "/var/log/containers/sahara/"],
+                               sizelimit=self.limit)
         else:
-            self.add_copy_spec("/var/log/sahara/*.log", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/sahara/*.log",
+                                "/var/log/containers/sahara/*.log"],
+                               sizelimit=self.limit)
 
         if self.get_option("verify"):
             self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
diff --git a/sos/plugins/openstack_swift.py b/sos/plugins/openstack_swift.py
index 790a4cb..9906b94 100644
--- a/sos/plugins/openstack_swift.py
+++ b/sos/plugins/openstack_swift.py
@@ -31,9 +31,13 @@ class OpenStackSwift(Plugin):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec("/var/log/swift/", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/swift/",
+                                "/var/log/containers/swift/"],
+                               sizelimit=self.limit)
         else:
-            self.add_copy_spec("/var/log/swift/*.log", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/swift/*.log",
+                                "/var/log/containers/swift/*.log"],
+                               sizelimit=self.limit)
 
         self.add_copy_spec("/etc/swift/")
 
diff --git a/sos/plugins/openstack_trove.py b/sos/plugins/openstack_trove.py
index 4d526b0..5183ad1 100644
--- a/sos/plugins/openstack_trove.py
+++ b/sos/plugins/openstack_trove.py
@@ -30,9 +30,13 @@ class OpenStackTrove(Plugin):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec("/var/log/trove/", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/trove/",
+                                "/var/log/containers/trove/"],
+                               sizelimit=self.limit)
         else:
-            self.add_copy_spec("/var/log/trove/*.log", sizelimit=self.limit)
+            self.add_copy_spec(["/var/log/trove/*.log",
+                                "/var/log/containers/trove/*.log"],
+                               sizelimit=self.limit)
 
         self.add_copy_spec('/etc/trove/')
 
diff --git a/sos/plugins/pacemaker.py b/sos/plugins/pacemaker.py
index 9775284..5780c81 100644
--- a/sos/plugins/pacemaker.py
+++ b/sos/plugins/pacemaker.py
@@ -36,7 +36,8 @@ class Pacemaker(Plugin, DebianPlugin, UbuntuPlugin):
             "/var/lib/pacemaker/cib/cib.xml",
             self.defaults,
             "/var/log/pacemaker.log",
-            "/var/log/pcsd/pcsd.log"
+            "/var/log/pcsd/pcsd.log",
+            "/var/log/pacemaker/bundles/*/",
         ])
         self.add_cmd_output([
             "crm_mon -1 -A -n -r -t",
diff --git a/sos/plugins/rabbitmq.py b/sos/plugins/rabbitmq.py
index d9871a0..8d73835 100644
--- a/sos/plugins/rabbitmq.py
+++ b/sos/plugins/rabbitmq.py
@@ -29,6 +29,7 @@ class RabbitMQ(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
         self.add_cmd_output("rabbitmqctl list_policies")
 
         self.add_copy_spec("/etc/rabbitmq/*")
-        self.add_copy_spec("/var/log/rabbitmq/*",
+        self.add_copy_spec(["/var/log/rabbitmq/*",
+                            "/var/log/containers/rabbitmq/*"],
                            sizelimit=self.get_option('log_size'))
 # vim: set et ts=4 sw=4 :
diff --git a/sos/plugins/redis.py b/sos/plugins/redis.py
index befa3d3..9ac2397 100644
--- a/sos/plugins/redis.py
+++ b/sos/plugins/redis.py
@@ -32,10 +32,12 @@ class Redis(Plugin, RedHatPlugin):
         self.limit = self.get_option("log_size")
         self.add_cmd_output("redis-cli info")
         if self.get_option("all_logs"):
-            self.add_copy_spec("/var/log/redis/redis.log*",
+            self.add_copy_spec(["/var/log/redis/redis.log*",
+                                "/var/log/containers/redis/redis.log*"],
                                sizelimit=self.limit)
         else:
-            self.add_copy_spec("/var/log/redis/redis.log",
+            self.add_copy_spec(["/var/log/redis/redis.log",
+                                "/var/log/containers/redis/redis.log"],
                                sizelimit=self.limit)
 
     def postproc(self):
-- 
2.7.5

From 5bbe32f49f3406368ac794e638b61a3234da1d11 Mon Sep 17 00:00:00 2001
From: stuggi <github@schuppert.net>
Date: Wed, 28 Jun 2017 21:35:45 +0200
Subject: [PATCH] [openstack plugins] run openstack command when correct ENV is
 set (#1048)

With Tripleo Pike the default ENV changed from OS_TENANT_NAME to
OS_PROJECT_NAME. The commands of the openstack plugins against
the env should run when either OSP_TENANT_NAME or OS_PROJECT_NAME
is set.

Signed-off-by: Martin Schuppert mschuppe@redhat.com
Signed-off-by: Adam Stokes <battlemidget@users.noreply.github.com>
---
 sos/plugins/gnocchi.py            | 10 +++++++---
 sos/plugins/openstack_glance.py   | 10 +++++++---
 sos/plugins/openstack_heat.py     | 10 +++++++---
 sos/plugins/openstack_instack.py  | 10 +++++++---
 sos/plugins/openstack_ironic.py   | 10 +++++++---
 sos/plugins/openstack_keystone.py | 10 +++++++---
 sos/plugins/openstack_neutron.py  | 10 +++++++---
 sos/plugins/openstack_nova.py     | 10 +++++++---
 8 files changed, 56 insertions(+), 24 deletions(-)

diff --git a/sos/plugins/gnocchi.py b/sos/plugins/gnocchi.py
index 14baf55..dc79a0f 100644
--- a/sos/plugins/gnocchi.py
+++ b/sos/plugins/gnocchi.py
@@ -44,9 +44,13 @@ class GnocchiPlugin(Plugin, RedHatPlugin):
             self.add_copy_spec("/var/log/gnocchi/*.log",
                                sizelimit=self.limit)
 
-        vars = [p in os.environ for p in [
-                'OS_USERNAME', 'OS_PASSWORD', 'OS_TENANT_NAME']]
-        if not all(vars):
+        vars_all = [p in os.environ for p in [
+                    'OS_USERNAME', 'OS_PASSWORD']]
+
+        vars_any = [p in os.environ for p in [
+                    'OS_TENANT_NAME', 'OS_PROJECT_NAME']]
+
+        if not (all(vars_all) and any(vars_any)):
             self.soslog.warning("Not all environment variables set. Source "
                                 "the environment file for the user intended "
                                 "to connect to the OpenStack environment.")
diff --git a/sos/plugins/openstack_glance.py b/sos/plugins/openstack_glance.py
index 88d06e3..6202c49 100644
--- a/sos/plugins/openstack_glance.py
+++ b/sos/plugins/openstack_glance.py
@@ -51,9 +51,13 @@ class OpenStackGlance(Plugin):
         if self.get_option("verify"):
             self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
 
-        vars = [p in os.environ for p in [
-                'OS_USERNAME', 'OS_PASSWORD', 'OS_TENANT_NAME']]
-        if not all(vars):
+        vars_all = [p in os.environ for p in [
+                    'OS_USERNAME', 'OS_PASSWORD']]
+
+        vars_any = [p in os.environ for p in [
+                    'OS_TENANT_NAME', 'OS_PROJECT_NAME']]
+
+        if not (all(vars_all) and any(vars_any)):
             self.soslog.warning("Not all environment variables set. Source "
                                 "the environment file for the user intended "
                                 "to connect to the OpenStack environment.")
diff --git a/sos/plugins/openstack_heat.py b/sos/plugins/openstack_heat.py
index 2dad83f..0f457d9 100644
--- a/sos/plugins/openstack_heat.py
+++ b/sos/plugins/openstack_heat.py
@@ -34,9 +34,13 @@ class OpenStackHeat(Plugin):
             suggest_filename="heat_db_version"
         )
 
-        vars = [p in os.environ for p in [
-                'OS_USERNAME', 'OS_PASSWORD', 'OS_TENANT_NAME']]
-        if not all(vars):
+        vars_all = [p in os.environ for p in [
+                    'OS_USERNAME', 'OS_PASSWORD']]
+
+        vars_any = [p in os.environ for p in [
+                    'OS_TENANT_NAME', 'OS_PROJECT_NAME']]
+
+        if not (all(vars_all) and any(vars_any)):
             self.soslog.warning("Not all environment variables set. Source "
                                 "the environment file for the user intended "
                                 "to connect to the OpenStack environment.")
diff --git a/sos/plugins/openstack_instack.py b/sos/plugins/openstack_instack.py
index 87ec59f..f990476 100644
--- a/sos/plugins/openstack_instack.py
+++ b/sos/plugins/openstack_instack.py
@@ -48,9 +48,13 @@ class OpenStackInstack(Plugin):
                                 "/var/log/containers/zaqar/*.log"],
                                sizelimit=self.limit)
 
-        vars = [p in os.environ for p in [
-                'OS_USERNAME', 'OS_PASSWORD', 'OS_TENANT_NAME']]
-        if not all(vars):
+        vars_all = [p in os.environ for p in [
+                    'OS_USERNAME', 'OS_PASSWORD']]
+
+        vars_any = [p in os.environ for p in [
+                    'OS_TENANT_NAME', 'OS_PROJECT_NAME']]
+
+        if not (all(vars_all) and any(vars_any)):
             self.soslog.warning("Not all environment variables set. Source "
                                 "the environment file for the user intended "
                                 "to connect to the OpenStack environment.")
diff --git a/sos/plugins/openstack_ironic.py b/sos/plugins/openstack_ironic.py
index e4e320d..0396cc6 100644
--- a/sos/plugins/openstack_ironic.py
+++ b/sos/plugins/openstack_ironic.py
@@ -44,9 +44,13 @@ class OpenStackIronic(Plugin):
         if self.get_option("verify"):
             self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
 
-        vars = [p in os.environ for p in [
-                'OS_USERNAME', 'OS_PASSWORD', 'OS_TENANT_NAME']]
-        if not all(vars):
+        vars_all = [p in os.environ for p in [
+                    'OS_USERNAME', 'OS_PASSWORD']]
+
+        vars_any = [p in os.environ for p in [
+                    'OS_TENANT_NAME', 'OS_PROJECT_NAME']]
+
+        if not (all(vars_all) and any(vars_any)):
             self.soslog.warning("Not all environment variables set. Source "
                                 "the environment file for the user intended "
                                 "to connect to the OpenStack environment.")
diff --git a/sos/plugins/openstack_keystone.py b/sos/plugins/openstack_keystone.py
index 5a8f4e2..82e987a 100644
--- a/sos/plugins/openstack_keystone.py
+++ b/sos/plugins/openstack_keystone.py
@@ -48,9 +48,13 @@ class OpenStackKeystone(Plugin):
         if self.get_option("verify"):
             self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
 
-        vars = [p in os.environ for p in [
-                'OS_USERNAME', 'OS_PASSWORD', 'OS_TENANT_NAME']]
-        if not all(vars):
+        vars_all = [p in os.environ for p in [
+                    'OS_USERNAME', 'OS_PASSWORD']]
+
+        vars_any = [p in os.environ for p in [
+                    'OS_TENANT_NAME', 'OS_PROJECT_NAME']]
+
+        if not (all(vars_all) and any(vars_any)):
             self.soslog.warning("Not all environment variables set. Source "
                                 "the environment file for the user intended "
                                 "to connect to the OpenStack environment.")
diff --git a/sos/plugins/openstack_neutron.py b/sos/plugins/openstack_neutron.py
index b0f6699..d2bfe6b 100644
--- a/sos/plugins/openstack_neutron.py
+++ b/sos/plugins/openstack_neutron.py
@@ -42,9 +42,13 @@ class OpenStackNeutron(Plugin):
         if self.get_option("verify"):
             self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
 
-        vars = [p in os.environ for p in [
-                'OS_USERNAME', 'OS_PASSWORD', 'OS_TENANT_NAME']]
-        if not all(vars):
+        vars_all = [p in os.environ for p in [
+                    'OS_USERNAME', 'OS_PASSWORD']]
+
+        vars_any = [p in os.environ for p in [
+                    'OS_TENANT_NAME', 'OS_PROJECT_NAME']]
+
+        if not (all(vars_all) and any(vars_any)):
             self.soslog.warning("Not all environment variables set. Source "
                                 "the environment file for the user intended "
                                 "to connect to the OpenStack environment.")
diff --git a/sos/plugins/openstack_nova.py b/sos/plugins/openstack_nova.py
index 3dda7af..c0e8109 100644
--- a/sos/plugins/openstack_nova.py
+++ b/sos/plugins/openstack_nova.py
@@ -35,9 +35,13 @@ class OpenStackNova(Plugin):
         self.add_cmd_output("nova-manage fixed list")
         self.add_cmd_output("nova-manage floating list")
 
-        vars = [p in os.environ for p in [
-                'OS_USERNAME', 'OS_PASSWORD', 'OS_TENANT_NAME']]
-        if not all(vars):
+        vars_all = [p in os.environ for p in [
+                    'OS_USERNAME', 'OS_PASSWORD']]
+
+        vars_any = [p in os.environ for p in [
+                    'OS_TENANT_NAME', 'OS_PROJECT_NAME']]
+
+        if not (all(vars_all) and any(vars_any)):
             self.soslog.warning("Not all environment variables set. Source "
                                 "the environment file for the user intended "
                                 "to connect to the OpenStack environment.")
-- 
2.7.5

From f379776da6d2d3f4e3f31bf34b12908674dc122d Mon Sep 17 00:00:00 2001
From: Martin Schuppert <mschuppert@redhat.com>
Date: Wed, 28 Jun 2017 16:21:05 +0200
Subject: [PATCH] [gnocchi] Tripleo specific containerized services logs

This is an addition to pull request 1046 to collect gnocchi logs
correct when service is running in a container.

Signed-off-by: Martin Schuppert mschuppert@redhat.com
---
 sos/plugins/gnocchi.py | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/sos/plugins/gnocchi.py b/sos/plugins/gnocchi.py
index dc79a0f..724e41b 100644
--- a/sos/plugins/gnocchi.py
+++ b/sos/plugins/gnocchi.py
@@ -38,11 +38,17 @@ class GnocchiPlugin(Plugin, RedHatPlugin):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec("/var/log/gnocchi/",
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/gnocchi/*",
+                "/var/log/containers/gnocchi/*"],
+                sizelimit=self.limit
+            )
         else:
-            self.add_copy_spec("/var/log/gnocchi/*.log",
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/gnocchi/*.log",
+                "/var/log/containers/gnocchi/*.log"],
+                sizelimit=self.limit
+            )
 
         vars_all = [p in os.environ for p in [
                     'OS_USERNAME', 'OS_PASSWORD']]
-- 
2.7.5

From 55800f71bdcfdea22b1d6e1c68848e58eb087d1c Mon Sep 17 00:00:00 2001
From: Martin Schuppert <mschuppert@redhat.com>
Date: Sun, 9 Jul 2017 15:22:30 +0200
Subject: [PATCH] [openstack plugins] Tripleo specific containerized services
 configs

Add Tripleo Pike opinionated config paths to be collected
for services, when running in containers. Each service has a
config dir in /var/lib/config-data/puppet-generated on the host
which gets bind mounted read only into the container.

Closes #1054

Signed-off-by: Martin Schuppert <mschuppe@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
 sos/plugins/gnocchi.py              | 18 +++++++++++++-
 sos/plugins/haproxy.py              |  6 ++++-
 sos/plugins/iscsi.py                |  2 ++
 sos/plugins/mongodb.py              | 15 +++++++++++-
 sos/plugins/mysql.py                |  5 ++--
 sos/plugins/openstack_ceilometer.py | 24 ++++++++++++------
 sos/plugins/openstack_glance.py     | 25 +++++++++++++------
 sos/plugins/openstack_heat.py       | 49 ++++++++++++++++++++++++++++++-------
 sos/plugins/openstack_horizon.py    | 48 ++++++++++++++++++++++++++----------
 sos/plugins/openstack_keystone.py   | 28 +++++++++++++++------
 sos/plugins/openstack_manila.py     | 25 +++++++++++++------
 sos/plugins/openstack_neutron.py    | 27 ++++++++++++++------
 sos/plugins/openstack_nova.py       | 37 ++++++++++++++++++++++------
 sos/plugins/openstack_sahara.py     | 24 ++++++++++++------
 sos/plugins/openstack_swift.py      | 30 +++++++++++++++++------
 sos/plugins/openstack_trove.py      | 25 +++++++++++++------
 sos/plugins/rabbitmq.py             | 22 +++++++++++++----
 sos/plugins/redis.py                | 40 ++++++++++++++++++++++++------
 18 files changed, 345 insertions(+), 105 deletions(-)

diff --git a/sos/plugins/gnocchi.py b/sos/plugins/gnocchi.py
index 724e41b..c7a9709 100644
--- a/sos/plugins/gnocchi.py
+++ b/sos/plugins/gnocchi.py
@@ -33,8 +33,17 @@ class GnocchiPlugin(Plugin, RedHatPlugin):
 
     requires_root = False
 
+    var_puppet_gen = "/var/lib/config-data/puppet-generated/gnocchi"
+
     def setup(self):
-        self.add_copy_spec("/etc/gnocchi/")
+        self.add_copy_spec([
+            "/etc/gnocchi/*",
+            self.var_puppet_gen + "/etc/gnocchi/*",
+            self.var_puppet_gen + "/etc/httpd/conf/*",
+            self.var_puppet_gen + "/etc/httpd/conf.d/*",
+            self.var_puppet_gen + "/etc/httpd/conf.modules.d/wsgi.conf",
+            self.var_puppet_gen + "/etc/my.cnf.d/tripleo.cnf"
+        ])
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
@@ -76,5 +85,12 @@ class GnocchiPlugin(Plugin, RedHatPlugin):
             r"password=(.*)",
             r"password=*****",
         )
+        self.do_file_sub(
+            self.var_puppet_gen + "/etc/gnocchi/"
+            "gnocchi.conf",
+            r"password=(.*)",
+            r"password=*****",
+        )
+
 
 # vim: set et ts=4 sw=4 :
diff --git a/sos/plugins/haproxy.py b/sos/plugins/haproxy.py
index 6ec98d2..9084506 100644
--- a/sos/plugins/haproxy.py
+++ b/sos/plugins/haproxy.py
@@ -27,7 +27,11 @@ class HAProxy(Plugin, RedHatPlugin, DebianPlugin):
     packages = ('haproxy',)
 
     def setup(self):
-        self.add_copy_spec("/etc/haproxy/haproxy.cfg")
+        var_puppet_gen = "/var/lib/config-data/puppet-generated/haproxy"
+        self.add_copy_spec([
+            "/etc/haproxy/haproxy.cfg",
+            var_puppet_gen + "/etc/haproxy/haproxy.cfg"
+        ])
         self.add_copy_spec("/etc/haproxy/conf.d/*")
         self.add_cmd_output("haproxy -f /etc/haproxy/haproxy.cfg -c")
 
diff --git a/sos/plugins/iscsi.py b/sos/plugins/iscsi.py
index 7324b26..66aa632 100644
--- a/sos/plugins/iscsi.py
+++ b/sos/plugins/iscsi.py
@@ -30,9 +30,11 @@ class RedHatIscsi(Iscsi, RedHatPlugin):
 
     def setup(self):
         super(RedHatIscsi, self).setup()
+        var_puppet_gen = "/var/lib/config-data/puppet-generated/iscsid"
         self.add_copy_spec([
             "/etc/iscsi/iscsid.conf",
             "/etc/iscsi/initiatorname.iscsi",
+            var_puppet_gen + "/etc/iscsi/initiatorname.iscsi",
             "/var/lib/iscsi"
         ])
         self.add_cmd_output([
diff --git a/sos/plugins/mongodb.py b/sos/plugins/mongodb.py
index 46b0251..8c89517 100644
--- a/sos/plugins/mongodb.py
+++ b/sos/plugins/mongodb.py
@@ -25,11 +25,18 @@ class MongoDb(Plugin, DebianPlugin, UbuntuPlugin):
     profiles = ('services',)
 
     packages = ('mongodb-server',)
-    files = ('/etc/mongodb.conf',)
+    var_puppet_gen = "/var/lib/config-data/puppet-generated/mongodb"
+
+    files = (
+        '/etc/mongodb.conf',
+        var_puppet_gen + '/etc/mongod.conf'
+    )
 
     def setup(self):
         self.add_copy_spec([
             "/etc/mongodb.conf",
+            self.var_puppet_gen + "/etc/",
+            self.var_puppet_gen + "/etc/systemd/system/mongod.service.d/",
             "/var/log/mongodb/mongodb.log",
             "/var/log/containers/mongodb/mongodb.log"
         ])
@@ -41,6 +48,12 @@ class MongoDb(Plugin, DebianPlugin, UbuntuPlugin):
             r"mms-token = ********"
         )
 
+        self.do_file_sub(
+            self.var_puppet_gen + "/etc/mongodb.conf",
+            r"(mms-token\s*=\s*.*)",
+            r"mms-token = ********"
+        )
+
 
 class RedHatMongoDb(MongoDb, RedHatPlugin):
 
diff --git a/sos/plugins/mysql.py b/sos/plugins/mysql.py
index 7bf933a..decca69 100644
--- a/sos/plugins/mysql.py
+++ b/sos/plugins/mysql.py
@@ -93,9 +93,10 @@ class RedHatMysql(Mysql, RedHatPlugin):
         super(RedHatMysql, self).setup()
         self.add_copy_spec([
             "/etc/ld.so.conf.d/mysql-*.conf",
-            "/etc/ld.so.conf.d/mariadb-*.conf"
+            "/etc/ld.so.conf.d/mariadb-*.conf",
+            "/etc/my.cnf.d/*",
+            "/var/lib/config-data/puppet-generated/mysql/etc/my.cnf.d/*"
         ])
-        self.add_copy_spec("/etc/my.cnf.d/*")
 
 
 class DebianMysql(Mysql, DebianPlugin, UbuntuPlugin):
diff --git a/sos/plugins/openstack_ceilometer.py b/sos/plugins/openstack_ceilometer.py
index 2c3a809..b3c6bd8 100644
--- a/sos/plugins/openstack_ceilometer.py
+++ b/sos/plugins/openstack_ceilometer.py
@@ -27,19 +27,25 @@ class OpenStackCeilometer(Plugin):
     profiles = ('openstack', 'openstack_controller', 'openstack_compute')
 
     option_list = []
+    var_puppet_gen = "/var/lib/config-data/puppet-generated/ceilometer"
 
     def setup(self):
         # Ceilometer
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec(["/var/log/ceilometer/",
-                                "/var/log/containers/ceilometer/"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/ceilometer/*",
+                "/var/log/containers/ceilometer/*"
+            ], sizelimit=self.limit)
         else:
-            self.add_copy_spec(["/var/log/ceilometer/*.log",
-                                "/var/log/containers/ceilometer/*.log"],
-                               sizelimit=self.limit)
-        self.add_copy_spec("/etc/ceilometer/")
+            self.add_copy_spec([
+                "/var/log/ceilometer/*.log",
+                "/var/log/containers/ceilometer/*.log"
+            ], sizelimit=self.limit)
+        self.add_copy_spec([
+            "/etc/ceilometer/*",
+            self.var_puppet_gen + "/etc/ceilometer/*"
+        ])
         if self.get_option("verify"):
             self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
 
@@ -54,6 +60,10 @@ class OpenStackCeilometer(Plugin):
 
         regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys)
         self.do_path_regex_sub("/etc/ceilometer/*", regexp, r"\1*********")
+        self.do_path_regex_sub(
+            self.var_puppet_gen + "/etc/ceilometer/*",
+            regexp, r"\1*********"
+        )
 
 
 class DebianCeilometer(OpenStackCeilometer, DebianPlugin,
diff --git a/sos/plugins/openstack_glance.py b/sos/plugins/openstack_glance.py
index 6202c49..0a2bdc1 100644
--- a/sos/plugins/openstack_glance.py
+++ b/sos/plugins/openstack_glance.py
@@ -28,6 +28,7 @@ class OpenStackGlance(Plugin):
     profiles = ('openstack', 'openstack_controller')
 
     option_list = []
+    var_puppet_gen = "/var/lib/config-data/puppet-generated/glance_api"
 
     def setup(self):
         # Glance
@@ -38,15 +39,21 @@ class OpenStackGlance(Plugin):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec(["/var/log/glance/",
-                                "/var/log/containers/glance/"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/glance/",
+                "/var/log/containers/glance/"
+            ], sizelimit=self.limit)
         else:
-            self.add_copy_spec(["/var/log/glance/*.log",
-                                "/var/log/containers/glance/*.log"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/glance/*.log",
+                "/var/log/containers/glance/*.log"
+            ], sizelimit=self.limit)
 
-        self.add_copy_spec("/etc/glance/")
+        self.add_copy_spec([
+            "/etc/glance/",
+            self.var_puppet_gen + "/etc/glance/",
+            self.var_puppet_gen + "/etc/my.cnf.d/tripleo.cnf"
+        ])
 
         if self.get_option("verify"):
             self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
@@ -73,6 +80,10 @@ class OpenStackGlance(Plugin):
 
         regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys)
         self.do_path_regex_sub("/etc/glance/*", regexp, r"\1*********")
+        self.do_path_regex_sub(
+            self.var_puppet_gen + "/etc/glance/*",
+            regexp, r"\1*********"
+        )
 
 
 class DebianGlance(OpenStackGlance, DebianPlugin, UbuntuPlugin):
diff --git a/sos/plugins/openstack_heat.py b/sos/plugins/openstack_heat.py
index 0f457d9..a73916b 100644
--- a/sos/plugins/openstack_heat.py
+++ b/sos/plugins/openstack_heat.py
@@ -26,6 +26,7 @@ class OpenStackHeat(Plugin):
     profiles = ('openstack', 'openstack_controller')
 
     option_list = []
+    var_puppet_gen = "/var/lib/config-data/puppet-generated/heat"
 
     def setup(self):
         # Heat
@@ -49,15 +50,31 @@ class OpenStackHeat(Plugin):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec(["/var/log/heat/",
-                                "/var/log/containers/heat/"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/heat/",
+                "/var/log/containers/heat/"
+            ], sizelimit=self.limit)
         else:
-            self.add_copy_spec(["/var/log/heat/*.log",
-                                "/var/log/containers/heat/*.log"],
-                               sizelimit=self.limit)
-
-        self.add_copy_spec("/etc/heat/")
+            self.add_copy_spec([
+                "/var/log/heat/*.log",
+                "/var/log/containers/heat/*.log"
+            ], sizelimit=self.limit)
+
+        self.add_copy_spec([
+            "/etc/heat/",
+            self.var_puppet_gen + "/etc/heat/",
+            self.var_puppet_gen + "/etc/my.cnf.d/tripleo.cnf",
+            self.var_puppet_gen + "_api/etc/heat/",
+            self.var_puppet_gen + "_api/etc/httpd/conf/",
+            self.var_puppet_gen + "_api/etc/httpd/conf.d/",
+            self.var_puppet_gen + "_api/etc/httpd/conf.modules.d/*.conf",
+            self.var_puppet_gen + "_api/var/spool/cron/heat",
+            self.var_puppet_gen + "_api_cfn/etc/heat/",
+            self.var_puppet_gen + "_api_cfn/etc/httpd/conf/",
+            self.var_puppet_gen + "_api_cfn/etc/httpd/conf.d/",
+            self.var_puppet_gen + "_api_cfn/etc/httpd/conf.modules.d/*.conf",
+            self.var_puppet_gen + "_api_cfn/var/spool/cron/heat",
+        ])
 
         if self.get_option("verify"):
             self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
@@ -69,7 +86,21 @@ class OpenStackHeat(Plugin):
         ]
 
         regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys)
-        self.do_path_regex_sub("/etc/heat/*", regexp, r"\1*********")
+        self.do_path_regex_sub(
+            "/etc/heat/*",
+            regexp, r"\1*********")
+        self.do_path_regex_sub(
+            self.var_puppet_gen + "/etc/heat/*",
+            regexp, r"\1*********"
+        )
+        self.do_path_regex_sub(
+            self.var_puppet_gen + "_api/etc/heat/*",
+            regexp, r"\1*********"
+        )
+        self.do_path_regex_sub(
+            self.var_puppet_gen + "_api_cfn/etc/heat/*",
+            regexp, r"\1*********"
+        )
 
 
 class DebianHeat(OpenStackHeat, DebianPlugin, UbuntuPlugin):
diff --git a/sos/plugins/openstack_horizon.py b/sos/plugins/openstack_horizon.py
index 75ad3ce..a9a7fab 100644
--- a/sos/plugins/openstack_horizon.py
+++ b/sos/plugins/openstack_horizon.py
@@ -27,36 +27,58 @@ class OpenStackHorizon(Plugin):
     plugin_name = "openstack_horizon"
     profiles = ('openstack', 'openstack_controller')
     option_list = []
+    var_puppet_gen = "/var/lib/config-data/puppet-generated"
 
     def setup(self):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec(["/var/log/horizon/",
-                                "/var/log/containers/horizon/"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/horizon/",
+                "/var/log/containers/horizon/"
+            ], sizelimit=self.limit)
         else:
-            self.add_copy_spec(["/var/log/horizon/*.log",
-                                "/var/log/containers/horizon/*.log"],
-                               sizelimit=self.limit)
-
-        self.add_copy_spec("/etc/openstack-dashboard/")
+            self.add_copy_spec([
+                "/var/log/horizon/*.log",
+                "/var/log/containers/horizon/*.log"
+            ], sizelimit=self.limit)
+
+        self.add_copy_spec([
+            "/etc/openstack-dashboard/",
+            self.var_puppet_gen + "/horizon/etc/openstack-dashboard/",
+            self.var_puppet_gen + "/horizon/etc/httpd/conf/",
+            self.var_puppet_gen + "/horizon/etc/httpd/conf.d/",
+            self.var_puppet_gen + "/horizon/etc/httpd/conf.modules.d/*.conf",
+            self.var_puppet_gen + "/memcached/etc/sysconfig/memcached"
+        ])
         self.add_forbidden_path("*.py[co]")
 
         if self.get_option("verify"):
             self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
 
     def postproc(self):
+        var_puppet_gen = self.var_puppet_gen + "/horizon"
         protect_keys = [
             "SECRET_KEY", "EMAIL_HOST_PASSWORD"
         ]
 
         regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys)
-        self.do_path_regex_sub("/etc/openstack-dashboard/.*\.json",
-                               regexp, r"\1*********")
-        self.do_path_regex_sub("/etc/openstack-dashboard/local_settings/ + \
-                               .*\.conf.*",
-                               regexp, r"\1*********")
+        self.do_path_regex_sub(
+            "/etc/openstack-dashboard/.*\.json",
+            regexp, r"\1*********"
+        )
+        self.do_path_regex_sub(
+            var_puppet_gen + "/etc/openstack-dashboard/.*\.json",
+            regexp, r"\1*********"
+        )
+        self.do_path_regex_sub(
+            "/etc/openstack-dashboard/local_settings/.*\.conf.*",
+            regexp, r"\1*********"
+        )
+        self.do_path_regex_sub(
+            var_puppet_gen + "/etc/openstack-dashboard/.*\.conf.*",
+            regexp, r"\1*********"
+        )
 
 
 class DebianHorizon(OpenStackHorizon, DebianPlugin):
diff --git a/sos/plugins/openstack_keystone.py b/sos/plugins/openstack_keystone.py
index 82e987a..bdcb61d 100644
--- a/sos/plugins/openstack_keystone.py
+++ b/sos/plugins/openstack_keystone.py
@@ -26,24 +26,34 @@ class OpenStackKeystone(Plugin):
     profiles = ('openstack', 'openstack_controller')
 
     option_list = [("nopw", "dont gathers keystone passwords", "slow", True)]
+    var_puppet_gen = "/var/lib/config-data/puppet-generated/keystone"
 
     def setup(self):
         self.add_copy_spec([
             "/etc/keystone/default_catalog.templates",
             "/etc/keystone/keystone.conf",
             "/etc/keystone/logging.conf",
-            "/etc/keystone/policy.json"
+            "/etc/keystone/policy.json",
+            self.var_puppet_gen + "/etc/keystone/*.conf",
+            self.var_puppet_gen + "/etc/keystone/*.json",
+            self.var_puppet_gen + "/etc/httpd/conf/",
+            self.var_puppet_gen + "/etc/httpd/conf.d/",
+            self.var_puppet_gen + "/etc/httpd/conf.modules.d/*.conf",
+            self.var_puppet_gen + "/var/spool/cron/",
+            self.var_puppet_gen + "/etc/my.cnf.d/tripleo.cnf"
         ])
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec(["/var/log/keystone/",
-                                "/var/log/containers/keystone/"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/keystone/",
+                "/var/log/containers/keystone/"
+            ], sizelimit=self.limit)
         else:
-            self.add_copy_spec(["/var/log/keystone/*.log",
-                                "/var/log/containers/keystone/*.log"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/keystone/*.log",
+                "/var/log/containers/keystone/*.log"
+            ], sizelimit=self.limit)
 
         if self.get_option("verify"):
             self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
@@ -71,6 +81,10 @@ class OpenStackKeystone(Plugin):
 
         regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys)
         self.do_path_regex_sub("/etc/keystone/*", regexp, r"\1*********")
+        self.do_path_regex_sub(
+            self.var_puppet_gen + "/etc/keystone/*",
+            regexp, r"\1*********"
+        )
 
 
 class DebianKeystone(OpenStackKeystone, DebianPlugin, UbuntuPlugin):
diff --git a/sos/plugins/openstack_manila.py b/sos/plugins/openstack_manila.py
index c1e6609..92bca6f 100644
--- a/sos/plugins/openstack_manila.py
+++ b/sos/plugins/openstack_manila.py
@@ -24,18 +24,25 @@ class OpenStackManila(Plugin):
     profiles = ('openstack', 'openstack_controller')
     option_list = []
 
+    var_puppet_gen = "/var/lib/config-data/puppet-generated/manila"
+
     def setup(self):
-        self.add_copy_spec("/etc/manila/")
+        self.add_copy_spec([
+            "/etc/manila/",
+            self.var_puppet_gen + "/etc/manila/"
+        ])
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec(["/var/log/manila/*",
-                                "/var/log/containers/manila/*"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/manila/*",
+                "/var/log/containers/manila/*"
+            ], sizelimit=self.limit)
         else:
-            self.add_copy_spec(["/var/log/manila/*.log",
-                                "/var/log/containers/manila/*.log"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/manila/*.log",
+                "/var/log/containers/manila/*.log"
+            ], sizelimit=self.limit)
 
     def postproc(self):
         protect_keys = [
@@ -47,6 +54,10 @@ class OpenStackManila(Plugin):
 
         regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys)
         self.do_path_regex_sub("/etc/manila/*", regexp, r"\1*********")
+        self.do_path_regex_sub(
+            self.var_puppet_gen + "/etc/manila/*",
+            regexp, r"\1*********"
+        )
 
 
 class DebianManila(OpenStackManila, DebianPlugin, UbuntuPlugin):
diff --git a/sos/plugins/openstack_neutron.py b/sos/plugins/openstack_neutron.py
index d2bfe6b..b6116c7 100644
--- a/sos/plugins/openstack_neutron.py
+++ b/sos/plugins/openstack_neutron.py
@@ -25,19 +25,26 @@ class OpenStackNeutron(Plugin):
     plugin_name = "openstack_neutron"
     profiles = ('openstack', 'openstack_controller', 'openstack_compute')
 
+    var_puppet_gen = "/var/lib/config-data/puppet-generated/neutron"
+
     def setup(self):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec(["/var/log/neutron/",
-                                "/var/log/containers/neutron/"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/neutron/",
+                "/var/log/containers/neutron/"
+            ], sizelimit=self.limit)
         else:
-            self.add_copy_spec(["/var/log/neutron/*.log",
-                                "/var/log/containers/neutron/*.log"],
-                               sizelimit=self.limit)
-
-        self.add_copy_spec("/etc/neutron/")
+            self.add_copy_spec([
+                "/var/log/neutron/*.log",
+                "/var/log/containers/neutron/*.log"
+            ], sizelimit=self.limit)
+
+        self.add_copy_spec([
+            "/etc/neutron/",
+            self.var_puppet_gen + "/etc/neutron/"
+        ])
         self.add_copy_spec("/var/lib/neutron/")
         if self.get_option("verify"):
             self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
@@ -75,6 +82,10 @@ class OpenStackNeutron(Plugin):
         regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys)
 
         self.do_path_regex_sub("/etc/neutron/*", regexp, r"\1*********")
+        self.do_path_regex_sub(
+            self.var_puppet_gen + "/etc/neutron/*",
+            regexp, r"\1*********"
+        )
 
 
 class DebianNeutron(OpenStackNeutron, DebianPlugin, UbuntuPlugin):
diff --git a/sos/plugins/openstack_nova.py b/sos/plugins/openstack_nova.py
index c0e8109..75dd372 100644
--- a/sos/plugins/openstack_nova.py
+++ b/sos/plugins/openstack_nova.py
@@ -29,6 +29,8 @@ class OpenStackNova(Plugin):
     plugin_name = "openstack_nova"
     profiles = ('openstack', 'openstack_controller', 'openstack_compute')
 
+    var_puppet_gen = "/var/lib/config-data/puppet-generated/nova"
+
     def setup(self):
         # commands we do not need to source the environment file
         self.add_cmd_output("nova-manage db version")
@@ -67,15 +69,28 @@ class OpenStackNova(Plugin):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec(["/var/log/nova/",
-                                "/var/log/containers/nova/"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/nova/",
+                "/var/log/containers/nova/"
+            ], sizelimit=self.limit)
         else:
-            self.add_copy_spec(["/var/log/nova/*.log",
-                                "/var/log/containers/nova/*.log"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/nova/*.log",
+                "/var/log/containers/nova/*.log"
+            ], sizelimit=self.limit)
 
-        self.add_copy_spec("/etc/nova/")
+        self.add_copy_spec([
+            "/etc/nova/",
+            self.var_puppet_gen + "/etc/nova/",
+            self.var_puppet_gen + "/etc/my.cnf.d/tripleo.cnf",
+            self.var_puppet_gen + "_placement/var/spool/cron/nova",
+            self.var_puppet_gen + "_placement/etc/nova/",
+            self.var_puppet_gen + "_placement/etc/httpd/conf/",
+            self.var_puppet_gen + "_placement/etc/httpd/conf.d/",
+            self.var_puppet_gen + "_placement/etc/httpd/conf.modules.d/*.conf",
+            self.var_puppet_gen + "_placement/etc/my.cnf.d/tripleo.cnf",
+            self.var_puppet_gen + "/../memcached/etc/sysconfig/memcached"
+        ])
 
         if self.get_option("verify"):
             self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
@@ -92,6 +107,14 @@ class OpenStackNova(Plugin):
 
         regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys)
         self.do_path_regex_sub("/etc/nova/*", regexp, r"\1*********")
+        self.do_path_regex_sub(
+            self.var_puppet_gen + "/etc/nova/*",
+            regexp, r"\1*********"
+        )
+        self.do_path_regex_sub(
+            self.var_puppet_gen + "_placement/etc/nova/*",
+            regexp, r"\1*********"
+        )
 
 
 class DebianNova(OpenStackNova, DebianPlugin, UbuntuPlugin):
diff --git a/sos/plugins/openstack_sahara.py b/sos/plugins/openstack_sahara.py
index adaedf9..68cf0b3 100644
--- a/sos/plugins/openstack_sahara.py
+++ b/sos/plugins/openstack_sahara.py
@@ -23,22 +23,28 @@ class OpenStackSahara(Plugin):
     profiles = ('openstack', 'openstack_controller')
 
     option_list = []
+    var_puppet_gen = "/var/lib/config-data/puppet-generated/sahara"
 
     def setup(self):
-        self.add_copy_spec("/etc/sahara/")
+        self.add_copy_spec([
+            "/etc/sahara/",
+            self.var_puppet_gen + "/etc/sahara/"
+        ])
         self.add_journal(units="openstack-sahara-all")
         self.add_journal(units="openstack-sahara-api")
         self.add_journal(units="openstack-sahara-engine")
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec(["/var/log/sahara/",
-                                "/var/log/containers/sahara/"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/sahara/",
+                "/var/log/containers/sahara/"
+            ], sizelimit=self.limit)
         else:
-            self.add_copy_spec(["/var/log/sahara/*.log",
-                                "/var/log/containers/sahara/*.log"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/sahara/*.log",
+                "/var/log/containers/sahara/*.log"
+            ], sizelimit=self.limit)
 
         if self.get_option("verify"):
             self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
@@ -52,6 +58,10 @@ class OpenStackSahara(Plugin):
 
         regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys)
         self.do_path_regex_sub("/etc/sahara/*", regexp, r"\1*********")
+        self.do_path_regex_sub(
+            self.var_puppet_gen + "/etc/sahara/*",
+            regexp, r"\1*********"
+        )
 
 
 class DebianSahara(OpenStackSahara, DebianPlugin, UbuntuPlugin):
diff --git a/sos/plugins/openstack_swift.py b/sos/plugins/openstack_swift.py
index 9906b94..1cfff2b 100644
--- a/sos/plugins/openstack_swift.py
+++ b/sos/plugins/openstack_swift.py
@@ -27,19 +27,29 @@ class OpenStackSwift(Plugin):
 
     option_list = []
 
+    var_puppet_gen = "/var/lib/config-data/puppet-generated"
+
     def setup(self):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec(["/var/log/swift/",
-                                "/var/log/containers/swift/"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/swift/",
+                "/var/log/containers/swift/"
+            ], sizelimit=self.limit)
         else:
-            self.add_copy_spec(["/var/log/swift/*.log",
-                                "/var/log/containers/swift/*.log"],
-                               sizelimit=self.limit)
-
-        self.add_copy_spec("/etc/swift/")
+            self.add_copy_spec([
+                "/var/log/swift/*.log",
+                "/var/log/containers/swift/*.log"
+            ], sizelimit=self.limit)
+
+        self.add_copy_spec([
+            "/etc/swift/",
+            self.var_puppet_gen + "/swift/etc/*",
+            self.var_puppet_gen + "/swift/etc/swift/*",
+            self.var_puppet_gen + "/swift/etc/xinetd.d/*",
+            self.var_puppet_gen + "/memcached/etc/sysconfig/memcached"
+        ])
 
         if self.get_option("verify"):
             self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
@@ -54,6 +64,10 @@ 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(
+            self.var_puppet_gen + "/swift/etc/swift/.*\.conf.*",
+            regexp, r"\1*********"
+        )
 
 
 class DebianSwift(OpenStackSwift, DebianPlugin, UbuntuPlugin):
diff --git a/sos/plugins/openstack_trove.py b/sos/plugins/openstack_trove.py
index 5183ad1..093e5d5 100644
--- a/sos/plugins/openstack_trove.py
+++ b/sos/plugins/openstack_trove.py
@@ -26,19 +26,26 @@ class OpenStackTrove(Plugin):
     profiles = ('openstack', 'openstack_controller')
     option_list = []
 
+    var_puppet_gen = "/var/lib/config-data/puppet-generated/trove"
+
     def setup(self):
 
         self.limit = self.get_option("log_size")
         if self.get_option("all_logs"):
-            self.add_copy_spec(["/var/log/trove/",
-                                "/var/log/containers/trove/"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/trove/",
+                "/var/log/containers/trove/"
+            ], sizelimit=self.limit)
         else:
-            self.add_copy_spec(["/var/log/trove/*.log",
-                                "/var/log/containers/trove/*.log"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/trove/*.log",
+                "/var/log/containers/trove/*.log"
+            ], sizelimit=self.limit)
 
-        self.add_copy_spec('/etc/trove/')
+        self.add_copy_spec([
+            '/etc/trove/',
+            self.var_puppet_gen + '/etc/trove/'
+        ])
 
         if self.get_option("verify"):
             self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
@@ -53,6 +60,10 @@ class OpenStackTrove(Plugin):
 
         regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys)
         self.do_path_regex_sub("/etc/trove/*", regexp, r"\1*********")
+        self.do_path_regex_sub(
+            self.var_puppet_gen + "/etc/trove/*",
+            regexp, r"\1*********"
+        )
 
 
 class DebianTrove(OpenStackTrove, DebianPlugin, UbuntuPlugin):
diff --git a/sos/plugins/rabbitmq.py b/sos/plugins/rabbitmq.py
index 8d73835..2c7e428 100644
--- a/sos/plugins/rabbitmq.py
+++ b/sos/plugins/rabbitmq.py
@@ -20,7 +20,11 @@ class RabbitMQ(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
     """
     plugin_name = 'rabbitmq'
     profiles = ('services',)
-    files = ('/etc/rabbitmq/rabbitmq.conf',)
+    var_puppet_gen = "/var/lib/config-data/puppet-generated/rabbitmq"
+    files = (
+        '/etc/rabbitmq/rabbitmq.conf',
+        var_puppet_gen + '/etc/rabbitmq/rabbitmq.config'
+    )
     packages = ('rabbitmq-server',)
 
     def setup(self):
@@ -28,8 +32,16 @@ class RabbitMQ(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
         self.add_cmd_output("rabbitmqctl cluster_status")
         self.add_cmd_output("rabbitmqctl list_policies")
 
-        self.add_copy_spec("/etc/rabbitmq/*")
-        self.add_copy_spec(["/var/log/rabbitmq/*",
-                            "/var/log/containers/rabbitmq/*"],
-                           sizelimit=self.get_option('log_size'))
+        self.add_copy_spec([
+            "/etc/rabbitmq/*",
+            self.var_puppet_gen + "/etc/rabbitmq/*",
+            self.var_puppet_gen + "/etc/security/limits.d/",
+            self.var_puppet_gen + "/etc/systemd/"
+        ])
+        self.add_copy_spec([
+            "/var/log/rabbitmq/*",
+            "/var/log/containers/rabbitmq/*"
+        ], sizelimit=self.get_option('log_size'))
+
+
 # vim: set et ts=4 sw=4 :
diff --git a/sos/plugins/redis.py b/sos/plugins/redis.py
index 9ac2397..088a9a2 100644
--- a/sos/plugins/redis.py
+++ b/sos/plugins/redis.py
@@ -1,4 +1,5 @@
 # Copyright (C) 2015 Red Hat, Inc., Abhijeet Kasurde <akasurde@redhat.com>
+# Copyright (C) 2017 Red Hat, Inc., Martin Schuppert <mschuppe@redhat.com>
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,20 +26,32 @@ class Redis(Plugin, RedHatPlugin):
     profiles = ('services',)
 
     packages = ('redis',)
-    files = ('/etc/redis.conf', '/var/log/redis')
+    var_puppet_gen = "/var/lib/config-data/puppet-generated/redis"
+    files = (
+        '/etc/redis.conf',
+        '/var/log/redis',
+        var_puppet_gen + '/etc/redis.conf'
+    )
 
     def setup(self):
-        self.add_copy_spec("/etc/redis.conf")
+        self.add_copy_spec([
+            "/etc/redis.conf",
+            self.var_puppet_gen + "/etc/redis*",
+            self.var_puppet_gen + "/etc/redis/",
+            self.var_puppet_gen + "/etc/security/limits.d/"
+        ])
         self.limit = self.get_option("log_size")
         self.add_cmd_output("redis-cli info")
         if self.get_option("all_logs"):
-            self.add_copy_spec(["/var/log/redis/redis.log*",
-                                "/var/log/containers/redis/redis.log*"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/redis/redis.log*",
+                "/var/log/containers/redis/redis.log*"
+            ], sizelimit=self.limit)
         else:
-            self.add_copy_spec(["/var/log/redis/redis.log",
-                                "/var/log/containers/redis/redis.log"],
-                               sizelimit=self.limit)
+            self.add_copy_spec([
+                "/var/log/redis/redis.log",
+                "/var/log/containers/redis/redis.log"
+            ], sizelimit=self.limit)
 
     def postproc(self):
         self.do_file_sub(
@@ -51,5 +64,16 @@ class Redis(Plugin, RedHatPlugin):
             r"(requirepass\s).*",
             r"\1********"
         )
+        self.do_path_regex_sub(
+            self.var_puppet_gen + "/etc/redis.conf*",
+            r"(masterauth\s).*",
+            r"\1*********"
+        )
+        self.do_path_regex_sub(
+            self.var_puppet_gen + "/etc/redis.conf*",
+            r"(requirepass\s).*",
+            r"\1*********"
+        )
+
 
 # vim: set et ts=4 sw=4 :
-- 
2.7.5