Bug 796731
| Summary: | Error 500 from luci when try to edit a Service | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | hendry tjen <hendrytjen> |
| Component: | luci | Assignee: | Ryan McCabe <rmccabe> |
| Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> |
| Severity: | high | Docs Contact: | |
| Priority: | urgent | ||
| Version: | 6.2 | CC: | cluster-maint, jdeffenb, rsteiger |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| 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.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-06-20 12:18:27 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: | |||
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. Fixed in luci.git commit 1cfd2f1b48889a384756cb983dd0fa0529cf1a2c
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.
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.
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 *** Bug 834123 has been marked as a duplicate of this bug. *** |
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.