Bug 1020859 - Impossible to undeploy helloworld-mdb.war, if it's deployed on domain
Summary: Impossible to undeploy helloworld-mdb.war, if it's deployed on domain
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Quickstarts
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ER7
: EAP 6.2.0
Assignee: sgilda
QA Contact: Vladimir Rastseluev
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-18 11:47 UTC by Vladimir Rastseluev
Modified: 2017-10-10 00:11 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-12-15 16:19:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Updated README and new or updated scripts (4.01 KB, application/gzip)
2013-10-18 18:46 UTC, sgilda
no flags Details

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


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