Bug 847237

Summary: Error message returns when using ctl + c to terminal rhc app tail on Ubuntu 12.04
Product: OKD Reporter: Jianwei Hou <jhou>
Component: ocAssignee: John (J5) Palmieri <johnp>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 2.xCC: jkeck, rmillner
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: fork_ami_US2597_US2599_US2813_US2817_US2872_US2816_US2814_209 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-06 18:49:03 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 Jianwei Hou 2012-08-10 08:51:13 UTC
Description of problem:
Terminal rhc app tail with ctl + c, and error messages is returned. Exit code is non-zero

Version-Release number of selected component (if applicable):
On Ubuntu(Ubuntu 12.04 LTS i686)
rhc-0.97.4
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]

How reproducible:
always

Steps to Reproduce:
1.Create a jbossas application
  rhc app create -a as1 -t jbossas-7
2.Generate threaddump for jboss app
  rhc app threaddump -a as1
3.Run rhc app tail to tail log files.
openshift@openshift-ubuntu:~/test/apps$ rhc app tail -a as1 -f as1/jbossas-7/standalone/tmp/as1.log -o '-n 250'
Password: ******

Attempting to tail files: as1/jbossas-7/standalone/tmp/as1.log
Use ctl + c to stop
......

4.Use ctl + c to stop
Actual results:
After step 4:
^C
Terminating...
/var/lib/gems/1.8/gems/rhc-0.97.4/bin/rhc-app:512:in `exit': no implicit conversion from nil to integer (TypeError)
	from /var/lib/gems/1.8/gems/rhc-0.97.4/bin/rhc-app:512
	from /usr/local/bin/rhc-app:19:in `load'
	from /usr/local/bin/rhc-app:19
openshift@openshift-ubuntu:~/test/apps$ echo $?
130

Expected results:
Should terminal without errors, and exit code is 0

Additional info:
Didn't reproduce on Fedora 16/17

Comment 1 Clayton Coleman 2012-08-17 18:37:46 UTC
This is low severity because it only happens when the user hits CTRL+C, and doesn't have a functional impact.

Comment 2 John (J5) Palmieri 2012-10-09 13:50:10 UTC
Should be fixed in the fork.  Please test on latest fork ami

Comment 3 Jianwei Hou 2012-10-10 02:41:04 UTC
Verified on fork_ami_US2597_US2599_US2813_US2817_US2872_US2816_US2814_213
OS: Ubuntu 12.04(rhc client built from fork_ami)

Steps to Reproduce:
1.Create a jbossas application
  rhc app create jbossas1 jbossas-7
2.Generate threaddump for jboss app
  rhc threaddump jbossas1
3.Run rhc tail to tail log files:
openshift@openshift-ubuntu:~/test/apps$ rhc tail jbossas1 -f jbossas-7/jbossas-7/standalone/tmp/jbossas-7.log -o '-n 250'
Password: ***
.................

^C
RESULT:
Terminating...
openshift@openshift-ubuntu:~/test/apps$ echo $?
0

Terminated without errors and exit code is zero.