Bug 1017387

Summary: Upgrade to 3.2 fails if there is no agent to upgrade
Product: [JBoss] JBoss Operations Network Reporter: Jay Shaughnessy <jshaughn>
Component: UpgradeAssignee: Jay Shaughnessy <jshaughn>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: unspecified    
Version: JON 3.2CC: fbrychta, spinder
Target Milestone: ER04   
Target Release: JON 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jay Shaughnessy 2013-10-09 18:49:04 UTC
Upgrading to 3.2 fails if the user is upgrading only a server.  Typically there is a legacy agent involved in the upgrade; specified with --from-agent-dir or already in the default location.  But it is not required, users electing not to monitor their JON server may not have installed an agent local to their server.

Actual:
Failure reported and the storage and serve upgrades are reverted.

Expected:
An new agent should be installed if no agent is specified or found.

Comment 1 Jay Shaughnessy 2013-10-09 18:55:08 UTC
The following commits fix the issue.

commit 8f17c431d083a9e1c74db3038cec768b1ca2dfb6
Author: Jay Shaughnessy <jshaughn>
Date:   Wed Oct 9 13:10:04 2013 -0400

    Fix merge issue

commit 92651ca1b4793058343e020fbc305fc125efe23e
Author: Jay Shaughnessy <jshaughn>
Date:   Wed Oct 9 10:32:14 2013 -0400

    Upgrading to rhq410/jon32 would fail, and revert, if there were no agent
    to upgrade.  For a server only installation the user would not
    specify --from-agent-dir and also there was no rhq-agent dir at the sibling
    position to the server install dir.  This would cause the failure with
    the upgrade complaining there was no agent to upgrade.

    Now a new agent will be installed in this situation, as part of the upgrade.



If backporting we may also want due to the same code being modified:

commit 79402bca21950384646860ae1493d250cda076c3
Author: John Mazzitelli <mazz>
Date:   Tue Oct 8 17:15:18 2013 -0400

    BZ 1016885 - log messages when undo tasks are triggered

Comment 2 Simeon Pinder 2013-10-11 14:55:55 UTC
Hi Jay, this is OK'd for ER4. Please cherry-pick this to release/jon3.2.x for ER4.

Moving back to ASSIGNED, since the fix is not actually in the release branch yet.

Comment 3 Jay Shaughnessy 2013-10-12 03:14:39 UTC
release/jon3.2.x commit a11fb30850a0b0a5209d323c8bcf1c7805a3079e

  cherry pick of 79402bca21950384646860ae1493d250cda076c3


release/jon3.2.x commit 090c3c230186d751b510ba6d37f21acc869ef689

  cherry pick of 92651ca1b4793058343e020fbc305fc125efe23e


release/jon3.2.x commit 2c2b97dd5478a7a8704bd89480fb5f9382e083eb

  cherry pick of 8f17c431d083a9e1c74db3038cec768b1ca2dfb6

Comment 4 Simeon Pinder 2013-10-24 04:10:32 UTC
Moving to ON_QA for testing in the next build.

Comment 5 Filip Brychta 2013-10-31 16:22:40 UTC
Verified on
Version: 3.2.0.ER4
Build Number: e413566:057b211