Bug 565852

Summary: Ugly error message when trying to "Ignore" a platform
Product: [Other] RHQ Project Reporter: Jeff Weiss <jweiss>
Component: Core UIAssignee: Jay Shaughnessy <jshaughn>
Status: CLOSED CURRENTRELEASE QA Contact: Jeff Weiss <jweiss>
Severity: low Docs Contact:
Priority: high    
Version: 1.3CC: cwelton, dajohnso, jshaughn, skondkar
Target Milestone: ---Keywords: SubBug
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-02 03:25:07 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 585306    

Description Jeff Weiss 2010-02-16 09:40:31 EST
Description of problem:
Error message when try to ignore a platform is too ugly, should either disable the Ignore button when a platform is selected, or replace the error message with something cleaner.

Version-Release number of selected component (if applicable):
RHQ1.3GA, RHQ3.0builds

How reproducible:
Always

Steps to Reproduce:
1. Discover a platform (or uninventory one that's already in inventory)
2. Go to Auto Discovery page
3. Expand Platform
4. Check Platform checkbox
5. Click "Ignore"

  
Actual results:
Error message: "Ignore failed. Cause: javax.ejb.EJBTransactionRolledbackException:Cannot commit resource [Resource[id=17611, type=RHQ Agent, key=jweiss-rhel1.usersys.redhat.com RHQ Agent, name=jweiss-rhel1.usersys.redhat.com RHQ Agent, parent=jweiss-rhel1.usersys.redhat.com, version=1.3.0.GA]] to inventory, because its parent resource [Resource[id=17610, type=Linux, key=jweiss-rhel1.usersys.redhat.com, name=jweiss-rhel1.usersys.redhat.com, parent=<null>, version=Linux 2.6.18-128.7.1.el5]] has not yet been committed. -> java.lang.IllegalStateException:Cannot commit resource [Resource[id=17611, type=RHQ Agent, key=jweiss-rhel1.usersys.redhat.com RHQ Agent, name=jweiss-rhel1.usersys.redhat.com RHQ Agent, parent=jweiss-rhel1.usersys.redhat.com, version=1.3.0.GA]] to inventory, because its parent resource [Resource[id=17610, type=Linux, key=jweiss-rhel1.usersys.redhat.com, name=jweiss-rhel1.usersys.redhat.com, parent=<null>, version=Linux 2.6.18-128.7.1.el5]] has not yet been committed."

Expected results:
"Platforms cannot be ignored." OR Disable the Ignore button OR allow platforms to be ignored.

Additional info:
Comment 1 wes hayutin 2010-02-16 11:57:50 EST
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs.

keyword:
new = Tracking + FutureFeature + SubBug
Comment 2 wes hayutin 2010-02-16 12:02:43 EST
making sure we're not missing any bugs in rhq_triage
Comment 6 Jay Shaughnessy 2011-02-17 00:24:36 EST
The use case for ignoring a platform is a little fuzzy, why run the agent
in the first place.  But regardless, the root problem is that you get a
bad error trying to ignore a server resource beneath an uncommitted parent
platform.  In general the button enablement for AD was lacking so the fix
is to prevent invalid button enablement.

Also, allow a user to just select/import a platform without automatically
selecting the children.

When testing please check situation where multiple platforms are in the AD view and try various select/deselect scenarios including ignoring and unignoring resources.
Comment 7 Sunil Kondkar 2011-06-09 04:37:44 EDT
Verified on build123 (Version: 4.1.0-SNAPSHOT Build Number: a6d2d56)

Discovered multiple platforms in the discovery queue. Expanded the platforms. Clicking the checkbox for platform displays a message asking 'Aslo select the platform children?'.
Clicking Yes selects all the children under the platform and clicking 'No' only selects the platform.
The buttons Ignore/Unignore are disabled when resources are selected for the uncommitted platforms. Only the Import button is enabled.
Marking as verified.
Comment 8 Heiko W. Rupp 2013-09-02 03:25:07 EDT
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.