Bug 1118275 - binary deployment to JBossEWS application can result in dangling symlinks under jboss/conf/
Summary: binary deployment to JBossEWS application can result in dangling symlinks und...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image
Version: 2.1.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1123105
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-10 10:44 UTC by Veer Muchandi
Modified: 2014-08-26 13:52 UTC (History)
7 users (show)

Fixed In Version: openshift-origin-cartridge-jbossews-1.22.3.5-1.el6op
Doc Type: Bug Fix
Doc Text:
A bug in the JBoss EWS cartridge caused broken symlinks to be created if configuration files did not exist in a JBoss EWS binary deployment, which caused the application to be unable to deploy. This bug fix updates the control script for the JBoss EWS cartridge to handle scenarios where a deployment archive does not contain configuration files. A cartridge upgrade is required after applying this fix.
Clone Of:
: 1123105 (view as bug list)
Environment:
Last Closed: 2014-08-26 13:52:47 UTC


Attachments (Terms of Use)
petstore.war renamed as ROOT.war (5.87 MB, application/octet-stream)
2014-07-10 10:44 UTC, Veer Muchandi
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1095 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.1.5 bug fix and enhancement update 2014-08-26 17:51:34 UTC

Description Veer Muchandi 2014-07-10 10:44:49 UTC
Created attachment 917043 [details]
petstore.war renamed as ROOT.war

Description of problem:
Deploy a JBossEWS application as a binary tar ball. It will have all broken links under jbossews/conf folder.

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


How reproducible:
Create an application. Set it up for binary deployments. Deploy a tar ball. SSH to the box and look at the jbossews/conf folder

Steps to Reproduce:
1. Create an application using JBoss EWS cartridge.
$ rhc app create ewspetstore jbossews-2.0 –-no-git

2. Configure the application to use binary deployment.  
$ rhc configure-app --app ewspetstore --no-auto-deploy --keep-deployments 2 --deployment-type binary

3. Create a directory structure as shown below:
$ mkdir ewsbinarydep
$ cd ewsbinarydep/
$ mkdir -p build-dependencies/.m2 dependencies/jbossews/webapps repo/.openshift/config

4. Download and copy the petstore.war file into dependencies/jbossews/webapps folder. Rename the file to ROOT.war if you want to access it by default url. 

5. Package the folder structure to an archive so you are not wasting wire bandwidth. You can use zip, tar, tar.gz, or tar.bz formats. Make sure you are in the ewsbinarydep folder.
$ tar -czvf ../ewsbinarydep-archive.tar.gz ./

6. Deploy the new binary artifact using rhc deploy command as shown below
$ rhc deploy --app ewspetstore --ref ../ewsbinarydep-archive.tar.gz

Actual results:
[ewspetstore-workshop.apps.openshift.com conf]\> ls -l
total 40
drwxr-xr-x. 3 53bb421ae4a81d52f900005a 53bb421ae4a81d52f900005a 4096 Jul  7 20:58 Catalina
lrwxrwxrwx. 1 53bb421ae4a81d52f900005a 53bb421ae4a81d52f900005a  100 Jul  7 20:58 catalina.policy -> /var/lib/openshift/53bb421ae4a81d52f900005a/app-root/runtime/repo//.openshift/config/catalina.policy
lrwxrwxrwx. 1 53bb421ae4a81d52f900005a 53bb421ae4a81d52f900005a  104 Jul  7 20:58 catalina.properties -> /var/lib/openshift/53bb421ae4a81d52f900005a/app-root/runtime/repo//.openshift/config/catalina.properties
-rw-r--r--. 1 53bb421ae4a81d52f900005a 53bb421ae4a81d52f900005a 2373 Jul  7 21:15 context.xml
lrwxrwxrwx. 1 53bb421ae4a81d52f900005a 53bb421ae4a81d52f900005a  103 Jul  7 20:58 logging.properties -> /var/lib/openshift/53bb421ae4a81d52f900005a/app-root/runtime/repo//.openshift/config/logging.properties
lrwxrwxrwx. 1 53bb421ae4a81d52f900005a 53bb421ae4a81d52f900005a  106 Jul  7 20:58 postgresql_module.xml -> /var/lib/openshift/53bb421ae4a81d52f900005a/app-root/runtime/repo//.openshift/config/postgresql_module.xml
-rw-r--r--. 1 53bb421ae4a81d52f900005a 53bb421ae4a81d52f900005a 6837 Jul  7 21:15 server.xml
lrwxrwxrwx. 1 53bb421ae4a81d52f900005a 53bb421ae4a81d52f900005a  101 Jul  7 20:58 tomcat-users.xml -> /var/lib/openshift/53bb421ae4a81d52f900005a/app-root/runtime/repo//.openshift/config/tomcat-users.xml
lrwxrwxrwx. 1 53bb421ae4a81d52f900005a 53bb421ae4a81d52f900005a   92 Jul  7 20:58 web.xml -> /var/lib/openshift/53bb421ae4a81d52f900005a/app-root/runtime/repo//.openshift/config/web.xml

Most of the above links above are broken.


Expected results:
EWS seems to expect web.xml at a minimum. RHC shows deployed successfully. With broken links above nothing can be checked.

Additional info:

Comment 2 Brenton Leanhardt 2014-08-01 13:30:09 UTC
Upstream commit:

commit b387a4d029774437249bc8237553974e6f96d680
Author: Maciej Szulik <maszulik@redhat.com>
Date:   Mon Jul 28 14:15:12 2014 +0200

    Bug 1123105 - Fixed binary jbossews binary deployment, currently when no config files are specified inside archive, then template's one are taken as the default

Comment 5 Gaoyun Pei 2014-08-04 07:15:05 UTC
verify this bug with openshift-origin-cartridge-jbossews-1.22.3.5-1.el6op.noarch

After deploy the binary artifact to the app using rhc deploy, check the files in jbossews/conf/, the links are valid, they're pointing to correct files.

Comment 7 errata-xmlrpc 2014-08-26 13:52:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1095.html


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