Description of problem: When a storage node is undeployed, the corresponding resource gets un-inventoried in the background (i.e., in a thread other than the one servicing the UI request). After the storage node is removed from inventory, you will start seeing errors during the live availability check. The exception reported in the server log is, 08:36:29,250 WARN [org.rhq.enterprise.gui.coregui.server.gwt.ResourceGWTServiceImpl] (http-/0.0.0.0:7080-101) Sending exception to client: [1377693389250] : org.rhq.enterprise.server.resource.ResourceNotFoundException: A Resource with id 10591 does not exist in inventory. at org.rhq.enterprise.server.resource.ResourceManagerBean.getResourceById(ResourceManagerBean.java:754) [rhq-server.jar:4.9.0-SNAPSHOT] at org.rhq.enterprise.server.resource.ResourceManagerBean.getLiveResourceAvailability(ResourceManagerBean.java:2445) [rhq-server.jar:4.9.0-SNAPSHOT] I believe this is happening because the UI is not aware of the resource being removed from inventory. Doing a page refresh resolves the issue. We need to add logic in the storage node admin UI to prevent this errors in a way that does not force the user to do a page refresh. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
ResourceManagerBean.getLiveResourceAvailability() is a method that is called by the resource page (/#Resource/${resId}). This should happen only if the user is steering to the page with the resource (that was removed from the inventory meanwhile in the background). Once the resource is removed it shouldn't be showed in the resource tree anymore => no way to navigate to the page with it. There was an issue with the live availability feature causing the polling job to query the server even if the user left (closed) the page with the resource (the job wasn't cancelled). This should be now fixed and the error should not occur on the storage node UI. To me, it does make sense to see ResourceNotFoundException if the resource wasn't found and having the page with the resource opened. It is same as if: 1) user A will open the browser with RHQ on some resource, 2) user B from other browser with RHQ would uninventory the resource, 3) user A would get the same type of error btw. 2) can be also done via CLI
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days