Bug 536117 - (RHQ-501) uninventory doesn't completely flush information from agent
uninventory doesn't completely flush information from agent
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Inventory (Show other bugs)
1.0
All All
medium Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Sunil Kondkar
http://jira.rhq-project.org/browse/RH...
: SubBug
Depends On:
Blocks: rhq_triage
  Show dependency treegraph
 
Reported: 2008-05-17 22:43 EDT by Joseph Marques
Modified: 2014-05-12 16:07 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-05-12 16:07:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Joseph Marques 2008-05-17 22:43:00 EDT
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 04:25:09 EDT
See also JBNADM-3302
Comment 2 fmatar 2008-06-25 09:24:40 EDT
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 09:51:58 EDT
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 06:09:25 EDT
* 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 16:10:37 EST
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 11:54:38 EST
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 12:00:05 EST
making sure we're not missing any bugs in rhq_triage
Comment 8 Corey Welton 2010-10-06 23:20:14 EDT
sunil - please take a look at this.  note the repro steps in the first comment.
Comment 9 Sunil Kondkar 2010-10-21 06:13:47 EDT
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.