Bug 733084 - Cleared options are not saved correctly in Virtual Machine services
Summary: Cleared options are not saved correctly in Virtual Machine services
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: luci
Version: 6.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Ryan McCabe
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 743047
TreeView+ depends on / blocked
 
Reported: 2011-08-24 17:17 UTC by Radek Steiger
Modified: 2011-12-06 09:45 UTC (History)
2 users (show)

Fixed In Version: luci-0.23.0-26.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 09:45:46 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1510 normal SHIPPED_LIVE luci bug fix update 2011-12-06 00:39:20 UTC

Description Radek Steiger 2011-08-24 17:17:52 UTC
Description of problem:

Luci doesn't save configuration correctly for Virtual Machine service once a user decides to clear options that were previously configured.

When trying to save an empty value for an option that used to be non-empty before, instead of removing such option from cluster.conf it is saved with the previous non-empty value. That makes it impossible for a user to change the configuration without touching cluster.conf by hand. This bug affects all of the service-specific options (except "Migration Type").

These options are affected:
 - Migration Mapping
 - Status Program
 - Path to xmlfile Used to Create the VM
 - VM Configuration File Path
 - Path to the VM Snapshot Directory
 - Hypervisor URI
 - Migration URI
 - Independent Subtree / Non-Critical Resource


Version-Release number of selected component (if applicable):

luci-0.23.0-20.el6


How reproducible:

Always


Steps to Reproduce:
1. Create a simple cluster using luci web GUI
2. Create a new Service group of any name for this cluster created at step 1, submit changes
3. Add a new Virtual Machine resource to the service group created above, submit changes
4. Check cluster.conf:

[root@z4 cluster]# cat cluster.conf |grep "config_version\|vm"
	<cluster config_version="3" name="zcluster">
	<vm autostart="0" migrate="live" name="virtual" recovery="relocate"/>

5. Open the service configuration again and fill in any or all of the following option fields (values I used here are just an example):
 - Migration Mapping
 - Status Program
 - Path to xmlfile Used to Create the VM
 - VM Configuration File Path
 - Path to the VM Snapshot Directory
 - Hypervisor URI
 - Migration URI
 - Independent Subtree / Non-Critical Resource
6. Submit changes
7. Check cluster.conf again to see as they're correctly saved:

[root@z4 cluster]# cat cluster.conf |grep "config_version\|vm"
	<cluster config_version="4" name="zcluster">
	<vm __independent_subtree="2" autostart="0" hypervisor_uri="qemu:///system" migrate="live" migration_mapping="node1:example1,node2:example2" migration_uri="qemu+ssh://target_host/system" name="virtual" path="/etc/libvirt/qemu" recovery="relocate" snapshot="/mnt/gfs" status_program="/usr/local/bin/status.sh" xmlfile="/etc/libvirt/qemu/guest.xml"/>

8. Open the service configuration for the last time and clear any or all of the fields filled in step 5. Submit changes.
9. Check if the options have been cleared in cluster.conf.
  
Actual results:

Options are not cleared, they're saved with old values instead. No error message is shown:

[root@z4 cluster]# cat cluster.conf |grep "config_version\|vm"
	<cluster config_version="5" name="zcluster">
	<vm __independent_subtree="2" autostart="0" hypervisor_uri="qemu:///system" migrate="live" migration_mapping="node1:example1,node2:example2" migration_uri="qemu+ssh://target_host/system" name="virtual" path="/etc/libvirt/qemu" recovery="relocate" snapshot="/mnt/gfs" status_program="/usr/local/bin/status.sh" xmlfile="/etc/libvirt/qemu/guest.xml"/>


Expected results:

Options are cleared:

[root@z4 cluster]# cat cluster.conf |grep "config_version\|vm"
	<cluster config_version="5" name="zcluster">
	<vm autostart="0" migrate="live" name="virtual" recovery="relocate"/>


Additional info:

Tested in Firefox 6, Google Chrome 15.0.854 and Epiphany 3.0.3

Comment 5 errata-xmlrpc 2011-12-06 09:45:46 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-2011-1510.html


Note You need to log in before you can comment on or make changes to this bug.