Bug 1002238 - Availability check errors in UI after undeploying a storage node [NEEDINFO]
Availability check errors in UI after undeploying a storage node
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
Unspecified Unspecified
unspecified Severity high (vote)
: ---
: RHQ 4.9
Assigned To: Jirka Kremser
Mike Foley
Depends On:
Blocks: 951619
  Show dependency treegraph
Reported: 2013-08-28 13:14 EDT by John Sanda
Modified: 2013-09-09 09:06 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-09 09:06:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
jkremser: needinfo? (jsanda)

Attachments (Terms of Use)

  None (edit)
Description John Sanda 2013-08-28 13:14:04 EDT
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-/ 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:

Actual results:

Expected results:

Additional info:
Comment 1 Jirka Kremser 2013-09-09 09:06:39 EDT
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

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