Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 733084

Summary: Cleared options are not saved correctly in Virtual Machine services
Product: Red Hat Enterprise Linux 6 Reporter: Radek Steiger <rsteiger>
Component: luciAssignee: Ryan McCabe <rmccabe>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: cluster-maint, rsteiger
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: luci-0.23.0-26.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 09:45:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 743047    

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