Bug 1399052

Summary: HOME envirionment variable must not have / in the end
Product: OpenShift Online Reporter: Sangyong Gwak <imyaman>
Component: ocAssignee: Rory Thrasher <rthrashe>
Status: CLOSED WONTFIX QA Contact: Xingxing Xia <xxia>
Severity: low Docs Contact:
Priority: unspecified    
Version: 2.xCC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-31 18:22:11 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:

Description Sangyong Gwak 2016-11-28 07:38:33 UTC
Description of problem:
$HOME has '/' in the end. It must not have '/' in the end.

[perldancer2openshift-imyaman.rhcloud.com ~]\> echo $HOME
/var/lib/openshift/583bbd1a89f5cf56a100000f    <- right
/var/lib/openshift/583bbd1a89f5cf56a100000f/   <- not right


Version-Release number of selected component (if applicable):


How reproducible: everytime


Steps to Reproduce:
1.rhc ssh -a perldancer2openshift
2.(after login) echo $HOME
3.you see "/var/lib/openshift/583bbd1a89f5cf56a100000f/"

Actual results:
"/var/lib/openshift/583bbd1a89f5cf56a100000f/"

Expected results:
"/var/lib/openshift/583bbd1a89f5cf56a100000f"

Additional info:

Comment 1 Rory Thrasher 2016-11-30 20:11:47 UTC
Hi there Sangyong,

Why does the HOME variable need to not have a trailing slash?  If I recall correctly, any number of successive slashes (except for // at the beginning in some rare cases) should be treated as if it were a single slash.

So `ls /home/thrasher/` and `ls /home/thrasher//` are the same.

Where is the trailing slash causing a problem for you?


Rory

Comment 2 Eric Paris 2017-05-31 18:22:11 UTC
We apologize, however, we do not plan to address this report at this time. The majority of our active development is for the v3 version of OpenShift. If you would like for Red Hat to reconsider this decision, please reach out to your support representative. We are very sorry for any inconvenience this may cause.

Comment 3 Sangyong Gwak 2017-06-01 01:09:33 UTC
Thank you for replies. I'm sorry for late respond. This is not urgent problem. 

But... most documents explains like this.
cd $HOME/.ssh
if [ -d $HOME/.ssh ] ; 

We don't use 
cd $HOME.ssh
if [ -d $HOME.ssh ] ; 

Because it is common that $HOME doesn't have / in the end.

And tests like this will fail.
if [ "$HOME/.ssh" == "/home/imyaman/.ssh" ] ;