Bug 1026399

Summary: Windows 2008 - Unable to install the agent to different disk drive
Product: [JBoss] JBoss Operations Network Reporter: Filip Brychta <fbrychta>
Component: InstallerAssignee: Jay Shaughnessy <jshaughn>
Status: CLOSED NOTABUG QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: JON 3.2CC: fbrychta, jshaughn, myarboro
Target Milestone: ER06   
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: 2013-11-05 09:09:17 UTC 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:
Bug Depends On:    
Bug Blocks: 1012435    

Description Filip Brychta 2013-11-04 14:48:27 UTC
Description of problem:
Setting rhq.agent.basedir in rhqctl.properties to different disk drive causes installer failure.

Version-Release number of selected component (if applicable):
Version: 3.2.0.ER4
Build Number: e413566:057b211

How reproducible:
Always

Steps to Reproduce:
1. Setup a Windows system (Windows Server 2008) that has a secondary/additional disk drive (E:). 
2. unzip jon-server-3.2.0.ER4.zip to c:\opt
3. set rhq.agent.basedir in rhqctl.properties to e:\opt\jboss\jon
4, rhqctl install

Actual results:
Installer output:
(start)
01:31:24,862 INFO  [org.rhq.server.control.command.Install] Configuring the RHQ
agent with default configuration file: e:optjbossjon\conf\agent-configuration.xm
l
01:31:24,862 ERROR [org.rhq.server.control.command.Install] An error occurred wh
ile configuring the agent: e:optjbossjon\conf\agent-configuration.xml (The syste
m cannot find the path specified)
(end)

rhq.agent.basedir in rhqctl.properties is malformed to rhq.agent.basedir = e:optjbossjon

Expected results:
Agent is installed to e:\opt\jboss\jon without errors

Additional info:
This corner scenario was used to set up environment for bug 903402

Comment 1 Filip Brychta 2013-11-04 15:42:15 UTC
Workaround:
use following path rhq.agent.basedir = e:\\opt\\jboss\\jon

Installation was finished successfully but the agent was not installed. I can see

02:31:07,004 INFO  [org.rhq.server.control.command.Install] The RHQ agent is alr
eady installed in [e:\opt\jboss\jon]. It will not be installed. 

But e:\opt\jboss\jon is empty. How does this check work?

Comment 2 Jay Shaughnessy 2013-11-04 16:59:30 UTC
The problem here is using backslashes in a properties file.  With forward slashes you should not have a problem.  Or with the escaped backslashes, as you tried above.

From the wiki: https://docs.jboss.org/author/display/RHQ/RHQ+Control+Script

"Values are treated like Java strings. So:
  - Use forward slashes where possible, especially in directory or file paths (including Windows!). For example: /var/lib or C:/my/folder.
  - If you need an explicit backslash, escape it using a double-backslash.
"

I will also add this to the Windows specific page: 


As for the agent installation test, it looks only for the agent base directory. So, if it finds it, even if empty, it will assume the agent is already installed.


I don't think any code changes are required, please retest or let me know otherwise. Thanks, Jay. (assigning to myself for any future action, but setting to NeedInfo)

Comment 3 Filip Brychta 2013-11-05 09:09:17 UTC
Thank you for info Jay. Forward slashes work and the agent was installed. Closing as NOTABUG