aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2017-05-09 14:34:13 +0100
committerBryn M. Reeves <bmr@redhat.com>2017-05-09 14:38:30 +0100
commit17809273cecd83c068931e5d7e73d126d98e6ac1 (patch)
tree7c3153c525c69ac1d987775975ffb47845a494ac
parent5e3ae1cf78cbd7dd122ed229add39e89aefdc21e (diff)
downloadsos-17809273cecd83c068931e5d7e73d126d98e6ac1.tar.gz
[pacemaker] Collect /etc/default/pacemaker for Debian/Ubuntu
Make /etc/default/pacemaker the default location for the Pacemaker defaults file, and have the RedHatPlugin override this to the /etc/sysconfig/pacemaker location as required. Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/pacemaker.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/sos/plugins/pacemaker.py b/sos/plugins/pacemaker.py
index 0dac1da5..74de4336 100644
--- a/sos/plugins/pacemaker.py
+++ b/sos/plugins/pacemaker.py
@@ -17,12 +17,13 @@ from datetime import datetime, timedelta
import re
-class Pacemaker(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+class Pacemaker(Plugin, DebianPlugin, UbuntuPlugin):
"""HA Cluster resource manager"""
plugin_name = "pacemaker"
profiles = ("cluster", )
packages = ["pacemaker"]
+ defaults = "/etc/default/pacemaker"
option_list = [
("crm_from", "specify the start time for crm_report", "fast", False),
@@ -32,7 +33,7 @@ class Pacemaker(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
def setup(self):
self.add_copy_spec([
"/var/lib/pacemaker/cib/cib.xml",
- "/etc/sysconfig/pacemaker",
+ self.defaults,
"/var/log/pacemaker.log",
"/var/log/pcsd/pcsd.log"
])
@@ -76,4 +77,13 @@ class Pacemaker(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
r"\1********"
)
+
+class RedHatPacemaker(Pacemaker, RedHatPlugin):
+ """ Handle alternate location of pacemaker defaults file.
+ """
+ def setup(self):
+ self.defaults = "/etc/sysconfig/pacemaker"
+ super(RedHatPacemaker, self).setup()
+
+
# vim: et ts=4 sw=4