[node-patches] Change in ovirt-node[master]: Use new kdump config settings

rbarry at redhat.com rbarry at redhat.com
Tue May 13 20:14:32 UTC 2014


Ryan Barry has uploaded a new change for review.

Change subject: Use new kdump config settings
......................................................................

Use new kdump config settings

"net $location" is deprecated. Explicitly use ssh or nfs instead.

Change-Id: I074df91fb2e99aa003f3f917c686d8ba50f81123
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1095140
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirt/node/config/defaults.py
M src/ovirtnode/kdump.py
2 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/49/27649/1

diff --git a/src/ovirt/node/config/defaults.py b/src/ovirt/node/config/defaults.py
index 10b7559..9bd7bcd 100644
--- a/src/ovirt/node/config/defaults.py
+++ b/src/ovirt/node/config/defaults.py
@@ -1072,7 +1072,7 @@
 
             def commit(self):
                 import ovirtnode.kdump as okdump
-                okdump.write_kdump_config(nfs)
+                okdump.write_kdump_config(nfs, "nfs")
 
         class PopulateSshKeys(utils.Transaction.Element):
             title = "Fetching and testing SSH keys"
@@ -1117,7 +1117,7 @@
                 import ovirtnode.kdump as okdump
                 from ovirtnode.ovirtfunctions import ovirt_store_config
 
-                okdump.write_kdump_config(ssh)
+                okdump.write_kdump_config(ssh, "ssh")
 
                 kdumpctl_cmd = system.which("kdumpctl")
                 if kdumpctl_cmd:
diff --git a/src/ovirtnode/kdump.py b/src/ovirtnode/kdump.py
index 60584d1..afb9c07 100644
--- a/src/ovirtnode/kdump.py
+++ b/src/ovirtnode/kdump.py
@@ -21,11 +21,11 @@
 import ovirtnode.ovirtfunctions as _functions
 
 
-def write_kdump_config(config):
+def write_kdump_config(config, type):
     kdump_config_file = open("/etc/kdump.conf", "w")
     kdump_config_file.write("default reboot\n")
     # adds a 60 sec delay to make sure the nic is up
-    kdump_config_file.write("net " + config + "\n")
+    kdump_config_file.write(type + " " + config + "\n")
     kdump_config_file.close()
     _functions.ovirt_store_config("/etc/kdump.conf")
     return True
@@ -43,7 +43,7 @@
 def kdump_auto():
     try:
         if "OVIRT_KDUMP_NFS" in _functions.OVIRT_VARS:
-            write_kdump_config(_functions.OVIRT_VARS["OVIRT_KDUMP_NFS"])
+            write_kdump_config(_functions.OVIRT_VARS["OVIRT_KDUMP_NFS"], "nfs")
             _functions.ovirt_store_config("/etc/kdump.conf")
             _functions.logger.info("Syslog Configuration Completed")
             return True


-- 
To view, visit http://gerrit.ovirt.org/27649
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I074df91fb2e99aa003f3f917c686d8ba50f81123
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>



More information about the node-patches mailing list