|
|
0cd6dc |
From a85f58cb566883532ba0df93ecf0dba5bc190fc3 Mon Sep 17 00:00:00 2001
|
|
|
0cd6dc |
From: Felipe Reyes <felipe.reyes@canonical.com>
|
|
|
0cd6dc |
Date: Tue, 18 Nov 2014 14:32:20 -0300
|
|
|
0cd6dc |
Subject: [PATCH 20/93] [corosync/pacemaker] Collect corosync-cfgtool -s output
|
|
|
0cd6dc |
/ add Pacemaker support
|
|
|
0cd6dc |
|
|
|
0cd6dc |
This patch improves HA clustering information gathering adding a new a
|
|
|
0cd6dc |
new plugin for Pacemaker.
|
|
|
0cd6dc |
|
|
|
0cd6dc |
Signed-off-by: Felipe Reyes <felipe.reyes@canonical.com>
|
|
|
0cd6dc |
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
|
|
0cd6dc |
---
|
|
|
0cd6dc |
sos/plugins/corosync.py | 1 +
|
|
|
0cd6dc |
sos/plugins/pacemaker.py | 32 ++++++++++++++++++++++++++++++++
|
|
|
0cd6dc |
2 files changed, 33 insertions(+)
|
|
|
0cd6dc |
create mode 100644 sos/plugins/pacemaker.py
|
|
|
0cd6dc |
|
|
|
0cd6dc |
diff --git a/sos/plugins/corosync.py b/sos/plugins/corosync.py
|
|
|
0cd6dc |
index db9b547..27642a0 100644
|
|
|
0cd6dc |
--- a/sos/plugins/corosync.py
|
|
|
0cd6dc |
+++ b/sos/plugins/corosync.py
|
|
|
0cd6dc |
@@ -34,6 +34,7 @@ class Corosync(Plugin):
|
|
|
0cd6dc |
"corosync-quorumtool -s",
|
|
|
0cd6dc |
"corosync-cpgtool",
|
|
|
0cd6dc |
"corosync-objctl -a",
|
|
|
0cd6dc |
+ "corosync-cfgtool -s",
|
|
|
0cd6dc |
"corosync-fplay",
|
|
|
0cd6dc |
"corosync-objctl -w runtime.blackbox.dump_state=$(date +\%s)",
|
|
|
0cd6dc |
"corosync-objctl -w runtime.blackbox.dump_flight_data=$(date +\%s)"
|
|
|
0cd6dc |
diff --git a/sos/plugins/pacemaker.py b/sos/plugins/pacemaker.py
|
|
|
0cd6dc |
new file mode 100644
|
|
|
0cd6dc |
index 0000000..802b40f
|
|
|
0cd6dc |
--- /dev/null
|
|
|
0cd6dc |
+++ b/sos/plugins/pacemaker.py
|
|
|
0cd6dc |
@@ -0,0 +1,32 @@
|
|
|
0cd6dc |
+# This program is free software; you can redistribute it and/or modify
|
|
|
0cd6dc |
+# it under the terms of the GNU General Public License as published by
|
|
|
0cd6dc |
+# the Free Software Foundation; either version 2 of the License, or
|
|
|
0cd6dc |
+# (at your option) any later version.
|
|
|
0cd6dc |
+
|
|
|
0cd6dc |
+# This program is distributed in the hope that it will be useful,
|
|
|
0cd6dc |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
0cd6dc |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
0cd6dc |
+# GNU General Public License for more details.
|
|
|
0cd6dc |
+
|
|
|
0cd6dc |
+# You should have received a copy of the GNU General Public License
|
|
|
0cd6dc |
+# along with this program; if not, write to the Free Software
|
|
|
0cd6dc |
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
0cd6dc |
+
|
|
|
0cd6dc |
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
|
|
|
0cd6dc |
+
|
|
|
0cd6dc |
+
|
|
|
0cd6dc |
+class Pacemaker(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
|
|
|
0cd6dc |
+ "HA Cluster resource manager"
|
|
|
0cd6dc |
+
|
|
|
0cd6dc |
+ plugin_name = "pacemaker"
|
|
|
0cd6dc |
+ profiles = ("cluster", )
|
|
|
0cd6dc |
+ packages = ("pacemaker", )
|
|
|
0cd6dc |
+
|
|
|
0cd6dc |
+ def setup(self):
|
|
|
0cd6dc |
+ self.add_copy_spec([
|
|
|
0cd6dc |
+ "/var/lib/pacemaker/cib/cib.xml"
|
|
|
0cd6dc |
+ ])
|
|
|
0cd6dc |
+ self.add_cmd_output([
|
|
|
0cd6dc |
+ "crm status",
|
|
|
0cd6dc |
+ "crm configure show",
|
|
|
0cd6dc |
+ ])
|
|
|
0cd6dc |
--
|
|
|
0cd6dc |
1.9.3
|
|
|
0cd6dc |
|