Created attachment 581809 [details] agent.log Description of problem: I am experiencing very slow discovery of new child resources. Once I add a child resource, I can almost immediately detect it via EAP CLI, but sometimes it takes up to 10 minutes 'until it is discovered by agent. This applies to creating new web connector, JMS topic/queue for example. Version-Release number of selected component (if applicable): Version: 4.4.0-SNAPSHOT Build Number: 2484565 EAP6 ER6 How reproducible:mostly on some resources/not sure Steps to Reproduce: 1. Import EAP6 standalone, create web connector for example 2. keep refreshing inventory 'till connector appears Actual results: it takes up to 10 minutes, there are some suspects in agent.log, see attachment Expected results: resource gets discovered immediately Additional info: If you cannot reproduce, try adding/removing resource a few times.
Without the additional info I can't reproduce. I think this is some plugin-container related, that should also show up on as4/5
Can you create better reproduction steps and also try the very same steps on other kinds of resources?
Dropping priority to high, since we've not been able to reproduce it
The bug is still here. I've just reproduced it on JON 3.1.CR1. Steps to reproduce are same: 1. have standalone running (this time it was in ha mode) 2. created WAR deployment child 3. it took 3 minutes and deployment resource was still not present in UI, so I've started manual discover which found the resource. Maybe it is only discovery is too slow and there is a relation to Bug 820709
The issue here is most likely that a service discovery scan was in progress when you initiated the WAR create resource requests. In that case, the plugin container would have to wait for that scan to complete before initiating a new scan for the purpose of discovering the newly added WAR. This is because all discovery scans are executed in a single thread in the plugin container (i.e. only one discovery scan can execute at any given time - any others are queued up). That being said, I admit having to wait several minutes for the WAR to show up in your inventory is non-intuitive and inconvenient. To ease the pain a bit, I've made two small improvements: 1) When you initiate the create request via the GUI, the following green status message is now displayed at the top of the GUI: A request to create a Resource of type [{0}] has been submitted successfully. Note, it may take several minutes for the Resource to show up in inventory. 2) Once the service scan that is supposed to discover the newly added WAR finally completes, the PC now checks if the Resource actually got discovered. If it did, the following message is written to the Agent log: INFO: Discovered Resource[id=xxxxx, ...], for a new managed resource created via RHQ. And if it was not discovered, the following message is logged: WARN: Failed to discover Resource for newly created [Deployment] managed resource with key [foo.war]. [master http://git.fedorahosted.org/git?p=rhq/rhq.git;a=commitdiff;h=8ef472f]
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.