Bug 737159 - jboss-cache plugin: several required resource config props are not being set by the plugin
Summary: jboss-cache plugin: several required resource config props are not being set ...
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 4.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On: jon30-bugs
Blocks: jon3 jon30-sprint8
TreeView+ depends on / blocked
 
Reported: 2011-09-09 19:05 UTC by Ian Springer
Modified: 2024-03-04 13:34 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)
patch that fixes this issue, as well as several other bugs in the jboss-cache resource-config load/update code (18.76 KB, patch)
2011-10-25 14:50 UTC, Ian Springer
no flags Details | Diff

Description Ian Springer 2011-09-09 19:05:34 UTC
I noticed the following warnings in my Agent log:

2011-09-09 15:00:11,403 WARN  [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.ConfigurationCheckExecutor)- Plugin Error: Invalid JBossCache resource configuration returned by JBossCache plugin - Required property 'NodeLockingScheme' has a null value in Configuration[id=0].
2011-09-09 15:00:11,403 WARN  [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.ConfigurationCheckExecutor)- Plugin Error: Invalid JBossCache resource configuration returned by JBossCache plugin - Required property 'UseReplQueue' has a null value in Configuration[id=0].
2011-09-09 15:00:11,403 WARN  [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.ConfigurationCheckExecutor)- Plugin Error: Invalid JBossCache resource configuration returned by JBossCache plugin - Required property 'ReplQueueInterval' has a null value in Configuration[id=0].
2011-09-09 15:00:11,403 WARN  [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.ConfigurationCheckExecutor)- Plugin Error: Invalid JBossCache resource configuration returned by JBossCache plugin - Required property 'ReplQueueMaxElements' has a null value in Configuration[id=0].
2011-09-09 15:00:11,403 WARN  [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.ConfigurationCheckExecutor)- Plugin Error: Invalid JBossCache resource configuration returned by JBossCache plugin - Required property 'FetchStateOnStartup' has a null value in Configuration[id=0].

These props should either be populated by the plugin or they should be changed to required="false". I suspect there is some bug in the plugin's resource config loading code that's preventing them from getting populated.

Comment 1 Ian Springer 2011-10-25 14:50:49 UTC
Created attachment 530111 [details]
patch that fixes this issue, as well as several other bugs in the jboss-cache resource-config load/update code

Comment 2 Ian Springer 2011-10-25 16:16:46 UTC
[master 5ee3245] (http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=5ee3245) fixes this as well as two other major issues in the jboss-cache resource config update:

1) 'attribute' elements that did not correspond to a resource config prop were excised from the file, badly corrupting it

2) for resource config props with null values, the 'attribute' elements were written out as:

<attribute name="foo" />

(i.e. not containing any text content), which is incorrect; instead they should not be written out at all.

and several minor issues: 

3) there were several other config props that should have been optional

4) duplicate "<depends>jboss:service=TransactionManager</depends>" lines added on every update

5) in config load, props were added to the config for every 'attribute' element found in the xml file, even ones that did not have corresponding prop defs in the config def; this resulted in superfluous props being persisted to the DB, which would not even be displayed in the GUI's config editor; it also indirectly resulted in major issue 1) above

QE: Note, these fixes can be tested using any JBoss AS 4.2.x instance running the 'all' config. As part of testing, after making various config updates, restart the AS instance and make sure there are no jboss-cache related errors during startup.

Comment 3 Mike Foley 2011-11-08 20:30:31 UTC
reducing priority for qe verification as this is not in jon 3 branch

Comment 4 Lukas Krejci 2011-11-24 21:28:47 UTC
QA failed.

By the looks of it there are more attributes that we should mark as optional. I found these (but don't claim the list to be exhaustive):

* TransactionManagerLookupClass (http://docs.jboss.org/jbossas/jboss4guide/r4/html/jbosscache.chapt.html#jbosscache-cache)

* InitialStateRetrievalTimeout - didn't find documentation suggesting it's optional but a config w/o this parameter doesn't cause any errors in the logs.

Comment 5 Jay Shaughnessy 2013-02-26 22:14:58 UTC
Lukas, assigning this ips legacy bz to you given the above comments.


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