Bug 1020859

Summary: Impossible to undeploy helloworld-mdb.war, if it's deployed on domain
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Vladimir Rastseluev <vrastsel>
Component: QuickstartsAssignee: sgilda
Status: CLOSED CURRENTRELEASE QA Contact: Vladimir Rastseluev <vrastsel>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bsutter, jkudrnac, jsightle, myarboro, pmuir, pslavice
Target Milestone: ER7   
Target Release: EAP 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-15 16:19:44 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
Updated README and new or updated scripts none

Description Vladimir Rastseluev 2013-10-18 11:47:08 UTC
Description of problem:
I tested "hornetq-clustering" quickstarts example on domain. It uses helloworld-mdb examples' compiled .war to deploy. After testing I tried to undeploy helloworld-mdb.war from domain as described in readme. Unsuccessfull.

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

How reproducible:
easy

Steps to Reproduce:
follow instructions from "hornetq-clustering" examples' readme file and choose domain mode.

Actual results:
[vrastsel@war helloworld-mdb]$ mvn jboss-as:undeploy
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JBoss EAP Quickstart: helloworld-mdb 6.2.0.GA
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- jboss-as-maven-plugin:7.4.Final:undeploy (default-cli) @ jboss-helloworld-mdb ---
Oct 18, 2013 1:31:40 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.7.GA
Oct 18, 2013 1:31:40 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.7.GA
Oct 18, 2013 1:31:40 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.12.GA
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.440s
[INFO] Finished at: Fri Oct 18 13:31:41 CEST 2013
[INFO] Final Memory: 8M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.4.Final:undeploy (default-cli) on project jboss-helloworld-mdb: Server is running in domain mode, but no server groups have been defined. -> [Help 1]
[ERROR] 


Expected results:
example undeployed successfully

Additional info:

Comment 1 sgilda 2013-10-18 13:21:09 UTC
Adding Jesse Sightler to this issue since he contributed this quickstart.

The undeploy could never have worked. There's no POM file in the root of the quickstart. This needs a a removal script for both the standalone and domain deployments. 

The is also an issue with the README file. The standalone instructions specify to backup the configuration of the domain directory. I'll fix that one now.

Jesse, can you provide uninstall scripts for standalone and domain modes?

Comment 2 sgilda 2013-10-18 13:47:46 UTC
Jesse, 

Would it make sense to separate deployment from the configuration scripts? Developers may want to undeploy and redeploy after the server is configured.

If you look at the ejb-multiserver quickstart, you can see an example.

So we would want these scripts:

install-standalone.cli
install-domain.cli

deploy-standalone.cli
deploy-domain.cli

undeploy-standalone.cli
undeploy-domain.cli

remove-standalone.cli
remove domain.cli

Comment 3 sgilda 2013-10-18 16:31:36 UTC
I am working on new scripts for this, but am discovering the existing standalone script give this error:

{
    "outcome" => "failed",
    "failure-description" => "JBAS011681: Attribute (connector) can not been undefined as the resource does not define any alternative to this attribute.",
    "rolled-back" => true,
    "response-headers" => {"process-state" => "reload-required"}
}

I commented out this line:
/subsystem=messaging/hornetq-server=default/connection-factory=RemoteConnectionFactory/:undefine-attribute(name=connector)

And tried again. This time I got:

{
    "outcome" => "failed",
    "failure-description" => "JBAS011630: Alternative attribute of (discovery-group-name) is already defined.",
    "rolled-back" => true,
    "response-headers" => {"process-state" => "reload-required"}
}

Has something changed in EAP 6.2?

/subsystem=messaging/hornetq-server=default/connection-factory=RemoteConnectionFactory/:write-attribute(name=discovery-group-name, value=dg-group1)

Comment 4 sgilda 2013-10-18 16:57:19 UTC
Ignore the last command in the previous comment. It was pasted by mistake.

Comment 5 sgilda 2013-10-18 18:46:12 UTC
Created attachment 813884 [details]
Updated README and new or updated scripts

The domain scripts work. The standalone scripts are a work in progress.

Comment 6 sgilda 2013-10-18 18:46:51 UTC
I have the domain version working. The standalone version is not working for me so I sent an email to Jess with some questions for the standalone version.

Attached the scripts and updated README file so I don't lose them.

Comment 7 sgilda 2013-10-18 18:56:24 UTC
I see my issue in related bug https://bugzilla.redhat.com/show_bug.cgi?id=1017751.

Comment 8 Jesse Sightler 2013-10-18 19:16:01 UTC
(In reply to sgilda from comment #1)
> Adding Jesse Sightler to this issue since he contributed this quickstart.
> 
> The undeploy could never have worked. There's no POM file in the root of the
> quickstart. This needs a a removal script for both the standalone and domain
> deployments. 
> 
> The is also an issue with the README file. The standalone instructions
> specify to backup the configuration of the domain directory. I'll fix that
> one now.
> 
> Jesse, can you provide uninstall scripts for standalone and domain modes?

The undeploy instructions say to go to the helloworld-mdb project first. I'm pretty sure that one has a pom.xml. :)

Comment 9 sgilda 2013-10-18 19:28:33 UTC
Jess: You are right. It does say that. Will that work for both domain and standalone mode?

Did you get my email with other questions?

Comment 10 Jesse Sightler 2013-10-18 19:53:19 UTC
I have not tried it under domain mode. I am not sure if the helloworld-mdb project's war would handle that, but I'm guessing that it would not. I don't think we considered that when doing the domain mode instructions for this quickstart.

I believe you have a workaround now, though?

Comment 11 sgilda 2013-10-18 20:11:56 UTC
Yes, I do. I'll continue with my separate script approach.

Comment 12 sgilda 2013-10-21 16:12:10 UTC
Jess: I made some changes and tried to issue you a pull, but for some reason, I wasn't able to find your repo in the list.

Could you review my changes here?
https://github.com/sgilda/jboss-as-quickstart/tree/eap-pull-691

I modified the install-standalone.cli script and added scripts for the undeploy and removal of the configuration. I also modified the instructions.

Could you let me know if it looks OK? If so, I'll issue a pull to jboss-eap-quickstarts.

Comment 13 sgilda 2013-10-21 16:19:58 UTC
Jess, it might be easier to review my new pull here; https://github.com/jboss-developer/jboss-eap-quickstarts/pull/692

Comment 14 sgilda 2013-10-21 20:06:20 UTC
Added undeploy scripts so the undeploy will remove it from the server group.

Fixed in this commit: 
https://github.com/jboss-developer/jboss-eap-quickstarts/commit/00acdd6530071010e927cdf0860b5d5e076cb90c

Comment 15 Vladimir Rastseluev 2013-11-01 14:11:34 UTC
Verified on EAP 6.2 ER7