Bug 822905 - Resource upgrade never disabled if agent started in offline mode
Resource upgrade never disabled if agent started in offline mode
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Plugin Container (Show other bugs)
4.4
Unspecified Unspecified
unspecified Severity urgent (vote)
: ---
: RHQ 4.5.0
Assigned To: Lukas Krejci
Mike Foley
:
: 822483 (view as bug list)
Depends On:
Blocks: 822955
  Show dependency treegraph
 
Reported: 2012-05-18 09:18 EDT by Lukas Krejci
Modified: 2013-08-31 06:11 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 822955 (view as bug list)
Environment:
Last Closed: 2013-08-31 06:11:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Lukas Krejci 2012-05-18 09:18:01 EDT
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 11:10:10 EDT
*** Bug 822483 has been marked as a duplicate of this bug. ***
Comment 2 Lukas Krejci 2012-05-18 11:41:14 EDT
master http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=43770f14dd308618f47b4d2940366cb86082aef0
Author: Lukas Krejci <lkrejci@redhat.com>
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 11:44:21 EDT
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@redhat.com>
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 06:23:21 EDT
master http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=5e5b9d9581e18b389046753b3c5e8d03067da42f
Author: Lukas Krejci <lkrejci@redhat.com>
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 10:28:15 EST
Verified on 
Version: 4.6.0-SNAPSHOT
Build Number: 6f71c2d
Comment 6 Heiko W. Rupp 2013-08-31 06:11:26 EDT
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.