Bug 749470 - RFE: Enable the resource upgrade to modify plugin and resource configurations of existing resources
RFE: Enable the resource upgrade to modify plugin and resource configurations...
Product: RHQ Project
Classification: Other
Component: Agent, Core Server (Show other bugs)
Unspecified Unspecified
medium Severity medium (vote)
: ---
: RHQ 4.5.0
Assigned To: RHQ Project Maintainer
Mike Foley
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2011-10-27 03:25 EDT by Lukas Krejci
Modified: 2013-09-12 17:03 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-12 17:03:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Lukas Krejci 2011-10-27 03:25:11 EDT
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:

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 17:03:40 EDT
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.