Bug 822905 - Resource upgrade never disabled if agent started in offline mode
Summary: Resource upgrade never disabled if agent started in offline mode
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugin Container
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: RHQ 4.5.0
Assignee: Lukas Krejci
QA Contact: Mike Foley
URL:
Whiteboard:
: 822483 (view as bug list)
Depends On:
Blocks: 822955
TreeView+ depends on / blocked
 
Reported: 2012-05-18 13:18 UTC by Lukas Krejci
Modified: 2013-08-31 10:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 822955 (view as bug list)
Environment:
Last Closed: 2013-08-31 10:11:26 UTC
Embargoed:


Attachments (Terms of Use)

Description Lukas Krejci 2012-05-18 13:18:01 UTC
Description of problem:

If the agent is started before any of the server in the failover list, it is going to start in offline mode.

During the the resource upgrade phase during inventory manager startup we try to sync with the server to get the latest inventory state. That call fails with an exception which prevents the resource upgrade to disable itself.

This in turn has several side-effects throughout the inventory manager, one of them being that no resource can ever enter a synchronized state. Availability is collected only for the synchronized resources and thus is never collected for any resource until the plugin container is restated while at least one of the servers is online even if the availability check is manually invoked using the 'avail' prompt command.

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


How reproducible:
always

Steps to Reproduce:
1. Start an agent prior to starting any of the servers
2. Start a server
3. Import a resource
  
Actual results:
The newly imported resource remains in unkown state until the agent (or at least the plugin container) is restarted

Expected results:
The availability collection works normally

Additional info:

Comment 1 Filip Brychta 2012-05-18 15:10:10 UTC
*** Bug 822483 has been marked as a duplicate of this bug. ***

Comment 2 Lukas Krejci 2012-05-18 15:41:14 UTC
master http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=43770f14dd308618f47b4d2940366cb86082aef0
Author: Lukas Krejci <lkrejci>
Date:   Fri May 18 13:43:21 2012 +0200

    [BZ 822880] - Make sure to NOT discard any pending DB changes before
    masking the configuration.

Comment 3 Lukas Krejci 2012-05-18 15:44:21 UTC
Disregard the previous commit hash, I copied over a wrong one.

master http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=5ebacc87cb292004186c0b8f6876e00649b18391
Author: Lukas Krejci <lkrejci>
Date:   Fri May 18 15:30:19 2012 +0200

    [BZ 822905] - Make sure to always disable the resource upgrade after it
    has finished, even after a failure.

Comment 4 Lukas Krejci 2012-05-22 10:23:21 UTC
master http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=5e5b9d9581e18b389046753b3c5e8d03067da42f
Author: Lukas Krejci <lkrejci>
Date:   Tue May 22 12:07:02 2012 +0200

    [BZ 822905] - modified the unit tests for checking that the resource upgrade
    is actually disabled after resource upgrade.

Comment 5 Filip Brychta 2013-02-22 15:28:15 UTC
Verified on 
Version: 4.6.0-SNAPSHOT
Build Number: 6f71c2d

Comment 6 Heiko W. Rupp 2013-08-31 10:11:26 UTC
Bulk close of old bugs in VERIFIED state.


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