Bug 977563

Summary: The ruby cart should not process templates under ruby/tmp
Product: OpenShift Online Reporter: Dan McPherson <dmcphers>
Component: ContainersAssignee: Hiro Asari <hasari>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 2.xCC: bmeng, jkeck
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-22 15:18:12 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:

Description Dan McPherson 2013-06-24 22:53:28 UTC
Description of problem:
The ruby cart in managed_files.yml has:

processed_templates:
- '**/*.erb'

but can possibly leave app gems vendored under tmp/vendor as part of its gem caching mechanism.  So when setup is rerun it will hit the erbs under tmp/vendor and both take a long time and fail.



How reproducible:
100%


Steps to Reproduce:
1. create a ruby app and put an erb under ruby/tmp that uses a var not available during setup
2. migrate the app
3.

Actual results:
Fails because the erb can't be processed


Expected results:
The tmp erb shouldn't be processed.


Additional info:

Comment 2 openshift-github-bot 2013-06-27 18:04:25 UTC
Commits pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/cfb80635dece80fd45111309f5c6e5d2ed6688d9
Bug 977563

Instead of using glob, explicitly list templates belonging to the Ruby
cartridge.

https://github.com/openshift/origin-server/commit/e221e4efd97d887ae1dbcbafe1ee933f91432cf3
Merge pull request #2939 from BanzaiMan/dev/hasari/bz977563

Bug 977563

Comment 3 Meng Bo 2013-06-28 08:15:06 UTC
Checked on devenv-stage_382,

1. Create ruby app
2. Write a .erb file under /var/lib/openshift/<app>/ruby/tmp/
#cat OPENSHIFT_TEST_VAR.erb
test_var
3. Migrate the app

Migration will pass, and the OPENSHIFT_TEST_VAR cannot be found in the user shell.

Move bug to verified.