Bug 749470 - RFE: Enable the resource upgrade to modify plugin and resource configurations of existing resources
Summary: RFE: Enable the resource upgrade to modify plugin and resource configurations...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Agent, Core Server
Version: 4.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: RHQ 4.5.0
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-27 07:25 UTC by Lukas Krejci
Modified: 2013-09-12 21:03 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-09-12 21:03:40 UTC
Embargoed:


Attachments (Terms of Use)

Description Lukas Krejci 2011-10-27 07:25:11 UTC
Description of problem:
Consider the following scenario. We have an old version of a plugin and a bunch of resources in the inventory that have a resource type coming from that plugin.

Now a new version of the plugin comes in, where the resource type in question defines some new required properties. These properties are assigned values during (auto)discovery.

But what happens when the server upgrades the plugin? The required properties are required to have the default values (which are hardcoded in the plugin descriptor) and the server uses these default values to populate the plugin/resource configurations of the resources that existed before the plugin upgrade.

But what that means? The default values will most possibly be just a non-sensical placeholder, because a sensible value can only be determined by running the discovery code. Therefore the "old" resources will have to be manually visited by the RHQ users and the new required properties manually updated to have values that would otherwise be automagically provided.

How reproducible:
always

Steps to Reproduce:
1. Install RHQ 1.3.x, inventory an Apache server
2. Upgrade to RHQ 4, keeping the database

  
Actual results:
DocumentRoot and other properties in the resource/plugin configuration of the inventoried apache server are going to have placeholder values.

Expected results:
These values are perfectly auto-detectable using the discovery code, so ideally the upgrade of an existing resource should have the possibility to assign a meaningful value to these props.

Additional info:
The only thing we need to consider here is the core principle of RHQ, that the server is the ultimate source of the configuration. By allowing the plugins to change the configurations one would think we would be breaking that principle.
In my opinion that is not entirely true. When the plugin would try to upgrade the plugin/resource configuration, it would do it for very specific reasons - namely to allow the resource to function with the new version of the plugin, which can potentially require a) new required properties, b) different format of existing properties, c) rename some properties, etc. 
All these scenarios are easily imaginable but are impossible to handle without tedious user intervention (tedious = read the manual of the plugin and figure out what values should be entered where by examining the configuration of the underlying managed resource).
Even if we decided not to let the plugins upgrade the "whole" configurations, they still *should* have the possibility to provide runtime-detected defaults to the new properties - the user did not have a chance to provide a value to those yet.

Comment 2 Jay Shaughnessy 2013-09-12 21:03:40 UTC
The plugin config portion of this RFE has already been done for Bug 974876.  I'm closing this as CURRENTRELEASE.  We can open a new RFE for just the resource config portion if necessary.


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