Bug 876481 - [RHQ - CLI] When executing measurement_utils.js, collection interval will not be changed when using interval method
Summary: [RHQ - CLI] When executing measurement_utils.js, collection interval will not...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHQ 4.7
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
: 883894 (view as bug list)
Depends On:
Blocks: 876479
TreeView+ depends on / blocked
 
Reported: 2012-11-14 09:26 UTC by bkramer
Modified: 2013-09-04 07:22 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 876479
: 876479 (view as bug list)
Environment:
Last Closed: 2013-09-04 07:22:44 UTC
Embargoed:


Attachments (Terms of Use)

Description bkramer 2012-11-14 09:26:41 UTC
Description of problem:
When executing measurement_utils.js, collection interval will not be changed when using interval method.

Version-Release number of selected component (if applicable):
JON 3.1.0 
JON 3.1.1

How reproducible:
always

Steps to Reproduce:
1. log in to the JON CLI;
2. from the JON CLI command line execute the following:

------------------------------------------------------

exec -f /home/JON_311/util.js
exec -f /home/JON_311/measurement_utils.js

mm = new MeasurementModule();

interval = mm.interval;
time = mm.time;
updates = { context: 'Resource', id: 24171, schedules: {'Free Memory': interval(30, time.minutes)}};
mm.updateSchedules(updates);
  
----------------------------------------------------
3. Navigate to JON UI -> resource 24171 -> Monitoring -> Schedules;
  
Actual results:
Collection interval for the metric 'Free Memory' has not been changed.

Expected results:
Collection interval for the metric 'Free Memory' is changed to 30 minutes.

Additional info:
Above works fine if interval method is not used and if the collection interval is set directly using milliseconds, for instance:

exec -f /home/JON_311/util.js
exec -f /home/JON_311/measurement_utils.js

mm = new MeasurementModule();

updates = { context: 'Resource', id: 24171, schedules: {'Free Memory': 1800000}};
mm.updateSchedules(updates);

Comment 1 Mike Foley 2012-11-14 16:34:56 UTC
JON QE to add test automation for this:

https://engineering.redhat.com/trac/jon/ticket/433

Comment 2 Lukas Krejci 2012-12-05 14:29:23 UTC
*** Bug 883894 has been marked as a duplicate of this bug. ***

Comment 3 Lukas Krejci 2012-12-05 14:34:14 UTC
(note that I put in the wrong BZ number in the comment corresponding to the BZ tracking this issue in JON)

master http://git.fedorahosted.org/cgit/rhq/rhq.git/diff/?id=019fbf2c8a5930c54b3bbe32bbb7fdc07b01835d
Author: Lukas Krejci <lkrejci>
Date:   Wed Dec 5 15:24:34 2012 +0100

    [BZ 876479] - Hardcode the values of symbolic time constants in the measurement_utils.js rather than referencing the previous ones during the declaration. That just didn't work, giving all such props a value of NaN.

Comment 4 Filip Brychta 2013-05-09 06:43:25 UTC
Verified by automation (task https://engineering.redhat.com/trac/jon/ticket/433) on version 4.7.0-SNAPSHOT (1dba477)

Comment 5 Heiko W. Rupp 2013-09-04 07:22:44 UTC
Done in a old release, closing now.


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