Bug 863092 - The state of the Plugin Container not consistent during resource upgrade
The state of the Plugin Container not consistent during resource upgrade
Status: NEW
Product: RHQ Project
Classification: Other
Component: Agent (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
Depends On: 855744
  Show dependency treegraph
Reported: 2012-10-04 08:21 EDT by Lukas Krejci
Modified: 2012-11-23 10:38 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
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 2012-10-04 08:21:21 EDT
Description of problem:

Resource upgrade is a stage during the Plugin Container startup where the InventoryManager goes through the freshly synced inventory and asks the individual resource components to upgrade their resource key (and possibly other things in the future) to a version compatible with the currently deployed version of the respective plugin.

The problem with this approach is that this happens during the InventoryManager initialization when the rest of the container services are not yet initialized and fully started up.

So if the resource component's start() method is called during resource upgrade and for example tries to use the EventContext or InventoryContext, the calls to these will most possibly fail because the backing container service managers haven't been initialized (they have been instantiated though).

We should consider modifying the startup sequence and/or the resource upgrade workflow for it a) run after the whole PC was initialized and b) before any of the actual subsystems start their work.

This is possibly going to require making some methods unavailable during the upgrade phase (throwing exceptions if in invalid state) but bug 855744 could bring a solid model of PCs lifecycle which the plugins could be made aware of and therefore could react accordingly.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Install RHQ 3.0.0, inventory an Apache server using it
2. Upgrade to RHQ 4.6.0-SNAPSHOT
3. Do plugins update on the agent prompt or restart the agent
4. Watch the agent.log for errors during resource upgrade
Actual results:
errors in the agent log notifying about problems during resource upgrade

Expected results:
no errors

Additional info:

The agent WILL successfully start up despite the errors

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