Bug 1029925 - upgrading a server but installing new agent puts agent in wrong place
upgrading a server but installing new agent puts agent in wrong place
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Installer (Show other bugs)
JON 3.2
Unspecified Unspecified
unspecified Severity unspecified
: ER07
: JON 3.2.0
Assigned To: John Mazzitelli
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-13 09:31 EST by John Mazzitelli
Modified: 2014-01-02 15:43 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-02 15:43:12 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Mazzitelli 2013-11-13 09:31:56 EST
I'm writing this up in a BZ because I am not sure what the correct thing to do is. I think this might be wrong.

1. Install an older version but only install the server (say JON 3.1.2 Server)
2. Unzip a new version (say JON 3.2.ER5)
3. Upgrade the old version  via rhqctl upgrade --from-server-dir=<3.1.2 location>
4. Notice where the agent is installed.

If the 3.1.2 was installed here:

   /opt/jon/3.1.2/jon-server-3.1.2

and the new 3.2 was installed here:

   /opt/jon/3.2

the new agent ended up getting installed here:

   /opt/jon/3.1.2/rhq-agent

Now, notice it got installed in the parent directory of the old server (the old server was in 3.1.2/jon-server-3.1.2, the parent is thus 3.1.2 and therefore the agent went under there).

This doesn't seem right. Should the new agent go under /opt/jon (i.e. /opt/jon/rhq-agent) since the new server's install dir is /opt/jon/3.2 and thus its parent dir is /opt/jon?

Note that the storage node was installed in /opt/jon/rhq-data
Comment 1 Jay Shaughnessy 2013-11-13 09:35:35 EST
Yeah, this seems wrong to me.  I would expect the agent to end up in:

/opt/jon/rhq-agent
Comment 2 John Mazzitelli 2013-11-13 10:26:50 EST
In Upgrade.java, line 623, there is this:

   installAgent(oldAgentDir, rhqctlCommandLine);

Notice it is installing the agent in the old agent location (where we looked for the old agent to be installed).

But if the agent isn't installed there (that is, the old server being upgraded didn't also have an agent installed), then we want to install a new agent in the new expected location. So I think this line needs to change to:

   installAgent(getAgentBasedir(), rhqctlCommandLine);
Comment 3 John Mazzitelli 2013-11-13 11:44:29 EST
master commit: 9e88f665a6306096e4eb556dc0521e11093d0742
release/jon3.2.x commit: d227e1504c6f5ea40b395c76df1fc11bee3d2af0
Comment 4 Simeon Pinder 2013-11-19 10:47:58 EST
Moving to ON_QA as available for testing with new brew build.
Comment 5 Simeon Pinder 2013-11-22 00:13:34 EST
Mass moving all of these from ER6 to target milestone ER07 since the ER6 build was bad and QE was halted for the same reason.

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