aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Gaillot <kgaillot@redhat.com>2017-09-19 11:25:00 -0500
committerBryn M. Reeves <bmr@redhat.com>2018-04-04 16:34:40 +0100
commit52a8fdfa0ccb53a60cec9feb785a43fdd05ff770 (patch)
treeb9870ef4fb49355cf24571c17675c3d999b2066f
parent37aeea3449a94a0f703d1f59579fae3dc7d2aef5 (diff)
downloadsos-52a8fdfa0ccb53a60cec9feb785a43fdd05ff770.tar.gz
[pacemaker] Collect new Pacemaker log locations
The default log locations will change in Pacemaker 2.0, so prepare for that now. Resolves: #1106 Signed-off-by: Ken Gaillot <kgaillot@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/pacemaker.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/sos/plugins/pacemaker.py b/sos/plugins/pacemaker.py
index 433570de..9576db54 100644
--- a/sos/plugins/pacemaker.py
+++ b/sos/plugins/pacemaker.py
@@ -36,11 +36,19 @@ class Pacemaker(Plugin, DebianPlugin, UbuntuPlugin):
def setup(self):
self.add_copy_spec([
+ # Pacemaker cluster configuration file
"/var/lib/pacemaker/cib/cib.xml",
- self.defaults,
+
+ # Pacemaker 2.x default log locations
+ "/var/log/cluster/pacemaker.log",
+ "/var/log/cluster/bundles/*/",
+
+ # Pacemaker 1.x default log locations
"/var/log/pacemaker.log",
- "/var/log/pcsd/pcsd.log",
"/var/log/pacemaker/bundles/*/",
+
+ self.defaults,
+ "/var/log/pcsd/pcsd.log",
])
self.add_cmd_output([
"crm_mon -1 -A -n -r -t",
@@ -76,9 +84,9 @@ class Pacemaker(Plugin, DebianPlugin, UbuntuPlugin):
(crm_scrub, crm_dest, crm_from),
chroot=self.tmp_in_sysroot())
- # collect user-defined logfiles, matching pattern:
- # PCMK_loggfile=filename
- # specified in the pacemaker defaults file.
+ # collect user-defined logfiles, matching a shell-style syntax:
+ # PCMK_logfile=filename
+ # specified in the pacemaker start-up environment file.
pattern = '^\s*PCMK_logfile=[\'\"]?(\S+)[\'\"]?\s*(\s#.*)?$'
if os.path.isfile(self.defaults):
with open(self.defaults) as f: