Bug 1120229 - Creation of child resource fails if the resource with given name previously existed and then was deleted
Summary: Creation of child resource fails if the resource with given name previously e...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: REST
Version: JON 3.2.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: JON 3.3.0
Assignee: Heiko W. Rupp
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-16 13:31 UTC by Jan Bednarik
Modified: 2014-09-21 22:56 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-30 10:03:33 UTC
Type: Bug


Attachments (Terms of Use)

Description Jan Bednarik 2014-07-16 13:31:30 UTC
Description of problem:
The RHQ server fails to create a child resource if the same resource with the same name previously existed and then was removed. The issue occurs both using REST and web UI. 

In case of REST query the server fails to create the resource and responds with http code 500).

In case of WEB UI the message "A request to create a Resource with the name of [if-test1] has been submitted successfully," but the resource is never created and never appears in the inventory.

Version-Release number of selected component (if applicable):
RHQ 4.13.0-SNAPSHOT (89a2c43)

How reproducible:
always

Steps to Reproduce:
1. Create the "Network Interface" child resource of EAP standalone server (either via UI or REST) and name it "test-interface".
2. After the resource is created uninventory it (either via UI or REST)
3. Using REST repeat step 1 (make sure you give the same name "test-interface" to the resource)
4. Check the server's response. Using UI check that the resource was not created.
5. Using WEB UI repeat step 1 (make sure you give the same name "test-interface" to the resource).
6. Using UI check that the resource was not created.

Actual results:
The resource is not created. UI displays message confirming that the resource was created.

Expected results:
Resource is created and if not the UI should reflect on that.

Additional info:

Comment 1 Thomas Segismont 2014-08-28 12:16:03 UTC
(In reply to Jan Bednarik from comment #0)
> 2. After the resource is created uninventory it (either via UI or REST)

Did you click uninventory or delete?

Uninventory does not *delete* the resource from the managed server. It justs removes it from JON's inventory. Then it is expected that when you try to create a resource with the same name, EAP refuses it.

Please clarify the reproduction steps, both for UI and REST. For the latter, please attach to the BZ the script of the test case.

Comment 2 Thomas Segismont 2014-08-30 10:03:33 UTC
Closing assuming the resource was uninventoried, not deleted. Reopen if you can reproduce actually deleting the resource.

Comment 3 Jan Bednarik 2014-09-09 11:32:18 UTC
(In reply to Thomas Segismont from comment #1)
> (In reply to Jan Bednarik from comment #0)
> > 2. After the resource is created uninventory it (either via UI or REST)
> 
> Did you click uninventory or delete?
> 
> Uninventory does not *delete* the resource from the managed server. It justs
> removes it from JON's inventory. Then it is expected that when you try to
> create a resource with the same name, EAP refuses it.

Thomas you are right, I had a look at this issue again and I used DELETE /resource/{id} in case of REST and uninventory in case of UI. As you say, this does not delete the resource from the managed server. Thus I agree with notabug resolution.


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