Bug 798407

Summary: embedded cartridge proxy fails and stuffs invalid code into the variable
Product: OKD Reporter: Rob Millner <rmillner>
Component: ContainersAssignee: Rob Millner <rmillner>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 2.xCC: bmeng, mfisher
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-02 21:56:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rob Millner 2012-02-28 19:41:23 UTC
Description of problem:
The expose-port hook on embedded cartridges fails.  Instead of trapping the failure, the error message gets stuffed into the proxy port variable triggering syntax errors in any script which reads it.

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


How reproducible:
Always

Steps to Reproduce:
1. Launch a dev env
2. Create an app
3. Log in as root
4. Run the expose-port hook

ex:
/usr/libexec/li/cartridges/embedded/mysql-5.1/info/hooks/expose-port exposeConcealHook epopxqo b6de2d4d350841889d32898040db1f99

  
Actual results:

/var/lib/libra//b6de2d4d350841889d32898040db1f99//.env/OPENSHIFT_DB_PROXY_PORT: line 2: Dest: command not found


Expected results:
A positive result from the script.  For example:
CART_DATA: PROXY_HOST=exposeConcealHook-epopxqo.dev.rhcloud.com
CART_DATA: PROXY_PORT=35531
CART_DATA: HOST=120.0.250.1
CART_DATA: PORT=3306

Additional info:

Comment 1 Rob Millner 2012-02-28 19:42:16 UTC
Resolved with commits:
08def1539d2ad3a00c1b4255ac328bb154f92341
cc1dbe3c116df4fd09f3a749dfa3728f4800e2ef
f31667f675074314eef59defaae2ad4f05b19381

Comment 2 Meng Bo 2012-02-29 08:03:44 UTC
verified on devenv_1649, issue has been fixed.