Bug 535272 (RHQ-1986) - group of similar resources isn't being rendered correctly
Summary: group of similar resources isn't being rendered correctly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: RHQ-1986
Product: RHQ Project
Classification: Other
Component: Core UI
Version: unspecified
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: John Mazzitelli
QA Contact:
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On:
Blocks: rhq_triage rhq4 662118
TreeView+ depends on / blocked
 
Reported: 2009-04-17 05:53 UTC by John Mazzitelli
Modified: 2013-09-02 07:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-02 07:22:17 UTC
Embargoed:


Attachments (Terms of Use)
screenshot-1.jpg (96.62 KB, image/jpeg)
2009-04-17 05:53 UTC, John Mazzitelli
no flags Details

Description John Mazzitelli 2009-04-17 05:53:00 UTC
look at the attached snapshot.

I have 1 linux platform, 2 windows. Each agent is managing a JBossAS server. I therefore have 1 run.sh and 2 run.bat scripts:

id      resource_type_id name      resource_key
500606  501077           run.bat   C:\mazz\source\rhq\trunk\dev-container\jbossas\bin\run.bat
500852  501077           run.bat   C:\mazz\source\rhq\trunk\dev-container\jbossas\bin\run.bat
501072  501077           run.sh    /home/mazz/jboss/jboss-eap-4.3/jboss-as/bin/run.sh 

Clicking the auto-group of "run.bat (2/3)" shows a table of 0 resources (the right side is empty).
Clicking the auto-group of the "run.sh (1/3)" shows the correct table of 1 resource.

Comment 1 John Mazzitelli 2009-04-17 05:55:15 UTC
for the record, resource type ID of 501077 is:

id	name	category	creation_data_type	create_delete_policy	singleton	supports_manual_add	description	plugin	ctime	mtime	subcategory_id	plugin_config_def_id	res_config_def_id
501077	Script	SERVICE	CONFIGURATION	NEITHER	false	true	provides the ability to execute a script that performs some task related to its parent JBossAS server	JBossAS	1239944619687	1239944619750	500050	501619	(null)


Comment 2 Red Hat Bugzilla 2009-11-10 20:55:29 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1986
Imported an attachment (id=368720)


Comment 3 wes hayutin 2010-02-16 16:56:18 UTC
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs.

keyword:
new = Tracking + FutureFeature + SubBug

Comment 4 wes hayutin 2010-02-16 17:01:25 UTC
making sure we're not missing any bugs in rhq_triage

Comment 5 John Mazzitelli 2011-02-17 16:47:47 UTC
i need to check to see if this is still happening in gwt

Comment 6 John Mazzitelli 2011-03-11 18:02:00 UTC
the problem is that the resource keys contain backslashes (Windows strikes again!)

The resource keys for the scripts are the full paths such as:

C:\jboss-as\bin\run.bat

But the query we build up doesn't escape the path, which we include hardcoded in the query - here's is an actual example of the query we execute, notice the resource key enclosed in single quotes:

 SELECT r1 FROM Resource r1
  WHERE r1.resourceKey = 'C:\jboss-as\bin\run.bat'
    AND r1.resourceType = 10147
    AND r1.parentResource IN ( SELECT rgir
                                 FROM ResourceGroup rg
                                      JOIN rg.implicitResources rgir
                                WHERE rg = 10121)

When I replace that key string such that its backslashes are escaped (that is "\\" instead of "\"), the query returns the proper results.

Unsure if Oracle requires the escape characters, but we should probably change these queries to use :param parameters so we don't have to worry about escaping characters.

Comment 7 John Mazzitelli 2011-03-11 18:37:25 UTC
commit 45e8f87a3ec5d9ab5e66d21d082c6b7ff88d4ea4

we now use :param notation to pass in the resource key parameters, rather than hardcoding them. this works around any need we would have had to escape characters in the hardcoded resource keys

Comment 8 Mike Foley 2011-05-26 12:53:47 UTC
tested RHQ Master ...using Oracle repository.  Confirmed by using SQL to verify that RHQ_RESOURCE table contains data with slashes "/" ... and using DEBUG level logging that no errors in SQL execution.  I have been performing numerous qualifications since the bug fix 3/11 and this is fine.

Comment 9 Heiko W. Rupp 2013-09-02 07:22:17 UTC
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.


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