Bug 1162444

Summary: (6.4.0) the deployment content is deleted if first undeploy and then deploy the same application using CLI batch
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Jay SenSharma <jsenshar>
Component: Domain ManagementAssignee: Tomas Hofman <thofman>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Kremensky <pkremens>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3.0CC: bbaranow, brian.stansberry, dandread, ehugonne, kkhan, lkonno, mkopecky, sjadhav, thofman
Target Milestone: DR12   
Target Release: EAP 6.4.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1163173 (view as bug list) Environment:
Last Closed: 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:
Bug Depends On:    
Bug Blocks: 1163173, 1163178    

Description Jay SenSharma 2014-11-11 05:18:48 UTC
Description of problem:
========================
- If deploy and undeploy CLI commands executed in a batch mode then it causes missing deployment inside the "data/content" directory which leads to the following error:


{code}
[Host Controller] 10:45:50,600 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014612: Operation ("add") failed - address: ([("deployment" => "example.war")]) - failure description: "JBAS010876: No deployment content with hash d85f1e3106bc8a49838a0dccae9e80819c25e02c is available in the deployment content repository for deployment 'example.war'. This is a fatal boot error. To correct the problem, either restart with the --admin-only switch set and use the CLI to install the missing content or remove it from the configuration, or remove the deployment from the xml configuraiton file and restart."
[Host Controller] 10:45:50,603 FATAL [org.jboss.as.host.controller] (Controller Boot Thread) JBAS010933: Host Controller boot has failed in an unrecoverable manner; exiting. See previous messages for details.
{code}


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

How reproducible: Yes

Steps to Reproduce:
====================

- 1. Take a fresh EAP 6.3.0 and start the domain mode.

- 2. Deploy any simple application to it as following:
{code}
deploy /PATH/TO/example.war --name=example.war --server-groups=main-server-group
{code}

- 3. Check the application is working and accessible and the contetns are present inside the "domain/servers/server-one/data/content" and "domain/servers/server-two/data/content"

- 4. Now run the following command sequence in batch mode using CLI.
{code}
batch
undeploy example.war --server-groups=main-server-group
deploy /PATH/TO/example.war --name=example.war --server-groups=main-server-group
run-batch
{code}

- 5.  Check the domain.xml file that it has the deployment entry properly inside it. However the Content of this WAR is missing from the server's content directory which  "domain/servers/server-one/data/content" and "domain/servers/server-two/data/content",  So when attempt to restart the domain next time it leads to the following error:


Actual results:
===============
- After restarting the domain mode it causes error:
{code}
[Host Controller] 10:45:50,600 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014612: Operation ("add") failed - address: ([("deployment" => "example.war")]) - failure description: "JBAS010876: No deployment content with hash d85f1e3106bc8a49838a0dccae9e80819c25e02c is available in the deployment content repository for deployment 'example.war'. This is a fatal boot error. To correct the problem, either restart with the --admin-only switch set and use the CLI to install the missing content or remove it from the configuration, or remove the deployment from the xml configuraiton file and restart."
[Host Controller] 10:45:50,603 FATAL [org.jboss.as.host.controller] (Controller Boot Thread) JBAS010933: Host Controller boot has failed in an unrecoverable manner; exiting. See previous messages for details.
{code}



Expected results:
=================
- Domain should have started successfully.


Additional info:

Comment 2 Brian Stansberry 2014-11-20 13:46:22 UTC
*** Bug 1161243 has been marked as a duplicate of this bug. ***

Comment 3 Tomas Hofman 2014-11-25 13:20:37 UTC
PR: https://github.com/jbossas/jboss-eap/pull/2061

Comment 4 Emmanuel Hugonnet (ehsavoie) 2014-11-26 10:45:15 UTC
Changing warning messages

Comment 5 Tomas Hofman 2014-11-26 11:22:32 UTC
Warning messages were updated.

Comment 6 Marek Kopecky 2014-12-05 14:29:29 UTC
Verified on EAP 6.4.0.DR12