Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1124447

Summary: Inconsistency between UI's Message center and agent's log while deploying duplicate EAR resource
Product: [JBoss] JBoss Operations Network Reporter: Jan Bednarik <jbednari>
Component: Plugin -- JBoss EAP 6Assignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED WONTFIX QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: JON 3.2.2CC: lzoubek, mkoci, myarboro, tsegismo
Target Milestone: ---   
Target Release: JON 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-28 09:06:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Testing EAR resource none

Description Jan Bednarik 2014-07-29 14:00:36 UTC
Created attachment 922157 [details]
Testing EAR resource

Description of problem:
If user attempts to deploy the same EAR resource multiple times, the Message center logs message: "A request to create a Resource of type [Deployment] has been submitted successfully. Note, it may take several minutes for the Resource to show up in inventory." confirming that resource was created even though the exception is logged in 'agent.log' file (see below) and the resource of given name never appears in EAP's Deployments node.

Version-Release number of selected component (if applicable):
Version : 3.2.0.GA Update 02
Build Number : dfe3e4b:cf4474c
Application Platform Plugin Pack Update-01 applied

How reproducible:
always

Steps to Reproduce:
1. Install JON 3.2.2 server and remote agent with EAP standalone server installed.
2. Deploy testing EAR resource (see attachment) as EAP's child (Operations -> Deployment) and give it runtime name 'testingEAR-1'.
3. Repeat step 2 but give the resource runtime name 'testingEAR-2'
4. Check the message center and check the remote agent's agent.log file

Actual results:
The resource is not deployed even though the message center displays confirmation message

Expected results:
Message center warns the user that the duplicate resource cannot be deployed.

Additional info:

Exeception logged in agent/log file:

2014-07-29 09:39:05,510 WARN  [ResourceContainer.invoker.nonDaemon-2] (rhq.modules.plugins.jbossas7.StandaloneASComponent)- Deploy of [testEARDeplyoment] failed: {JBAS014653: Composite operation failed and was rolled back. Steps that failed:={Operation step-2={JBAS014671: Failed services={jboss.deployment.unit.testEARDeplyoment.FIRST_MODULE_USE=org.jboss.msc.service.StartException in service jboss.deployment.unit.testEARDeplyoment.FIRST_MODULE_USE: JBAS018733: Failed to process phase FIRST_MODULE_USE of deployment "testEARDeplyoment"
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS010464: Exception deploying datasource java:jboss/datasources/KitchensinkEarQuickstartDS
    Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.data-source.java:jboss/datasources/KitchensinkEarQuickstartDS is already registered}}}}, rolled-back=true

Comment 2 Libor Zoubek 2014-08-04 14:50:11 UTC
"A request to create a Resource of type [Deployment] has been submitted successfully. Note, it may take several minutes for the Resource to show up in inventory." does not say anything about the fact, that resource was or was not created. It just says, request was submitted - at the time we submit request, we don't know if parent resource (in your case EAP6) succeeds in creating Deployment or not.

Jan, I'd close this one as NOTABUG, unless you have an idea to change the message, so it does not confuse people.

In ideal (future) world, we'll probably show a message about sent request and then show some progressbar and finally show another message with success/failed result. This functionality is not possible in current GUI architecture, since we don't have a way to asynchronously push message from server to UI.

Comment 3 Thomas Segismont 2014-08-28 09:06:59 UTC
(In reply to Libor Zoubek from comment #2)
> "A request to create a Resource of type [Deployment] has been submitted
> successfully. Note, it may take several minutes for the Resource to show up
> in inventory." does not say anything about the fact, that resource was or
> was not created. It just says, request was submitted - at the time we submit
> request, we don't know if parent resource (in your case EAP6) succeeds in
> creating Deployment or not.

Right.

The information regarding resource creation success/failure is shown in the Child Resources History subtab.