Bug 980820 - [origin_runtime_card163] App creation will be interrupted if modified the PATH env for the cartridge
[origin_runtime_card163] App creation will be interrupted if modified the PAT...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Jhon Honce
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-03 06:00 EDT by Meng Bo
Modified: 2015-05-14 19:22 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-29 08:48:02 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 Meng Bo 2013-07-03 06:00:09 EDT
Description of problem:
Create app with my custom cartridge which modified the PATH value by adding   PATH file under env/. with other content. The app creation will be interrupted since some bash command cannot be found.

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

How reproducible:
always

Steps to Reproduce:
1.Custom my cartridge with modify the env/PATH to custom value
$cat env/PATH
TEST_VALUE
2.Create app with this cartridge
$ rhc app create app1 https://raw.github.com/bmeng/downloadable-mock/master/metadata/manifest.yml


Actual results:
App creation got interrupted since the /bin/bash has been written by cartridge writer.

$ rhc app create app1 https://raw.github.com/bmeng/downloadable-mock/master/metadata/manifest.yml
The cartridge 'https://raw.github.com/bmeng/downloadable-mock/master/metadata/manifest.yml' will be downloaded and installed

Application Options
-------------------
  Namespace:  bmengdev
  Cartridges: https://raw.github.com/bmeng/downloadable-mock/master/metadata/manifest.yml
  Gear Size:  default
  Scaling:    no

Creating application 'app1' ... /var/lib/openshift/302930486192477166370816/downloadable-mock/bin/setup: line 13: rm: command not found


Expected results:
PATH env should not be rewritten by cartridge writer.

Additional info:
Comment 1 openshift-github-bot 2013-08-08 17:11:39 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/52c429fb86aff9a1bb2a857320068986321d2429
Bug 980820 - Cartridge Overriding PATH
Comment 2 Meng Bo 2013-08-12 01:22:38 EDT
Tested on devenv_3638, still can reproduce this issue.

# rhc app create app1 https://raw.github.com/bmeng/downloadable-mock/master/metadata/manifest.yml
The cartridge 'https://raw.github.com/bmeng/downloadable-mock/master/metadata/manifest.yml' will be downloaded and installed

Application Options
-------------------
  Namespace:  bmeng
  Cartridges: https://raw.github.com/bmeng/downloadable-mock/master/metadata/manifest.yml
  Gear Size:  default
  Scaling:    no

Creating application 'app1' ... /var/lib/openshift/5208701c28ba28073e00000e/downloadable-mock/bin/setup: line 13: rm: command not found



[bmeng@localhost downloadable-mock]$ cat env/PATH 
/etc
Comment 3 openshift-github-bot 2013-08-12 16:25:22 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/1e14686bbdd786d65f9b02be942b014dbb3c2af8
Bug 980820 - Ensure bogus PATH doesn't stop cartridge operations

* Missed setup/install calls
Comment 4 Meng Bo 2013-08-13 05:53:22 EDT
Checked on devenv_3641, app can be created with invalid PATH set in cartridge dir.

Move the bug to verified.

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