JBoss ON bundle deployment creates content in wrong location when destination contains a symbolic link and a relative path is used for content location
Issue
- Deployment issue of bundle files
- Deploy a bundle is failing as it cannot create the directory it needs to deploy to.
-
The server is reporting back the following error:
ERROR [ResourceContainer.invoker.nonDaemon-1] (org.rhq.plugins.ant.AntBundlePluginComponent)- Failed to deploy bundle [class org.rhq.core.pluginapi.bundle.BundleDeployRequest: deployment=[BundleResourceDeployment: bdd=[BundleDeployment[id=10001, name=Deployment [1] of Version [1.1.1] to [EAP Test Destination]]], resource=[Resource[id=10003, uuid=13f61b64-7f4a-4c25-a8df-c917f3e01bc9, type={JBossAS5}JBossAS Server, key=/opt/jboss/jboss-eap-5.2.0/jboss-as/server/all, name=EAP ashost:1099 all, version=EAP 5.2.0]]], full-deploy-directory=[/opt/jboss/jboss-eap-5.2.0/jboss-as/server/all/deploy/myapp.deployment], clean=[false], revert=[false]] java.lang.Exception: Failed to execute the bundle Ant script at org.rhq.plugins.ant.AntBundlePluginComponent.deployBundle(AntBundlePluginComponent.java:159) ... Caused by: java.lang.RuntimeException: Failed to execute bundle deploy file [/opt/jboss/rhq-agent/data/tmp/bundle-versions/10001/ant-bundle-recipe2293873009064600317.xml]. Cause: /opt/jboss/rhq-agent/data/tmp/bundle-versions/10001/ant-bundle-recipe2293873009064600317.xml:2: Failed to deploy bundle [fxmpDatasource] version [1.1.1]: java.lang.Exception: Failed to create new parent directory for raw file [/opt/jboss/jboss-eap-5.2.0/jboss-as/server/all/deploy/myapp.deployment/../../conf/app.properties] at org.rhq.bundle.ant.AntLauncher.executeBundleDeployFile(AntLauncher.java:118) at org.rhq.plugins.ant.AntBundlePluginComponent.executeDeploymentPhase(AntBundlePluginComponent.java:306) at org.rhq.plugins.ant.AntBundlePluginComponent.deployBundle(AntBundlePluginComponent.java:139) ... 10 more Caused by: /opt/jboss/rhq-agent/data/tmp/bundle-versions/10001/ant-bundle-recipe2293873009064600317.xml:2: Failed to deploy bundle [fxmpDatasource] version [1.1.1]: java.lang.Exception: Failed to create new parent directory for raw file [/opt/jboss/jboss-eap-5.2.0/jboss-as/server/all/deploy/myapp.deployment/../../conf/app.properties] at org.rhq.bundle.ant.type.DeploymentUnitType.install(DeploymentUnitType.java:218) at org.rhq.bundle.ant.task.BundleTask.execute(BundleTask.java:148) ... at org.rhq.bundle.ant.AntLauncher.executeBundleDeployFile(AntLauncher.java:111) ... 12 more Caused by: java.lang.Exception: Failed to create new parent directory for raw file [/opt/jboss/jboss-eap-5.2.0/jboss-as/server/all/deploy/myapp.deployment/../../conf/app.properties] at org.rhq.core.util.updater.Deployer.extractZipAndRawFiles(Deployer.java:822) at org.rhq.core.util.updater.Deployer.performInitialDeployment(Deployer.java:340) at org.rhq.core.util.updater.Deployer.deploy(Deployer.java:181) at org.rhq.bundle.ant.type.DeploymentUnitType.install(DeploymentUnitType.java:202) ... 24 more
-
File is deployed to resolved symbolic link parent
- Bundle contents is deployed to the wrong parent location when relative path is used
Environment
- JBoss Operations Network (ON) 3.1, 3.1.1, 3.1.2
- JBoss ON provisioning bundle
-
Bundle deployment recipe deploys content above the destination directory utilizing relative paths. For example:
... <rhq:bundle name="My Test Bunlde" version="1.0" description="A sample bundle consisting of some random files"> <rhq:deployment-unit name="Datasource"> <rhq:file name="test.properties" destinationFile="../../conf/test.properties" replace="false"/> <rhq:archive name="files.zip"/> </rhq:deployment-unit> </rhq:bundle> ...
-
Bundle deployment destination contains one or more path elements that is a symbolic link. For example:
$ ls -l ${JBOSS_HOME}/server/${JBOSS_CONF}/deploy lrwxrwxrwx. 1 jbossadmin jboss 20 Mar 4 13:03 /opt/jboss/jboss-eap-5.2.0/jboss-as/server/global/deploy -> /data/apps/eap/global/deploy
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.