Bug 965827 - /etc/openshift/env/PATH is not replaced on upgrade, leading to garbage default PATH
/etc/openshift/env/PATH is not replaced on upgrade, leading to garbage defaul...
Status: CLOSED DUPLICATE of bug 965357
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jhon Honce
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-21 15:58 EDT by Andy Grimm
Modified: 2016-11-07 22:47 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-05-21 17:04:35 EDT
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 Andy Grimm 2013-05-21 15:58:47 EDT
Description of problem:
If a gear does not have .env/PATH defined, the default PATH is ":export PATH=/bin:/usr/bin:/usr/sbin", which is not very useful.

Version-Release number of selected component (if applicable):
rubygem-openshift-origin-node-1.9.3-1.el6oso

How reproducible:
Always

Steps to Reproduce:
1. create an app (on the INT OpenShift right now).
2. rhc ssh <appname>
3. try to run "ls"


Actual results:
Connecting to <app-uuid>@<domain> ...
bash: cat: command not found
bash: cat: command not found
[\> ls
bash: ls: command not found
[\> echo $PATH
:export PATH=/bin:/usr/bin:/usr/sbin


Expected results:
PATH should be sane


Additional info:
/etc/openshift/env/PATH recently changed from "export PATH=/bin:/usr/bin:/usr/sbin" to "/bin:/usr/bin:/usr/sbin", which is necessary due to how rhcsh reads the file.  However, this file is marked as "%config(noreplace)" in the RPM, so it does not get upgraded.

The old format causes a problem because rhcsh reads the file like this:

    if [ -f /etc/openshift/env/PATH ]
    then
        path=$path:$(< /etc/openshift/env/PATH)
    fi
    export PATH=$path

rather than as shell code.
Comment 1 Jhon Honce 2013-05-21 17:04:35 EDT
Same root cause

*** This bug has been marked as a duplicate of bug 965357 ***

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