Description of problem: The agent log contains the following warning repeatedly: WARN [Content.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Cannot get a resource container for an invalid resource ID=0 Version-Release number of selected component (if applicable): 3.1.0 How reproducible: Always Steps to Reproduce: 1. Install JON 3.1.0 2. Register agent with server (DO NOT import platform into inventory) Actual results: Each time discovery is attempted, the warning is logged. 2012-09-12 16:51:01,075 DEBUG [Content.discovery-1] (rhq.core.pc.content.ContentDiscoveryRunner)- Performing discovery: ScheduledContentDiscoveryInfo:resource-id=[0], package-type=[rpm], interval=[43200000], next-discovery=[Wed Sep 12 16:50:01 CDT 2012 2012-09-12 16:51:01,077 WARN [Content.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Cannot get a resource container for an invalid resource ID=0 2012-09-12 16:51:01,077 DEBUG [Content.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Stack trace follows: java.lang.Throwable: This is where resource ID=[0] was passed in at org.rhq.core.pc.inventory.InventoryManager.getResourceContainer(InventoryManager.java:490) at org.rhq.core.pc.util.ComponentUtil.getComponent(ComponentUtil.java:100) at org.rhq.core.pc.content.ContentManager.performContentDiscovery(ContentManager.java:420) at org.rhq.core.pc.content.ContentDiscoveryRunner.call(ContentDiscoveryRunner.java:123) at org.rhq.core.pc.content.ContentDiscoveryRunner.run(ContentDiscoveryRunner.java:90) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) 2012-09-12 16:51:01,078 WARN [Content.discovery-1] (rhq.core.pc.content.ContentDiscoveryRunner)- Exception received from component while attempting content retrieval org.rhq.core.clientapi.agent.PluginContainerException: Resource component container could not be retrieved for resource: 0 at org.rhq.core.pc.util.ComponentUtil.getComponent(ComponentUtil.java:102) at org.rhq.core.pc.content.ContentManager.performContentDiscovery(ContentManager.java:420) at org.rhq.core.pc.content.ContentDiscoveryRunner.call(ContentDiscoveryRunner.java:123) at org.rhq.core.pc.content.ContentDiscoveryRunner.run(ContentDiscoveryRunner.java:90) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) 2012-09-12 16:51:01,079 WARN [Content.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Cannot get a resource container for an invalid resource ID=0 2012-09-12 16:51:01,079 DEBUG [Content.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Stack trace follows: java.lang.Throwable: This is where resource ID=[0] was passed in at org.rhq.core.pc.inventory.InventoryManager.getResourceContainer(InventoryManager.java:490) at org.rhq.core.pc.content.ContentManager.rescheduleDiscovery(ContentManager.java:360) at org.rhq.core.pc.content.ContentDiscoveryRunner.call(ContentDiscoveryRunner.java:130) at org.rhq.core.pc.content.ContentDiscoveryRunner.run(ContentDiscoveryRunner.java:90) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) Expected results: No warning and no stack trace in DEBUG. Additional info: Although this does not seem to impact inventory or inventory synchronization, it is a warning and gives the appearance that something is broken. Of course, this is not the case. Instead, all this simply means is that the agent platform has not yet been imported into inventory and still has a resource ID of 0. Perhaps we should be checking the inventory status for resources containers with ID of 0 and in such cases suppress the warning?
*** Bug 845954 has been marked as a duplicate of this bug. ***
*** Bug 1014501 has been marked as a duplicate of this bug. ***
Fixed in release/jon3.2.x commit 8029ecf274e8265cf5475504c76eb56f385724af Author: Thomas Segismont <tsegismo> Date: Fri Oct 11 11:45:11 2013 +0200 Cherry picked from master 180a980 Schedule content discovery if resource is synchronized and COMMITED
Moving to ON_QA for testing in the next build.
Created attachment 822869 [details] agent.log
verified in er5 - please get agent.log attached