Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1130171

Summary: Remote agent installation failed if we set java environment path only in ssh user's local env
Product: [JBoss] JBoss Operations Network Reporter: Jeeva Kandasamy <jkandasa>
Component: UIAssignee: Michael Burman <miburman>
Status: CLOSED WONTFIX QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: JON 3.3.0CC: fbrychta, jshaughn, loleary, miburman, mmurray, myarboro, spinder
Target Milestone: ---   
Target Release: JON 3.3.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
Because remote agent installation is executed directly, and not through a shell, any environment variables (such as the JAVA_HOME) set automatically in a user's local environment are not available for execution on the remote agent's machine. To work around the issue, make sure the Java environment path is set on the remote agent before attempting the upgrade. If the sshd_config allows "PermitUserEnvironment", then it is possible to add to the users ~/.ssh/environment user specific environment variables that are available in the session.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-07 19:42:06 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:
Attachments:
Description Flags
server.log none

Description Jeeva Kandasamy 2014-08-14 13:27:29 UTC
Created attachment 926778 [details]
server.log

Description of problem:
Seems java SSH connection does not include ssh user's local environment variables in their path, hence if we extract java some where and include the path in ssh user's local path doesn't not work. Remote agent installation gets failed.

Version-Release number of selected component (if applicable):
JBoss Operations Network
Version : 3.3.0.DR01
Build Number : 6468454:dda0a47
GWT Version : 2.5.0
SmartGWT Version : 3.0p

How reproducible:
always

Steps to Reproduce:
1. On remote machine, do not install java with yum
2. extract java bin file
3. Set environment path in ~/.bash_profile
4. Install remote agent on remote machine(in step #1)


Additional info: server.log is attached

Comment 2 Michael Burman 2014-08-18 11:16:31 UTC
This is expected behaviour as we use remote commands through ChannelExec (meaning we execute all the ssh commands using bash -c). bash -c on the other hand skips .bashrc from executing. This is pretty normal way of executing commands on the remote machine, so I'm wondering if we really do want to change the behaviour?

Comment 5 Simeon Pinder 2014-09-29 08:12:44 UTC
Moving into ER05 as didn't make the ER04 cut.

Comment 12 Simeon Pinder 2015-01-19 20:52:54 UTC
Moving into CR01 target milestone as missed ER01 cutoff.

Comment 18 Larry O'Leary 2016-01-07 19:42:06 UTC
As this feature was pushed out prematurely and the product has left its full support phase, there are no plans to address this issue.

If you have run across this issue and can not address it in the user's profile or as a system wide configuration setting, a script server solution may be used which will allow you to invoke ssh and scp type commands from another platform to push the agent binary out to platforms that are not yet managed.