Bug 974567

Summary: Show backtrace when rhc commands with incorrect shell commands format by pipe on Windows
Product: OpenShift Online Reporter: Wei Sun <wsun>
Component: ocAssignee: Fabiano Franz <ffranz>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.xCC: dmcphers, wsun
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: 2014-04-09 15:17:28 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 Wei Sun 2013-06-14 12:54:27 UTC
Description of problem:
When run some rhc commands with incorrect shell commands format by pipe on windows, it will get "Broken pipe (Errno::EPIPE)" error messages.
This is not reproduced on other platforms.

Version-Release number of selected component (if applicable):
rhc-1.10.1 build from deven_3358
deven_3360

How reproducible:
Always

Steps to Reproduce:

1. Run some rhc commands with incorrect shell commands format by pipe like below
rhc domain show |grep grep uuid


Actual results:
openshift@OPENSHIFT-WIN8 ~/test
$ rhc domain show |grep grep uuid
grep: uuid: No such file or directory
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.10.1/lib/rhc/highline_extensions.rb:76
:in `flush': Invalid argument (Errno::EINVAL)
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.10.1/lib/rhc/highline_ext
ensions.rb:76:in `say'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.10.1/lib/rhc/highline_ext
ensions.rb:102:in `header'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.10.1/lib/rhc/helpers.rb:2
57:in `block (2 levels) in <module:Helpers>'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.10.1/lib/rhc/commands/dom
ain.rb:62:in `show'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.10.1/lib/rhc/commands.rb:
        241:in `execute'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.10.1/lib/rhc/commands.rb:
232:in `block (3 levels) in to_commander'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/c
ommand.rb:180:in `call'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/c
ommand.rb:180:in `call'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/c
ommand.rb:155:in `run'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/r
unner.rb:400:in `run_active_command'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.10.1/lib/rhc/command_runn
er.rb:73:in `run!'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/d
elegates.rb:11:in `run!'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.10.1/lib/rhc/cli.rb:36:in
`start'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.10.1/bin/rhc:20:in `<top
(required)>'
        from c:/Ruby193/bin/rhc:23:in `load'
        from c:/Ruby193/bin/rhc:23:in `<main>'


Expected results:
should not show backtrace

Additional info:

Comment 1 Dan McPherson 2014-03-12 20:32:31 UTC
Just curious: Does it work if you have a space after | ?

rhc domain show | grep grep uuid

Comment 2 Wei Sun 2014-03-13 03:27:08 UTC
Checked this bug with rhc-1.22.0,seems it works now. After moving this bug to ON_QA, we will verify this bug.

Result:
openshift@OPENSHIFT-WIN8 ~/test
$ rhc domain show | grep grep uuid
grep: uuid: No such file or directory
DL is deprecated, please use Fiddle

openshift@OPENSHIFT-WIN8 ~/test
$ rhc domain show |grep grep uuid
grep: uuid: No such file or directory
DL is deprecated, please use Fiddle

Comment 3 Wei Sun 2014-03-13 03:42:50 UTC
According to #Comment 2,verify this bug.