[node-patches] Change in ovirt-node[master]: setup: Rollback old KDump config if needed

fabiand at fedoraproject.org fabiand at fedoraproject.org
Mon Oct 1 12:27:59 UTC 2012


Fabian Deutsch has uploaded a new change for review.

Change subject: setup: Rollback old KDump config if needed
......................................................................

setup: Rollback old KDump config if needed

Previously the kdump.conf was removed when it could not be used to
restart the kdump service. Now the current - and working config - is
backuped and rolled back to in the case where the new config is not
usable.

rhbz#859352

Change-Id: Ia44ab23482b868021e6c6b23cb18f63aacfc6337
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/ovirt-config-setup.py
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/84/8284/1

diff --git a/scripts/ovirt-config-setup.py b/scripts/ovirt-config-setup.py
index 50c5bf9..26c90d3 100755
--- a/scripts/ovirt-config-setup.py
+++ b/scripts/ovirt-config-setup.py
@@ -1852,6 +1852,8 @@
             disable_snmpd()
 
     def process_kdump_config(self):
+        if os.path.exists("/etc/kdump.conf"):
+            system("cp /etc/kdump.conf /etc/kdump.conf.old")
         if self.kdump_nfs_type.value() == 1:
             write_kdump_config(self.kdump_nfs_config.value())
         if self.kdump_ssh_type.value() == 1:
@@ -1880,8 +1882,12 @@
             unmount_config("/etc/kdump.conf")
             if os.path.exists("/etc/kdump.conf"):
                 os.remove("/etc/kdump.conf")
+            system("cat /etc/kdump.conf.old > /etc/kdump.conf")
+            system("service kdump restart")
         else:
             ovirt_store_config("/etc/kdump.conf")
+        if os.path.exists("/etc/kdump.conf.old"):
+            system("rm /etc/kdump.conf.old")
 
     def process_remote_storage_config(self):
         set_iscsi_initiator(self.iscsi_initiator_config.value())


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia44ab23482b868021e6c6b23cb18f63aacfc6337
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list