Bug 809626

Summary: [as7] a bunch of metrics on domain-mode 'Transactions Subsystem' Resources return null values
Product: [Other] RHQ Project Reporter: Ian Springer <ian.springer>
Component: PluginsAssignee: Libor Zoubek <lzoubek>
Status: CLOSED UPSTREAM QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: high    
Version: 4.3CC: ccrouch, hrupp, snegrea, theute
Target Milestone: ---   
Target Release: JON 3.1.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-05 12:29:02 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 811525    
Bug Blocks: 707223    

Description Ian Springer 2012-04-03 16:25:35 EDT
Here's the metrics that return null values:

[number-of-nested-transactions, number-of-timed-out-transactions, number-of-committed-transactions, number-of-transactions, number-of-heuristics, number-of-aborted-transactions, number-of-inflight-transactions, number-of-application-rollbacks, number-of-resource-rollbacks]
Comment 1 Ian Springer 2012-04-03 16:25:52 EDT
From Heiko:

Those are present in standalone mode :

[standalone@localhost:9999 subsystem=transactions] :read-resource(include-runtime=true)
    "outcome" => "success",
    "result" => {
        "default-timeout" => 300,
        "enable-statistics" => false,
        "enable-tsm-status" => false,
        "jts" => false,
        "node-identifier" => "1",
        "number-of-aborted-transactions" => 0L,
        "number-of-application-rollbacks" => 0L,
        "number-of-committed-transactions" => 0L,
        "number-of-heuristics" => 0L,
        "number-of-inflight-transactions" => 0L,
        "number-of-nested-transactions" => 0L,
        "number-of-resource-rollbacks" => 0L,
        "number-of-timed-out-transactions" => 0L,
        "number-of-transactions" => 0L,
        "object-store-path" => "tx-object-store",
        "object-store-relative-to" => "jboss.server.data.dir",
        "path" => "var",

I think they may be failing in domain mode because you do not get the stats on the 
HC level (AS7 can't do that), but those have to be grabbed at managed server

[domain@localhost:9999 subsystem=transactions] :read-resource(include-runtime=true)                    
    "outcome" => "success",
    "result" => {
        "default-timeout" => 300,
        "enable-statistics" => false,
        "enable-tsm-status" => false,
        "jts" => false,
        "node-identifier" => "1",
        "number-of-aborted-transactions" => 0L,
        "number-of-application-rollbacks" => 0L,
        "status-socket-binding" => "txn-status-manager"
[domain@localhost:9999 subsystem=transactions] pwd
Comment 2 Stefan Negrea 2012-04-09 17:31:22 EDT
This is a complicated one. The managed and standalone servers have the properties and the metrics. Whereas the domain server has only the properties but not the metrics. 

One solution would be to define two Transactions subsystem. One for the domain mode (and leave the metrics out) and the other for the managed and standalone mode and have the metrics. The only problem with this approach is configuration duplication since the properties exposed are identical.
Comment 3 Stefan Negrea 2012-04-10 11:06:27 EDT
Split transactions subsystem configuration into three services based on server profile. This was the only options since conditionals are not allowed in the plugin descriptor.