Bug 536117 (RHQ-501) - uninventory doesn't completely flush information from agent
Summary: uninventory doesn't completely flush information from agent
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: RHQ-501
Product: RHQ Project
Classification: Other
Component: Inventory
Version: 1.0
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Sunil Kondkar
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On:
Blocks: rhq_triage
TreeView+ depends on / blocked
 
Reported: 2008-05-18 02:43 UTC by Joseph Marques
Modified: 2014-05-12 20:07 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-12 20:07:44 UTC
Embargoed:


Attachments (Terms of Use)

Description Joseph Marques 2008-05-18 02:43:00 UTC
steps to reproduce:

* inventory some jbas instance with a secured invoker
* edit the plugin configuration of the corresponding discovered / import resource to match the invoker credentials
* navigate to the resource browser and uninventory the resource
* either wait (an amount of time equal to the runtime discovery period), or execute "discovery -f" on the corresponding agent
* you'll notice that the jbas instance comes back into inventory, is green, has all of its children committed which are also green, BUT - and here's the odd part - the principal / credentials are UNset (the correct defaults)

Comment 1 Heiko W. Rupp 2008-06-04 08:25:09 UTC
See also JBNADM-3302

Comment 2 fmatar 2008-06-25 13:24:40 UTC
The behaviour of the AS instance is very inconsistent. 

Upon multiple repetitions of Inventoring / Uninventoring of a JBAS instance the instance comes in red after it was earlier in green without having the connection properties set. 

The tracing of the debugging indicates that the credentials / principal properties are being passed correctly on the agent side and on the JBoss AS side. 

Could the caching be taking place on the server side?

Comment 3 fmatar 2008-06-25 13:51:58 UTC
Upon editing the connection properties of a previously uninventoried resource, the principal and credentials are only validated when they're entered into the form. i.e. If those properties are set to be wrong then the system validates them, however if they're set to be null or not set to be updated (checkboxes are not set) then the connection is properly validated

Comment 4 fmatar 2008-07-07 10:09:25 UTC
* The discovery of JBoss AS instances is working fine, the connection properties are not cached on the discovery layer.
* The agent is communicating the discovered resource to the server properly, the connection properties are not cached on that layer as well.
* The import mechanism is working fine, there are no traces of the connection properties there.

However upon import the resource is still marked as available.

What I'm suspicious about is this:

The JBossASComponent contains the following: (line 265-271)

            ConnectionProvider connectionProvider = connectionFactory.getConnectionProvider(connectionSettings);
            this.connection = connectionProvider.connect();

            // TODO: Throw an InvalidPluginConfigurationException if we are able to connect but not authenticate.
            //       Some changes to the EMS connect() method may be required to do this. (ips, 07/17/07)

            this.connection.loadSynchronous(false);

As suggested by Ian I'll try to surround this with a try / catch block and null the connection if an exception is thrown. Otherwise the problem needs to be resolved on the EMS side.

Comment 5 Red Hat Bugzilla 2009-11-10 21:10:37 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-501
This bug is related to RHQ-945


Comment 6 wes hayutin 2010-02-16 16:54:38 UTC
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs.

keyword:
new = Tracking + FutureFeature + SubBug

Comment 7 wes hayutin 2010-02-16 17:00:05 UTC
making sure we're not missing any bugs in rhq_triage

Comment 8 Corey Welton 2010-10-07 03:20:14 UTC
sunil - please take a look at this.  note the repro steps in the first comment.

Comment 9 Sunil Kondkar 2010-10-21 10:13:47 UTC
Tested in RHQ build#438

Inventoried a eap5.1 jbas instance with a secured invoker
(Uncommented admin=admin in "eap5.1/jboss-5.1.0.Branch/server/default/conf/props/jmx-console-users.properties" file)

Navigated to 'Inventory->Connection Properties' tab of the resource. Entered and saved values 'admin' in 'Principal' and 'Credentials' text fields.

Navigated to the resource browser and uninventoried the resource

Executed "discovery -f" on the corresponding agent.

Imported the jbas instance to inventory.

Observed that the resource is green, has all of its children committed which are also green, 

However the the principal / credentials are unset. The fields did not show the values (admin/admin)


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