Bug 646631 (EMBJOPR-366)
Summary: | Update farmed Application Deployment (EAR/WAR) results in non-farmed deployment | ||||||
---|---|---|---|---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Larry O'Leary <loleary> | ||||
Component: | Plugins | Assignee: | Stefan Negrea <snegrea> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | urgent | ||||||
Version: | 4.2 | CC: | asantos, ccrouch, enagai, mazz | ||||
Target Milestone: | --- | ||||||
Target Release: | RHQ 4.5.0 | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 824498 824502 (view as bug list) | Environment: |
JON 2.4
EAP 5.0.1 admin-console
|
||||
Last Closed: | 2013-08-31 09:56:34 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | 820650 | ||||||
Bug Blocks: | 625146, 782579, 795918, 824502 | ||||||
Attachments: |
|
Description
Larry O'Leary
2010-10-25 19:20:46 UTC
This issue also appears to be the direct cause of https://issues.jboss.org/browse/JBPAPP-8084 unassigning from Ian as he's focused on EAP6 http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/5/html/Administration_And_Configuration_Guide/clustering-intro.chapt.html#clustering-quickstart for setting up a cluster. but... 03:05:01 PM) loleary: No need for an actual cluster... (03:06:07 PM) loleary: Basically... deploy farmed and confirm the app shows up in ${JBOSS_CONF}/farmed (03:06:29 PM) loleary: Then, re-deploy and you will see it get moved from ${JBOSS_CONF}/farmed to ${JBOSS_CONF}/deploy A cluster is not necessary to confirm the bad behavior of WAR/EAR being deployed to farmed and then re-deployed to deploy, but for testing, an easy way to setup a two node cluster is: Install EAP 5 as normal Copy all or production configuration to server1 and server2 Be sure to enable admin account (jmx-console-users.properties) for server1 and serer2 Then start server1 as normal # Start EAP server1 # EAP 5.1.2 PRODDIST_BRANCH="origin/jboss-eap-5.1.2" pushd "${TESTENV_DIR}/$(basename ${PRODDIST_BRANCH})/jboss-as" \ && rm -rf server/server1/log \ && cd bin \ && ./run.sh -c server1 -b 0.0.0.0 & Then start server2 using a different port number and ServerPeerID # Start EAP server2 # EAP 5.1.2 PRODDIST_BRANCH="origin/jboss-eap-5.1.2" pushd "${TESTENV_DIR}/$(basename ${PRODDIST_BRANCH})/jboss-as" \ && rm -rf server/server1/log \ && cd bin \ && ./run.sh -c server2 -b 0.0.0.0 -Djboss.service.binding.set=ports-01 -Djboss.messaging.ServerPeerID=1 & Created attachment 578137 [details]
stack trace
not only did I see the file get deployed to deploy/ and removed from farm/ but I also got the attached exception.
looks like we need to do the same thing that org.rhq.plugins.jbossas5.deploy.ManagedComponentDeployer.deploy(CreateResourceReport, ResourceType) does - it appears to switch to farm mode, then deploys: DeploymentManager deploymentManager = this.profileServiceConnection.getDeploymentManager(); boolean deployFarmed = deployTimeConfig.getSimple("deployFarmed").getBooleanValue(); if (deployFarmed) { Collection<ProfileKey> profileKeys = deploymentManager.getProfiles(); boolean farmSupported = false; for (ProfileKey profileKey : profileKeys) { if (profileKey.getName().equals(FARM_PROFILE_KEY.getName())) { farmSupported = true; break; } } if (!farmSupported) { throw new IllegalStateException("This application server instance is not a node in a cluster, " + "so it does not support farmed deployments. Supported deployment profiles are " + profileKeys + "."); } if (deployExploded) { throw new IllegalArgumentException( "Deploying farmed applications in exploded form is not supported by the Profile Service."); } deploymentManager.loadProfile(FARM_PROFILE_KEY); } String[] deploymentNames; try { deploymentNames = DeploymentUtils.deployArchive(deploymentManager, archiveFile, deployExploded); } finally { // Make sure to switch back to the 'applications' profile if we switched to the 'farm' profile above. if (deployFarmed) { deploymentManager.loadProfile(APPLICATIONS_PROFILE_KEY); } } git commit to master 951ddce Mazz, I am reassigning this to you as it fails due to package names not matching. It appears this might be related to the content version hash that is auto-generated and ends up in the file's name. Setting Assigned To correctly The AS5 deployer uses the file name as-is to determine the name of the app to be updated/deployed. Instead of adding the random UUID to the archive to be deployed, add the random UUID to a temp folder name and then download content there (leaving the file name unchanged). This issue has been fixed for both farmed and non-farmed deployments. Another update was to switch to the farm version of the AS5 deployer prior to stopping and deleting existing content. The switch to a farm deployer was happening too late (prior to deployment) and was not stopping and removing the farmed application prior to the new deployment. master branch commits: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=b458447208ec5207eea6f29eaafcd3ca9e5371a6 http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=c3bbd873832ec7df6d9db4b24190fabad7d1b48f Update farmed Application Deployment (EAR/WAR) from JBoss ON GUI console was available (4:21:56 PM) ccrouch: ips: how come you set the Target Release of https://bugzilla.redhat.com/show_bug.cgi?id=646631 to be RHQ4.3? (4:22:19 PM) ccrouch: i think it should be 4.5, given stefan_n's commits https://bugzilla.redhat.com/show_bug.cgi?id=646631#c19 (4:24:40 PM) ips: yeah, you're right, i misread the date on his commits (4:25:05 PM) ccrouch: ok, i'll reset it Ian Springer <ian.springer> made a comment on jira EMBJOPR-366 I tried cherry-picking the three commits for bug 646631 to the AdminConsole_EAP_5_1 branch. Mazz's commit merged cleanly, but Stefan's two commits had a lot of conflicts, due to so much time passing since AdminConsole_EAP_5_1 was forked. To fix this, we'll either need to manually fix all those conflicts or upgrade the version of RHQ used by the AdminConsole_EAP_5_1 EmbJopr branch to 4.4 or 4.5. Stefan Negrea <snegrea> made a comment on jira EMBJOPR-366 Cherry-picked the two commits to AdminConsole_EAP_5_1. I only merged changes relevant to farmed deployments. AdminConsole_EAP_5_1 branch commits: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=8a9c9cbdb14665c4a98dc2c74275a91fe4a9cf0b http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=83656e08b3fec3ffbc877e2603641af59ff24d7f Larry O'Leary <loleary> updated the status of jira EMBJOPR-366 to Resolved Larry O'Leary <loleary> made a comment on jira EMBJOPR-366 Committed to release branch for 1.3.4.SP6 as per https://issues.jboss.org/browse/EMBJOPR-366?focusedCommentId=12703452&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12703452 Larry O'Leary <loleary> updated the status of jira EMBJOPR-366 to Closed |