Red Hat Bugzilla – Bug 812493
Unable to upgrade agent plugins after a server upgrade
Last modified: 2013-09-05 22:43:03 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.
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.
Attempting to repro ... attaching my server log.
Created attachment 578065 [details]
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).
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?
Created attachment 578074 [details]
image of Administration/Agent Page
for reference, i am adding a link to the JON 3.01 upgrade documentation
for the purpose of comparing what is documented ... vs the repro steps above
git commit to release/jon3.0.x branch: 8b6e8222c0eb1806066c007c0d9adcf0047169b2
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
Created attachment 578799 [details]
image of Administration/Agent/Plugin Page
git commit to release/jon3.0.x branch cb95ea1
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)
(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.
Does the JON 3.0.1 download that's on the CSP now include this patch?
(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.
(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.
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.