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 796731 - Error 500 from luci when try to edit a Service
Summary: Error 500 from luci when try to edit a Service
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: luci
Version: 6.2
Hardware: x86_64
OS: Linux
urgent
high
Target Milestone: rc
: ---
Assignee: Ryan McCabe
QA Contact: Cluster QE
URL:
Whiteboard:
: 834123 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-23 15:12 UTC by hendry tjen
Modified: 2018-11-28 20:16 UTC (History)
3 users (show)

Fixed In Version: luci-0.26.0-4.el6
Doc Type: Bug Fix
Doc Text:
Cause: Luci failed to enforce name uniqueness constraints when creating and editing service groups. In the cluster configuration, there can be global resources (declared outside of any cluster service groups) and inline resources (declared inside a service group). The names of resources must be unique regardless of whether the resource is a global resource or an inline resource. Luci allowed global resources to be created even when the global resource's name was already in use by a resource that had been declared inline inside a service group. It also allowed a resource within a service groups to be created with a name that was already in use by a global resources. Consequence: In some cases, luci failed ungracefully, reporting "error 500." In other cases, the cluster configuration was improperly modified. Fix: Resource name uniqueness is now properly enforced. Result: If luci fails, it fails gracefully and reports any problems to the user. It no longer improperly modifies the cluster configuration.
Clone Of:
Environment:
Last Closed: 2012-06-20 12:18:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0766 0 normal SHIPPED_LIVE luci bug fix and enhancement update 2012-06-19 19:30:16 UTC

Description hendry tjen 2012-02-23 15:12:26 UTC
Description of problem:
Luci Failed to edit a service


How reproducible:


Steps to Reproduce:
1. create a cluster.conf as defined below: (pay attention to the fs named mysql)

[root@CDM1 /]# cat /etc/cluster/cluster.conf 
<?xml version="1.0"?>
<cluster alias="Axis_DRM" config_version="60" name="Axis_DRM">
        <clusternodes>
                <clusternode name="CDM1" nodeid="1"/>
                <clusternode name="CDM2" nodeid="2"/>
        </clusternodes>
        <cman expected_votes="1" two_node="1"/>
        <rm log_level="7">
                <failoverdomains>
                        <failoverdomain name="Domain1" nofailback="1" ordered="1" restricted="1">
                                <failoverdomainnode name="CDM1" priority="1"/>
                                <failoverdomainnode name="CDM2" priority="2"/>
                        </failoverdomain>
                        <failoverdomain name="Domain2" nofailback="1" ordered="1" restricted="1">
                                <failoverdomainnode name="CDM1" priority="2"/>
                                <failoverdomainnode name="CDM2" priority="1"/>
                        </failoverdomain>
                </failoverdomains>
                <resources>
                        <nfsserver name="nfs_server" nfspath=".clumanager/nfs"/>
                        <fs device="UUID=932bb06e-546b-4273-9538-e96a28b79299" force_fsck="on" fsid="7989" fstype="ext3" mountpoint="/nfs_data" name="nfs_data"/>
                        <fs device="UUID=faf58148-6140-42da-b7b7-e1360f0d2796" force_fsck="on" fsid="6022" fstype="ext3" mountpoint="/mysql_data" name="mysql"/>
                        <ip address="10.9.11.174/24" sleeptime="10"/>
                        <ip address="10.9.11.173/24" sleeptime="10"/>
                </resources>
                <service domain="Domain1" name="nfs" recovery="relocate">
                        <fs ref="nfs_data">
                                <nfsserver ref="nfs_server">
                                        <ip ref="10.9.11.173/24"/>
                                </nfsserver>
                        </fs>
                </service>
                <service domain="Domain2" name="mysql" recovery="relocate">
                        <fs ref="mysql">
                                <ip ref="10.9.11.174/24"/>
                        </fs>
                </service>
        </rm>
        <logging>
                <logging_daemon debug="on" logfile="/var/log/" name="rgmanager"/>
        </logging>
</cluster>

2. after everything is clear, create another "resource" using luci under the same name as FS named mysql
Below is the result after completed the resource-create procedure via luci: (notice that the fs named 'mysql' is now missing from the lines, but resource-mysql is successfully created

[root@CDM1 /]# cat /etc/cluster/cluster.conf 
<?xml version="1.0"?>
<cluster alias="Axis_DRM" config_version="61" name="Axis_DRM">
        <clusternodes>
                <clusternode name="CDM1" nodeid="1"/>
                <clusternode name="CDM2" nodeid="2"/>
        </clusternodes>
        <cman expected_votes="1" two_node="1"/>
        <rm log_level="7">
                <failoverdomains>
                        <failoverdomain name="Domain1" nofailback="1" ordered="1" restricted="1">
                                <failoverdomainnode name="CDM1" priority="1"/>
                                <failoverdomainnode name="CDM2" priority="2"/>
                        </failoverdomain>
                        <failoverdomain name="Domain2" nofailback="1" ordered="1" restricted="1">
                                <failoverdomainnode name="CDM1" priority="2"/>
                                <failoverdomainnode name="CDM2" priority="1"/>
                        </failoverdomain>
                </failoverdomains>
                <resources>
                        <nfsserver name="nfs_server" nfspath=".clumanager/nfs"/>
                        <fs device="UUID=932bb06e-546b-4273-9538-e96a28b79299" force_fsck="on" fsid="7989" fstype="ext3" mountpoint="/nfs_data" name="nfs_data"/>
                        <ip address="10.9.11.174/24" sleeptime="10"/>
                        <ip address="10.9.11.173/24" sleeptime="10"/>
                        <mysql config_file="/etc/my.cnf" name="mysql" shutdown_wait="0" startup_wait="0"/>
                </resources>
                <service domain="Domain1" name="nfs" recovery="relocate">
                        <fs ref="nfs_data">
                                <nfsserver ref="nfs_server">
                                        <ip ref="10.9.11.173/24"/>
                                </nfsserver>
                        </fs>
                </service>
                <service domain="Domain2" name="mysql" recovery="relocate">
                        <fs ref="mysql">
                                <ip ref="10.9.11.174/24"/>
                        </fs>
                </service>
        </rm>
        <logging>
                <logging_daemon debug="on" logfile="/var/log/" name="rgmanager"/>
        </logging>
</cluster>



  
Actual results:
Now, go to luci web-interface, and try to edit resource-group-mysql, you should find luci to respond 500-We're sorry but we weren't able to process this request



Additional info:
a workaround is to put different names under fs and resource.

Comment 2 Ryan McCabe 2012-02-23 17:49:19 UTC
Able to reproduce per the recipe above, but this bug can also cause data corruption on RHEL 6.2. If you create an inline resource inside a service with a name that collides with the name of an existing global resource, the global resource may be deleted from the <resources> stanza of the cluster.conf.

Comment 3 Ryan McCabe 2012-02-23 23:23:40 UTC
Fixed in luci.git commit 1cfd2f1b48889a384756cb983dd0fa0529cf1a2c

Comment 8 Ryan McCabe 2012-04-12 04:12:11 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: Luci failed to enforce name uniqueness constraints when creating and editing service groups. In the cluster configuration, there can be global resources (declared outside of any cluster service groups) and inline resources (declared inside a service group). The names of resources must be unique regardless of whether the resource is a global resource or an inline resource. Luci allowed global resources to be created even when the global resource's name was already in use by a resource that had been declared inline inside a service group. It also allowed a resource within a service groups to be created with a name that was already in use by a global resources.

Consequence: In some cases, luci failed ungracefully, reporting "error 500." In other cases, the cluster configuration was improperly modified.

Change: Resource name uniqueness is now properly enforced.

Result: If luci fails, it fails gracefully and reports any problems to the user. It no longer improperly modifies the cluster configuration.

Comment 9 Ryan McCabe 2012-04-12 04:23:54 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -2,6 +2,6 @@
 
 Consequence: In some cases, luci failed ungracefully, reporting "error 500." In other cases, the cluster configuration was improperly modified.
 
-Change: Resource name uniqueness is now properly enforced.
+Fix: Resource name uniqueness is now properly enforced.
 
 Result: If luci fails, it fails gracefully and reports any problems to the user. It no longer improperly modifies the cluster configuration.

Comment 11 errata-xmlrpc 2012-06-20 12:18:27 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-2012-0766.html

Comment 12 Ryan McCabe 2012-07-27 18:46:40 UTC
*** Bug 834123 has been marked as a duplicate of this bug. ***


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