Bug 787120

Summary: Failed to tail logs with options
Product: OKD Reporter: jizhao
Component: ocAssignee: Abhishek Gupta <abhgupta>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.xCC: abhgupta, bmeng, szhou
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 0.85.12-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-17 02:07:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description jizhao 2012-02-03 08:47:05 UTC
Description of problem:
Failed to tail app logs with options like -o '-n 100'.

Version-Release number of selected component (if applicable):
rhc-0.85.11-1.el6_2.noarch

How reproducible:
Always

Steps to Reproduce:
1.Create an openshift app
# rhc app create -a app1 -t php-5.3
2.Tail logs using options like "-o '-n 100'"
# rhc app tail -a app1 -p redhat -o '-n 100'
or
# rhc app tail -a app1 -o '-n 100'
3.
  
Actual results:
If you specify the password:
<---------output------------->
# rhc app tail -a app1 -p redhat -o '-n 100'
/usr/lib/ruby/gems/1.8/gems/rhc-0.85.11/bin/rhc-app:457:in `show_logs': uninitialized constant Base64 (NameError)
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.85.11/bin/rhc-app:575
	from /usr/bin/rhc-app:19:in `load'
	from /usr/bin/rhc-app:19
<---------------------------->
If you don't specify the password:
<---------output------------->
# rhc app tail -a app1 -o '-n 100'
Password: /usr/lib/ruby/gems/1.8/gems/rhc-0.85.11/lib/rhc-common.rb:289:in `gets': No such file or directory - 100 (Errno::ENOENT)
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.85.11/lib/rhc-common.rb:289:in `get_password'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.85.11/bin/rhc-app:123:in `validate_args'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.85.11/bin/rhc-app:435:in `show_logs'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.85.11/bin/rhc-app:575
	from /usr/bin/rhc-app:19:in `load'
	from /usr/bin/rhc-app:19
<---------------------------->

Expected results:
Logs should be tailed successfully.

Additional info:

Comment 1 jizhao 2012-02-03 09:02:18 UTC
This bug only exists in the new client "rhc app tail". rhc-tail-files is OK.

Comment 2 Abhishek Gupta 2012-02-03 11:27:03 UTC
Fixed with commit - b940473abe88bc32cbcfdc8ea230ce2b0caef798

Comment 3 Meng Bo 2012-02-06 08:12:29 UTC
verify with rhc-0.85.12-1.el6_2.noarch on stage_sprint4,
issue has been fixed.