Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 899485 (JBPAPP6-73)

Summary: Dynamic-load-provider returns Load:1 regardless of load-metric set
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Michal Karm Babacek <mbabacek>
Component: mod_clusterAssignee: Michal Karm Babacek <mbabacek>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: atangrin, mbabacek, paul.ferraro
Target Milestone: ---   
Target Release: EAP 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBPAPP6-73
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
RHEL6 x86_64, Sun Jdk (build 1.6.0_24-b07)
Last Closed: 2012-11-05 00:44:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
load.png none

Description Michal Karm Babacek 2011-08-24 16:03:22 UTC
Steps to Reproduce: Use [jboss-eap-6.0.0.alpha1.zip|http://download.devel.redhat.com/devel/candidates/JBEAP/JBEAP-6.0.0-DR1/jboss-eap-6.0.0.alpha1.zip], *JBoss EAP 6.0.0.Alpha1 (AS 7.0.0.Final)*
project_key: JBPAPP6

None of the following settings, despite their compliance with the [documentation|http://docs.jboss.org/mod_cluster/1.1.0/html_single/], are able to change the *Load: 1* value.
{code:xml}
...
        <subsystem xmlns="urn:jboss:domain:modcluster:1.0">
            <mod-cluster-config advertise-socket="modcluster">
                <dynamic-load-provider history="10" decay="9">
                    <load-metric type="requests" weight="10" capacity="500"/>
                </dynamic-load-provider>
            </mod-cluster-config>
        </subsystem>
...
        <subsystem xmlns="urn:jboss:domain:modcluster:1.0">
            <mod-cluster-config advertise-socket="modcluster">
                <dynamic-load-provider history="10" decay="9">
                    <load-metric type="cpu" weight="10"/>
                </dynamic-load-provider>
            </mod-cluster-config>
        </subsystem>
...
        <subsystem xmlns="urn:jboss:domain:modcluster:1.0">
            <mod-cluster-config advertise-socket="modcluster">
                <dynamic-load-provider history="10" decay="9">
                    <load-metric type="requests" capacity="1000"/>
                </dynamic-load-provider>
            </mod-cluster-config>
        </subsystem>
...
      <subsystem xmlns="urn:jboss:domain:modcluster:1.0">
            <mod-cluster-config advertise-socket="modcluster">
                <dynamic-load-provider history="10" decay="2">
                    <load-metric type="cpu" weight="1" capacity="1"/>
                </dynamic-load-provider>
            </mod-cluster-config>
        </subsystem>
...
{code}

Comment 1 Michal Karm Babacek 2011-08-25 14:59:36 UTC
Link: Added: This issue is a dependency of JBQA-4970


Comment 2 Paul Ferraro 2011-08-25 15:01:57 UTC
While I'm looking into this, just a side comment: defining a weight is meaningless if you only use 1 load metric.  The weight of a metric represents the significance that metric's load relative to other metrics defined in the load provider.

Comment 3 Michal Karm Babacek 2011-08-25 15:24:28 UTC
@[~pferraro] I know that thanks to our earlier conversation recorded in [DOC-73684|https://docspace.corp.redhat.com/docs/DOC-73684] ;-). I've been just playing with all the available attributes...trying to get something from it.

Comment 4 Paul Ferraro 2011-08-25 15:30:18 UTC
OK - I've found a few problems...
The capacity is getting defaulted to 512 for *every* type of load metric.  That is very wrong.  The context of the capacity value is metric-specific.  Also, the weight is getting defaulted to 9, a less critical issue, but still not correct (it should default to 1).  I'll file an AS7 jira.
The major problem, though, is that the mod_cluster server-side component is never informed of the mbean server.  Every existing load metric requires access to the mbean server to calculate their load.  No wonder none of them work.
I'll file a separate AS7 jira for this.

Comment 5 Michal Karm Babacek 2011-08-25 15:37:22 UTC
I've just wanted to say it doesn't work even with [jboss-as-7.1.0.Alpha1-SNAPSHOT|https://github.com/jfclere/jboss-as/] from [~jfclere]'s GitHub; however now it's clear it does not work anywhere :-)
Thank's Paul for looking into it. 

Comment 6 Paul Ferraro 2011-08-25 16:21:40 UTC
Actually, I'm afraid I was barking up the wrong tree.  The load metrics *should* still work, since they would attempt to use the platform mbean server.  However, the real problem lies in the AS7 ModClusterService, which is reading the model wrong.
*sigh* I'll close the irrelevant jiras and reopen a new one.

Comment 7 Paul Ferraro 2011-08-25 23:41:03 UTC
Link: Added: This issue depends AS7-1648


Comment 8 Paul Ferraro 2011-08-25 23:58:12 UTC
FYI - here's the pull request that fixes this issue.
https://github.com/jbossas/jboss-as/pull/223

Comment 9 Michal Karm Babacek 2011-08-26 09:24:12 UTC
Attachment: Added: load.png


Comment 10 Michal Karm Babacek 2011-08-26 09:25:43 UTC
[Commented on GitHub|https://github.com/jbossas/jboss-as/pull/223#issuecomment-1911098], looks OK so far. We've got even a nice picture with
{code:xml}
<mod-cluster-config advertise-socket="modcluster">
   <dynamic-load-provider history="10" decay="2">
      <load-metric type="cpu" capacity="1"/>
   </dynamic-load-provider>
</mod-cluster-config>
{code}
!load.png|thumbnail!
...values are weird a bit though; however that is yet to be tested during the proper test cycle...

Comment 11 Rajesh Rajasekaran 2011-09-16 19:01:19 UTC
Scheduling this for DR4, as the upstream issue is fixed for AS 7.1.0.Alpha1

Comment 12 Rajesh Rajasekaran 2011-09-16 19:15:54 UTC
Resolving this issue as it is fixed upstream in AS 7.1.0.Alpha1 and will be available in DR4 build.

Comment 13 Radoslav Husar 2011-09-19 16:23:55 UTC
Please verify in DR4.

Comment 14 Michal Karm Babacek 2011-12-02 13:07:43 UTC
It was verified quite some time ago, I just forgot to close it: *closing*

Comment 15 Anne-Louise Tangring 2012-11-04 14:32:49 UTC
Docs QE Status: Removed: NEW 


Comment 16 Anne-Louise Tangring 2012-11-05 00:44:29 UTC
Fixing Affects and Fix in Version