Bug 859352

Summary: Invalid apply should not overwrite the previous kdump configuration
Product: Red Hat Enterprise Linux 6 Reporter: Meng Liang <mliang>
Component: ovirt-nodeAssignee: Fabian Deutsch <fdeutsch>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 6.3CC: acathrow, bsarathy, chchen, chetan, cshao, fdeutsch, gouyang, hadong, jboggs, leiwang, mburns, ovirt-maint, ycui
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-node-2.5.0-5.el6 Doc Type: Bug Fix
Doc Text:
The kdump configuration file was removed when it could not be used to restart the kdump service. This meant that invalid changes to a kdump configuration could overwrite existing working configurations. Now, working kdump configuration files are backed up and restored when changes to kdump configuration are not usable.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-28 16:39:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Meng Liang 2012-09-21 09:34:22 UTC
Description of problem:
Firstly, Kdump could be set as SSH successfully.
#cat /etc/kdump.conf
default reboot
link_delay 60
net root.65.137

Then, select 'NFS' instead, but providing a invalid location.In the case, Kernel Dump page became a fresh new page.
#cat /etc/kdump.conf
default reboot
link_delay 60
net

Version-Release number of selected component (if applicable):
rhev-hypervisor6-6.3-20120920.0.rhev31.el6_3

How reproducible:
Always
QA Whiteboard: TUI

Steps to Reproduce:
1. rhev-hypervisor6-6.3-20120920.0.rhev31.el6_3
2. Go to Kernel Dump and set as SSH with valid SSH location, Kdump was set successfully.
3. Then change the Kernel Dump to NFS, without providing location or giving a invalid input, then press<Apply>

Actual results:
Alert message 'Kdump Status Kdump configuration failed, location unreachable' shows
Existing Kernel Dump configuration(SSH) was removed, Kernel Dump page became a fresh new page.

Expected results:
Keep the previous successful setting, and provide error message to stop the user from doing the invalid setting.

Comment 2 Fabian Deutsch 2012-10-01 14:07:14 UTC
Patch:
http://gerrit.ovirt.org/#/c/8284/

The patch above backups the old (and working) config file and rolls back to this file in case that the configuration fails.

Tested as follows:
1. Clean rhevh install
2. Apply patch
3. Login and goto KDump page
4. Select "SSH"
5. Leave "SSH Location" blank and hit <Apply>

6. Dialog appears about failed configuration. Press ok

7. Old kdump.conf is restored / restore/local selected in kdump page

Comment 5 cshao 2012-10-31 08:16:14 UTC
Test version:
rhev-hypervisor6-6.4-20121015.1.el6.
ovirt-node-2.5.0-7.el6_4.noarch

Test steps:
1. Go to Kernel Dump and set as SSH with valid SSH location, Kdump was set successfully.
2. Then change the Kernel Dump to NFS, without providing location or giving a invalid input, then press<Apply>

Test result:
Old kdump.conf is restored / restore/local selected in kdump page.
So the bug is fixed, change bug status to VERIFIED.

Comment 6 cshao 2012-12-28 01:01:55 UTC
Re-test with version rhev-hypervisor6-6.4-20121212.1.el6,

Test steps:
1. Go to Kernel Dump and set as SSH with valid SSH location, Kdump was set successfully.
2. Then change the Kernel Dump to NFS, without providing location or giving a invalid input, then press<Apply>

Test result:
Old kdump.conf is restored / restore/local selected in kdump page.
So the bug was fixed,

Comment 9 errata-xmlrpc 2013-02-28 16:39:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0556.html