Blame SOURCES/0085-etcd-split-etcd-functionality-from-kubernetes-into-n.patch

0cd6dc
From 1ddad7799d05346c5cf7689c0da2da6383b90d7c Mon Sep 17 00:00:00 2001
0cd6dc
From: Neependra Khare <nkhare@redhat.com>
0cd6dc
Date: Tue, 27 Jan 2015 15:54:23 +0000
0cd6dc
Subject: [PATCH 85/93] [etcd] split etcd functionality from kubernetes into
0cd6dc
 new plugin
0cd6dc
0cd6dc
Signed-off-by: Neependra Khare <nkhare@redhat.com>
0cd6dc
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
0cd6dc
---
0cd6dc
 sos/plugins/etcd.py       | 36 ++++++++++++++++++++++++++++++++++++
0cd6dc
 sos/plugins/kubernetes.py |  8 --------
0cd6dc
 2 files changed, 36 insertions(+), 8 deletions(-)
0cd6dc
 create mode 100644 sos/plugins/etcd.py
0cd6dc
0cd6dc
diff --git a/sos/plugins/etcd.py b/sos/plugins/etcd.py
0cd6dc
new file mode 100644
0cd6dc
index 0000000..69edca0
0cd6dc
--- /dev/null
0cd6dc
+++ b/sos/plugins/etcd.py
0cd6dc
@@ -0,0 +1,36 @@
0cd6dc
+# Copyright (C) 2015 Red Hat, Inc. Neependra Khare <nkhare@redhat.com>
0cd6dc
+# Copyright (C) 2015 Red Hat, Inc. Bryn M. Reeves <bmr@redhat.com>
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
0cd6dc
+
0cd6dc
+
0cd6dc
+class etcd(Plugin, RedHatPlugin):
0cd6dc
+
0cd6dc
+    """etcd plugin
0cd6dc
+    """
0cd6dc
+
0cd6dc
+    def setup(self):
0cd6dc
+        self.add_copy_spec("/etc/etcd")
0cd6dc
+
0cd6dc
+        self.add_cmd_output("curl http://localhost:4001/version")
0cd6dc
+        self.add_cmd_output("curl http://localhost:4001/v2/members")
0cd6dc
+        self.add_cmd_output("curl http://localhost:4001/v2/stats/leader")
0cd6dc
+        self.add_cmd_output("curl http://localhost:4001/v2/stats/self")
0cd6dc
+        self.add_cmd_output("curl http://localhost:4001/v2/stats/store")
0cd6dc
+        self.add_cmd_output("ls -lR /var/lib/etcd/")
0cd6dc
+
0cd6dc
+
0cd6dc
+# vim: et ts=5 sw=4
0cd6dc
diff --git a/sos/plugins/kubernetes.py b/sos/plugins/kubernetes.py
0cd6dc
index af3f3a6..289d784 100644
0cd6dc
--- a/sos/plugins/kubernetes.py
0cd6dc
+++ b/sos/plugins/kubernetes.py
0cd6dc
@@ -24,7 +24,6 @@ class kubernetes(Plugin, RedHatPlugin):
0cd6dc
 
0cd6dc
     def setup(self):
0cd6dc
         self.add_copy_spec("/etc/kubernetes")
0cd6dc
-        self.add_copy_spec("/etc/etcd")
0cd6dc
         self.add_copy_spec("/var/run/flannel")
0cd6dc
 
0cd6dc
         # Kubernetes master info
0cd6dc
@@ -35,12 +34,5 @@ class kubernetes(Plugin, RedHatPlugin):
0cd6dc
         self.add_cmd_output("kubectl get -o json events")
0cd6dc
         self.add_cmd_output("journalctl -r -u kubelet")
0cd6dc
 
0cd6dc
-        # etcd
0cd6dc
-        self.add_cmd_output("curl http://127.0.0.1:4001/version")
0cd6dc
-        self.add_cmd_output("curl http://127.0.0.1:4001/v2/members")
0cd6dc
-        self.add_cmd_output("curl http://127.0.0.1:4001/v2/stats/leader")
0cd6dc
-        self.add_cmd_output("curl http://127.0.0.1:4001/v2/stats/self")
0cd6dc
-        self.add_cmd_output("curl http://127.0.0.1:4001/v2/stats/store")
0cd6dc
-
0cd6dc
 
0cd6dc
 # vim: et ts=5 sw=4
0cd6dc
-- 
0cd6dc
1.9.3
0cd6dc