Bug 1020859 - Impossible to undeploy helloworld-mdb.war, if it's deployed on domain
Impossible to undeploy helloworld-mdb.war, if it's deployed on domain
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Quickstarts (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity medium
: ER7
: EAP 6.2.0
Assigned To: sgilda
Vladimir Rastseluev
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-18 07:47 EDT by Vladimir Rastseluev
Modified: 2017-10-09 20:11 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-15 11:19:44 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Vladimir Rastseluev 2013-10-18 07:47:08 EDT
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 09:21:09 EDT
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 09:47:46 EDT
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 12:31:36 EDT
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 12:57:19 EDT
Ignore the last command in the previous comment. It was pasted by mistake.
Comment 5 sgilda 2013-10-18 14:46:12 EDT
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 14:46:51 EDT
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 14:56:24 EDT
I see my issue in related bug https://bugzilla.redhat.com/show_bug.cgi?id=1017751.
Comment 8 Jesse Sightler 2013-10-18 15:16:01 EDT
(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 15:28:33 EDT
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 15:53:19 EDT
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 16:11:56 EDT
Yes, I do. I'll continue with my separate script approach.
Comment 12 sgilda 2013-10-21 12:12:10 EDT
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 12:19:58 EDT
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 16:06:20 EDT
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 10:11:34 EDT
Verified on EAP 6.2 ER7

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