Bug 758565 - Add drift templates to JBAS WAR/EAR resources
Add drift templates to JBAS WAR/EAR resources
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
Unspecified Unspecified
high Severity unspecified (vote)
: ---
: RHQ 4.3.0,JON 3.0.0
Assigned To: Jay Shaughnessy
Mike Foley
Depends On:
Blocks: jon30-sprint9
  Show dependency treegraph
Reported: 2011-11-29 23:31 EST by Charles Crouch
Modified: 2015-02-01 18:27 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-02-07 14:22:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
a patch to re-apply the reverted commits and add back embedded WAR support (15.80 KB, patch)
2011-11-30 10:50 EST, Jay Shaughnessy
no flags Details | Diff

  None (edit)
Description Charles Crouch 2011-11-29 23:31:43 EST
Drift template meta data should be added to the JBAS EAR/WAR resources types (via corresponding rhq-plugin.xml) so that users can create drift definitions on resources of those types.
Comment 1 Charles Crouch 2011-11-29 23:32:17 EST
Unfortunately I did not create this bug ahead of time so Jay already has the fix committed into master:


Going forward we should reference this BZ when making commmits into any branch.
Comment 2 Charles Crouch 2011-11-29 23:42:48 EST
As with other recent changes this should be tested in master and test cases documented here.
In order to minimize the amount of change associated with this issue, we should limit it purely to adding the drift template meta data to the appropriate rhq plugin descriptors. The implication of this is that drift on embedded webapps will not be explicitly supported, instead it will be available on the parent EAR resource. In order to ease testing master should be updated as follows:

1) Revert  http://git.fedorahosted.org/git?p=rhq/rhq.git;a=commit;h=8c6dcd3817195f9a0f0d9855b3f7b648bd1ada5d, so that no plugin code changes are needed. 
2) Revert part of http://git.fedorahosted.org/git?p=rhq/rhq.git;a=commit;h=0ad22b15a3f6d5b700bfec506db74f6a20633f21 so that no drift template metadata is specified for embedded web apps.
3) Revert part of http://git.fedorahosted.org/git?p=rhq/rhq.git;a=commit;h=72d6aa5c440900dacaf8f97914ea2e17dea07112 so that no drift template metadata is specified for embedded web apps and no plugin code changes are needed.

The above changes are meant only to reduce the complexity of the current change. Long term the full fix should be pushed to master.
Comment 3 Jay Shaughnessy 2011-11-30 10:50:33 EST
Created attachment 538615 [details]
a patch to re-apply the reverted commits and add back embedded WAR support
Comment 4 Jay Shaughnessy 2011-11-30 10:54:18 EST
OK, reverted the three commits above and added new commit to just add
new templates to EAR/WAR for AS-4 and as-5.  Also, attached a patch 
to this bz that will re-apply the reverted commits when time comes to
add back the support for embedded WARs.

All in Master only:

commit 663c3c65527a5aacbcafead08614e4b416d52fa6

    After reverting the changes to support EAR/WAR/Embedded WAR
    types for AS-4 and AS-5 plugins, this now adds back drift
    templates for EAR and WAR types.  The Embedded WAR support will
    be added back in later, when the repo is open for the plugin
    code changes required to offer that support.

commit 42c78796a8b115058f4f87f2d9f61f1cdec11428

    This reverts commit 8c6dcd3817195f9a0f0d9855b3f7b648bd1ada5d.

commit a481dd1c53a035f9a633551ea982bc70d9e0188b

    This reverts commit 0ad22b15a3f6d5b700bfec506db74f6a20633f21.

commit aa79d1e533ca7a3e216719c933493d8ffef64b6b

    This reverts commit 72d6aa5c440900dacaf8f97914ea2e17dea07112.
Comment 5 John Mazzitelli 2011-11-30 12:00:52 EST
verified this in master after jay's "revert the old commits and commit just the
changes we want to the drift metadata"

we need to cherry pick over to release branch
Comment 6 John Mazzitelli 2011-11-30 12:13:21 EST
cherry pick from master (663c3c65527a5aacbcafead08614e4b416d52fa6) to release branch (b7e1b73df192f483f91dff5831b13d2741cdd165)
Comment 7 John Mazzitelli 2011-11-30 13:14:31 EST
just to be clear how to test this:

Import a JBossAS 4 and 5 app server (I used the RHQ Server as the JbossAS 4 instance, I then started a stock EAP app server for the 5, I made sure I deployed a test .ear inside the 5 instance - for the 4 instance, just use the rhq.ear).

Make sure you can create drift templates for 4 and 5's:

1) EAR resource
2) standalone WAR resource (the stock EAP 5 instance has WAR apps in it)

So you should be able to create 4 drift templates all total.

Note that embedded WARs do not support drift now. We'll add that back in after release since its too late to add that functionality without causing paranoia.
Comment 8 Mike Foley 2012-02-07 14:22:24 EST
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE

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