From 27cf8454651453553a60c20c38040dbc3ccb770e Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Thu, 20 Dec 2012 16:59:28 +0000
Subject: [PATCH] Make OpenShift module collect domain information

Make the OpenShift module attempt a zone transfer for its domain
(rather than it's hostname as originally implemented).
---
 sos/plugins/openshift.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sos/plugins/openshift.py b/sos/plugins/openshift.py
index 4d8dac6..b0f54f5 100755
--- a/sos/plugins/openshift.py
+++ b/sos/plugins/openshift.py
@@ -69,14 +69,14 @@ class openshift(sos.plugintools.PluginBase):
                 self.collectExtOutput("/bin/ls %s" % gear_path)
                 self.addCopySpec(gear_path + "/*/log*")
         try:
-            status, output, runtime = self.callExtProg("/bin/hostname")
+            status, output, runtime = self.callExtProg("/bin/hostname -d")
             if status != 0:
-                hostname = None
+                domainname = None
             else:
-                hostname = output.strip()
+                domainname = output.strip()
         except:
             hostname = None
-        self.collectExtOutput("/usr/bin/dig %s axfr" % hostname)
+        self.collectExtOutput("/usr/bin/dig %s axfr" % domainname)
         return
 
     def postproc(self):
-- 
1.9.3

