Bug 1020064 - parentName alert operation tokens resolving to parentId value instead of parentName
Summary: parentName alert operation tokens resolving to parentId value instead of pare...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Monitoring - Alerts
Version: JON 3.1.2
Hardware: All
OS: All
unspecified
high
Target Milestone: DR01
: JON 3.2.1
Assignee: Jay Shaughnessy
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: jon321-blockers 1058945
TreeView+ depends on / blocked
 
Reported: 2013-10-16 23:31 UTC by Marc Shirley
Modified: 2018-12-04 16:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1058945 (view as bug list)
Environment:
Last Closed: 2014-05-08 17:43:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 514743 0 None None None Never

Description Marc Shirley 2013-10-16 23:31:41 UTC
Description of problem:
Alert operation tokens resource.parentName and target.parentName resolve to the parent resource id value instead of the name.

Version-Release number of selected component (if applicable):
JBoss ON 3.1.2

How reproducible:
very

Steps to Reproduce:
1. Import script (below) as a script server resource
2. Set up an alert with an alert notification type of Resource Operation
3. Configure notification to point to the imported script server resource from step 1
4. Configure the arguments of the Execute operation:
      <%resource.parentName%> <%resource.parentId%> <%targetResource.parentName%> <%targetResource.parentId%>
5. Trigger the alert
6. Verify the output of the script


testScript.sh contents:
#!/bin/sh

echo $# number of arguments > output.txt
echo $* >> output.txt
echo $@ >> output.txt


Actual results:
output contains 4 occurrences of the parent resource ids instead of the parent resource names and ids.

Expected results:
The output should contain both the parent resource names and id values.

Comment 1 Jay Shaughnessy 2014-01-06 20:35:56 UTC
I'll see if I can figure this one out...

Comment 2 Jay Shaughnessy 2014-01-06 22:44:41 UTC
master commit 962eda4d551d8185bd75291b37e694891eb04435
Author: Jay Shaughnessy <jshaughn>
Date:   Mon Jan 6 17:32:47 2014 -0500

  Fixed what looks like cut+paste issue.



release/jon3.2.x commit 389de01b266269d8e81b1a5979ecf3bfb349aadc
Author: Jay Shaughnessy <jshaughn>
Date:   Mon Jan 6 17:32:47 2014 -0500

  Cherry Pick of Master 962eda4d551d8185bd75291b37e694891eb04435



release/jon3.1.x commit a8d9a2ac71b57f70236a23cba7b7b0da64e14ec1
Author: Jay Shaughnessy <jshaughn>
Date:   Mon Jan 6 17:32:47 2014 -0500

  Cherry Pick of Master 962eda4d551d8185bd75291b37e694891eb04435

Comment 5 Simeon Pinder 2014-02-18 15:08:18 UTC
Moving to ON_QA as available for testing in the following brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=336752

Note: the installed version is still JON 3.2.0.GA by design and this represents part of the payload for JON 3.2.1 also known as cumulative patch 1 for 3.2.0.GA.  How this will be delivered to customers is still being discussed.

Comment 6 Jan Bednarik 2014-02-20 16:13:23 UTC
Verified on JON 3.2.1 DR1 (Build Number: c758688:4c03150)

tested using server's CPU0 as an alerting resource. The contents of the output.txt file are correct:

jbe-jon321-server.bc.jonqe.lab.eng.bos.redhat.com 10001 jbe-jon321-server.bc.jonqe.lab.eng.bos.redhat.com 10001
jbe-jon321-server.bc.jonqe.lab.eng.bos.redhat.com 10001 jbe-jon321-server.bc.jonqe.lab.eng.bos.redhat.com 10001

Comment 7 Mike Foley 2014-05-08 17:43:49 UTC
JON 3.2.1 released week of 5/5/2014


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