Bug 569751 - Deleting a queue that is no longer deployed is not possible
Deleting a queue that is no longer deployed is not possible
Status: CLOSED NOTABUG
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
unspecified
All Linux
low Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Rajan Timaniya
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-02 04:40 EST by Jaroslaw Kijanowski
Modified: 2014-05-27 14:44 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-27 14:44:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
sample queue (405 bytes, text/xml)
2010-03-02 04:40 EST, Jaroslaw Kijanowski
no flags Details

  None (edit)
Description Jaroslaw Kijanowski 2010-03-02 04:40:56 EST
Created attachment 397268 [details]
sample queue

Description of problem:
I have deployed a queue and it got discovered by JON. Then I have removed that queue manually (deleted from the deploy dir).

First of all this error showed up in the EAP server log (I wasn't able to reproduce it again):

02:59:51,384 INFO  [QueueService] Queue[/queue/my_test_queue] stopped
03:02:30,255 ERROR [InventoryManager] Call to getAvailablity() on ResourceComponent for Resource[id=-11, type=Queue, key=/queue/my_test_queue, name=my_test_queue, parent=JBoss EAP 5 (production)] failed.
java.lang.IllegalStateException: Failed to find [ComponentType{type=JMSDestination, subtype=Queue}] ManagedComponent named [/queue/my_test_queue].
	at org.rhq.plugins.jbossas5.ManagedComponentComponent.getManagedComponent(ManagedComponentComponent.java:367)
	at org.rhq.plugins.jbossas5.ManagedComponentComponent.getAvailability(ManagedComponentComponent.java:110)
	at sun.reflect.GeneratedMethodAccessor344.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)

Right after that the whole server (with all its resources) was marked as down in JON for a couple of minutes.


After all went green again, I went to INVENTORY and displayed the deleted queue - it was marked as DOWN. When I tried to delete it I got this:

JON server log:
2010-03-02 03:12:12,940 INFO  [org.rhq.enterprise.server.resource.ResourceFactoryServerServiceImpl] Received delete resource response: DeleteResourceResponse[RequestId=10001, Status=Failure]


JON agent log:
2010-03-02 03:12:12,865 INFO  [ResourceFactory.executor-1] (rhq.core.pc.inventory.DeleteResourceRunner)- Deleting resource from request: 10001


Failure displayed in the GUI:
java.lang.IllegalStateException: Failed to find [ComponentType{type=JMSDestination, subtype=Queue}] ManagedComponent named [/queue/my_test_queue].
	at org.rhq.plugins.jbossas5.ManagedComponentComponent.getManagedComponent(ManagedComponentComponent.java:367)
	at org.rhq.plugins.jbossas5.ManagedComponentComponent.deleteResource(ManagedComponentComponent.java:192)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)



Version-Release number of selected component (if applicable):

JON-2.3.1 GA
jon-plugin-pack-eap-2.3.1.GA
EAP 5.0.0 (http://porkchop.devel.redhat.com/released/JBEAP-5.0/5.0.0.GA/zip/jboss-eap-5.0.0.GA.zip)

How reproducible:


Steps to Reproduce:
1. Install JON, Agent, EAP5, deploy a sample queue (attached), discover EAP in JON
2. delete the sample queue (manually or through the admin console)
3. verify resource goes down in JON and try to delete it
  
Actual results:
A failure is displayed (see above)

Expected results:
Resource is deleted

Additional info:
Comment 2 Larry O'Leary 2011-09-15 16:26:10 EDT
In this situation you want to "UNINVENTORY" such an item, not delete it. Delete is like "Undeploy". However, in case described here, the resource was already undeployed and therefore, can not be undeployed a second time. Instead, uninevntory will remove a resource from inventory.

However, this situation should probably be better handled. For example, inform the user of a meaningful error condition and then ask them if they want to remove it from inventory.

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