Bug 812493 - Unable to upgrade agent plugins after a server upgrade
Unable to upgrade agent plugins after a server upgrade
Status: CLOSED NEXTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Upgrade (Show other bugs)
JON 3.0.1
i686 Unspecified
urgent Severity urgent
: ---
: JON 3.0.2
Assigned To: John Mazzitelli
Mike Foley
:
Depends On: 813967
Blocks: 818029 818032
  Show dependency treegraph
 
Reported: 2012-04-13 19:42 EDT by David van Balen
Modified: 2013-09-05 22:43 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 813967 (view as bug list)
Environment:
Last Closed: 2013-09-05 22:43:03 EDT
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)
Server log (185.34 KB, text/x-log)
2012-04-17 10:53 EDT, Mike Foley
no flags Details
image of Administration/Agent Page (31.97 KB, image/png)
2012-04-17 11:23 EDT, Mike Foley
no flags Details
image of Administration/Agent/Plugin Page (40.84 KB, image/png)
2012-04-19 18:28 EDT, Charles Crouch
no flags Details

  None (edit)
Description David van Balen 2012-04-13 19:42:44 EDT
Description of problem: After upgrading JON server from 3.0.0.GA to 3.0.1, uploading 3.0.1 versioned agent plugins results in server detecting them, then deleting them as obsolete. The end result is that the 3.0.0.GA plugin still seems to be used rather than the 3.0.1 plugin that was uploaded.


Version-Release number of selected component (if applicable): Upgrading from JON 3.0.0.GA to 3.0.1. Agent successfully auto-updated from 4.2.0.JON300.GA to 4.2.0.JON.3.0.1.GA.


How reproducible: Always


Steps to Reproduce:
1. Given a running JON 3.0.0.GA installation, follow instructions to upgrade server (shut down, unpack new version, start up, go to install page in browser and run install).
2. Given running 4.2.0.JON300.GA agent, with auto-update enabled, allow agent to auto-update after server is successfully upgraded.
3. Once server and agent have been successfully updated, download new 3.0.1 versions of plugins and unpack.
4. Upload 3.0.1 version of tomcat plugin, then click "Scan for Updates" so the server will pick up the new plugin.
5. Upload 3.0.1 version of EAP 5 plugin, then click "Scan for Updates" so the server will pick up the new plugin.
5. You should see something like the following output in the server log (note that the server detects the new plugin, copies it to the appropriate directory, then proceeds to delete it instead of deleting the old version):

19:14:34,291 INFO  [ContainerBase] org.rhq.enterprise.gui.coregui.CoreGUI PluginFileUploadServlet: file was uploaded: jopr-tomcat-plugin-4.2.0.JON.3.0.1.GA.jar
19:14:34,294 INFO  [PluginFileUploadServlet] A new plugin [jopr-tomcat-plugin-4.2.0.JON.3.0.1.GA.jar] has been uploaded to [/tmp/upload__32441646_136ade22675__7ffb_00000003.tmp]
19:14:34,300 INFO  [PluginFileUploadServlet] A new plugin has been deployed [/home/dvb/jboss/server/jon/jon-server-3.0.1.GA/plugins/jopr-tomcat-plugin-4.2.0.JON.3.0.1.GA.jar]. A scan is required now in order to register it.
19:14:56,440 INFO  [PluginDeploymentScanner] Found plugin jar at [/home/dvb/jboss/server/jon/jon-server-3.0.1.GA/plugins/jopr-tomcat-plugin-4.2.0.JON.3.0.1.GA.jar] and placed it at [/home/dvb/jboss/server/jon/jon-server-3.0.1.GA/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/jopr-tomcat-plugin-4.2.0.JON.3.0.1.GA.jar]
19:14:57,774 INFO  [AgentPluginScanner] Deleted an obsolete agent plugin file: /home/dvb/jboss/server/jon/jon-server-3.0.1.GA/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/jopr-tomcat-plugin-4.2.0.JON.3.0.1.GA.jar
19:21:41,070 INFO  [ContainerBase] org.rhq.enterprise.gui.coregui.CoreGUI PluginFileUploadServlet: file was uploaded: jopr-jboss-as-5-plugin-4.2.0.JON.3.0.1.GA.jar
19:21:41,078 INFO  [PluginFileUploadServlet] A new plugin [jopr-jboss-as-5-plugin-4.2.0.JON.3.0.1.GA.jar] has been uploaded to [/tmp/upload__32441646_136ade22675__7ffb_00000007.tmp]
19:21:41,086 INFO  [PluginFileUploadServlet] A new plugin has been deployed [/home/dvb/jboss/server/jon/jon-server-3.0.1.GA/plugins/jopr-jboss-as-5-plugin-4.2.0.JON.3.0.1.GA.jar]. A scan is required now in order to register it.
19:21:46,044 INFO  [PluginDeploymentScanner] Found plugin jar at [/home/dvb/jboss/server/jon/jon-server-3.0.1.GA/plugins/jopr-jboss-as-5-plugin-4.2.0.JON.3.0.1.GA.jar] and placed it at [/home/dvb/jboss/server/jon/jon-server-3.0.1.GA/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/jopr-jboss-as-5-plugin-4.2.0.JON.3.0.1.GA.jar]
19:21:47,456 INFO  [AgentPluginScanner] Deleted an obsolete agent plugin file: /home/dvb/jboss/server/jon/jon-server-3.0.1.GA/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/jopr-jboss-as-5-plugin-4.2.0.JON.3.0.1.GA.jar

  
Actual results: Newly installed agent plugin is deleted after it is detected and copied to the appropriate location.


Expected results: Old version of the plugin is deleted as obsolete and newly installed agent plugin is preserved.


Additional info: A workaround would appear to be deleting the old plugin via the filesystem before uploading the new one.
Comment 1 Mike Foley 2012-04-17 10:19:06 EDT
documenting that i am encountering a BZ while attempting to repro this.

after step #1 ... i am uploading some JON 3.0 agent plug-ins.  the UI is now allowing me to upload 1 plug-in ...but not a 2nd plug-in. 

https://bugzilla.redhat.com/show_bug.cgi?id=813335
Comment 2 Mike Foley 2012-04-17 10:52:45 EDT
Attempting to repro ... attaching my server log.
Comment 3 Mike Foley 2012-04-17 10:53:26 EDT
Created attachment 578065 [details]
Server log
Comment 4 Mike Foley 2012-04-17 10:56:00 EDT
Copying a relevant snippet from my server log below 

2012-04-17 10:50:47,898 INFO  [org.rhq.enterprise.server.core.plugin.AgentPluginScanner] Deleted an obsolete agent plugin file: /root/rhq/BZ812493/JON301/jon-server-3.0.1.GA/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/jopr-jboss-as-plugin-4.2.0.JON.3.0.1.GA.jar

I believe this documents repro of the issue.  I see the 3.01 plugin being identified and deleted as obsolete (incorrect).
Comment 5 Mike Foley 2012-04-17 11:22:27 EDT
attaching an image that shows Administration/Agent Plug-ins page ...

this image shows ...based on the timestamp only ... that the plugin update did not occur.  

other than this ... there is no visual indication that the upgrade of the plug-in failed ...  silent failure of the plugin upgrade?
Comment 6 Mike Foley 2012-04-17 11:23:06 EDT
Created attachment 578074 [details]
image of Administration/Agent Page
Comment 7 Mike Foley 2012-04-17 11:38:21 EDT
for reference, i am adding a link to the JON 3.01 upgrade documentation

http://docs.redhat.com/docs/en-US/JBoss_Operations_Network/3.0/html/Installation_Guide/upgrading.html

for the purpose of comparing what is documented ... vs the repro steps above
Comment 8 John Mazzitelli 2012-04-19 16:58:32 EDT
git commit to release/jon3.0.x branch: 8b6e8222c0eb1806066c007c0d9adcf0047169b2
Comment 9 John Mazzitelli 2012-04-19 17:54:37 EDT
i'm putting this back to on_dev  - I will be putting in some quick testing steps in here. somethign like:

 If I have jon3.0.0, please do...

 If you have jon3.0.1. please do ...

sets of instructions when upgrading
Comment 10 Charles Crouch 2012-04-19 18:28:06 EDT
Created attachment 578799 [details]
image of Administration/Agent/Plugin Page
Comment 11 John Mazzitelli 2012-04-20 10:55:59 EDT
git commit to release/jon3.0.x branch cb95ea1
Comment 12 John Mazzitelli 2012-04-20 11:03:02 EDT
git commit to release/3.0.x : 8a5a842 (messed up a test version string for 3.0.2 - this fixes the test so we match exactly what we will be using)
Comment 13 John Mazzitelli 2012-04-20 11:47:12 EDT
(In reply to comment #9)
>  If I have jon3.0.0, please do...

If you have JON 3.0.0 or earlier versions and you are just now upgrading with 3.0.1 (that includes the patch code for this BZ), then there is nothing special you have to do. If you are upgrading to JON 3.0.2 or later, just follow the normal upgrade procedures. If you have the old 3.0.1 distro (with the bug described in this BZ) and you want to install it, you must also install whatever patch provided for this BZ (if there is one) FIRST, that is BEFORE you run 3.0.1. So, unzip 3.0.1, apply the patch code (again, if there is one - it must include the new core/util jar file because to patch this BZ requires a new core/util jar) and only then run the 3.0.1 server.
Comment 14 David van Balen 2012-04-20 12:18:08 EDT
Does the JON 3.0.1 download that's on the CSP now include this patch?
Comment 15 John Mazzitelli 2012-04-20 12:19:23 EDT
(In reply to comment #9)
>  If you have jon3.0.1. please do ...

If you have already attempted to install 3.0.1, the plugins will not actually have been updated (which is what this BZ is reporting). When this happens, if you navigate to the Admin>Agent Plugins page and look at each individual plugin, the version will still say 4.2.0.JON300.GA.

The easiest way to correct this is to re-install 3.0.1 as you normally would, but then you must install the patch for this BZ prior to running the new 3.0.1.

This means unzipping the original 3.0.1 distro into a new, clean directory where the 3.0.1 is to be newly installed and installing any additional plugin packs you have, such as the 3.0.1 EAP plugin pack. In other words, just do the installation steps normally. BUT! Before you start your new 3.0.1 server REMEMBER to apply the patch you received to fix this BZ (which will include a new core/util jar) PRIOR to running that newly installed 3.0.1 server.  Once the patch is installed, you can run 3.0.1 normally.
Comment 16 John Mazzitelli 2012-04-20 12:19:51 EDT
(In reply to comment #14)
> Does the JON 3.0.1 download that's on the CSP now include this patch?

no, nothing has been published or built yet.
Comment 20 Larry O'Leary 2013-09-05 22:43:03 EDT
Closing as there will not be a 3.0.2 release. This issue has already been fixed in a later release or will be fixed in 3.2. See 'depends on' list for reference.

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