Bug 1004510

Summary: rhcsh should not use heredoc to display welcome banner
Product: OpenShift Online Reporter: Jhon Honce <jhonce>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: bmeng, qiuzhang, xtian
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-09-19 16:49:09 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 Jhon Honce 2013-09-04 19:34:08 UTC
Description of problem:
rhcsh is using a heredoc to display the welcome message.  This fails if the gear's quota is exceeded.

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


How reproducible:
Always on a gear that has meet or exceeded quota

Steps to Reproduce:
1. Fill gears disk capacity 
2. ssh into gear
3.

Actual results:
Error message about being unable to create heredoc

Expected results:
No error message, use echo in place of heredoc

Additional info:
Add comments warnings others about heredoc's in this file.

Comment 1 openshift-github-bot 2013-09-06 21:13:25 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/66d963041da5245d2e0121376c456ec21cbb3198
Bug 1004510 - Remove welcome HEREDOC from rhcsh

* HEREDOC caused extraneous error message when gear quota exceeeded

Comment 3 Qiushui Zhang 2013-09-09 09:16:22 UTC
Tested on devenv_3758.

1. Create an app
2. SSH to the app. Fill the space, e.g. dd if=/dev/zero of=~/app-root/data/test bs=1M count=2000
3. Log out and SSH to the app again.
The welcome banner shows correctly:

"
    Welcome to OpenShift shell

    This shell will assist you in managing OpenShift applications.

    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!
    Shell access is quite powerful and it is possible for you to
    accidentally damage your application.  Proceed with care!
    If worse comes to worst, destroy your application with "rhc app delete"
    and recreate it
    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!

    Type "help" for more info.
"