Bug 863346 - Plug-in data directories are not preserved during agent auto-update
Summary: Plug-in data directories are not preserved during agent auto-update
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: RHQ Project
Classification: Other
Component: Agent
Version: 4.5
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-05 07:50 UTC by Andreas Veithen
Modified: 2017-03-18 21:13 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-03-18 21:13:51 UTC
Embargoed:


Attachments (Terms of Use)

Description Andreas Veithen 2012-10-05 07:50:36 UTC
According to the Javadoc of PluginContext#getDataDirectory(), the directory returned by that method (which is $RHQ_AGENT_HOME/data/<plug-in name>) is a "Directory where plugins can store persisted data that survives agent restarts".

The obvious expectation is that this remains true even during an auto-update of the agent. In fact, since the auto-update only changes the version of the plug-in container, but not the version of the plug-ins (at least not for custom plug-ins), there is no reason why the plug-in data directories would be reset.

However, the observed behavior during an auto-update (from 3.0.0 to 4.5.1) is that the data directories are moved together with the old agent installation (to $RHQ_AGENT_HOME-OLD) and not restored to the new agent installation.

Comment 1 Heiko W. Rupp 2013-07-01 10:29:02 UTC
Andreas,

after the agent has auto-updated, it will get new(er) plugin versions from the server which also has updated and is (at least for stock RHQ plugins) thus also having newer plugins.
Do I understand you correctly that your custom plugin is staying the same and thus expects to e.g. fetch temporary data from the data/ directory, which has gone?


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