Bug 996012

Summary: targetcli: Traceback when grep its output
Product: Red Hat Enterprise Linux 6 Reporter: Bruno Goncalves <bgoncalv>
Component: python-configshellAssignee: Maurizio Lombardi <mlombard>
Status: CLOSED WONTFIX QA Contact: Bruno Goncalves <bgoncalv>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5CC: tlavigne
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1061157 (view as bug list) Environment:
Last Closed: 2017-12-06 12:08:20 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:
Bug Depends On:    
Bug Blocks: 1061157    

Description Bruno Goncalves 2013-08-12 08:27:30 UTC
Description of problem:
Some targetcli commands generate traceback when "grepping" its output.

Version-Release number of selected component (if applicable):
rpm -q fcoe-target-utils
fcoe-target-utils-2.0rc1.fb16-3.el6.noarch 

How reproducible:
100%

Steps to Reproduce:
# targetcli /tcm_f ls
No such path /tcm_f

# targetcli /tcm_f ls | grep "tcm"
Traceback (most recent call last):
File "/usr/bin/targetcli", line 91, in <module>
main()
File "/usr/bin/targetcli", line 74, in main
shell.run_cmdline(" ".join(sys.argv[1:]))
File "/usr/lib/python2.6/site-packages/configshell/shell.py", line 934,
in run_cmdline
self._execute_command(path, command, pparams, kparams)
File "/usr/lib/python2.6/site-packages/configshell/shell.py", line 899,
in _execute_command
self.log.error(msg)
File "/usr/lib/python2.6/site-packages/configshell/log.py", line 159, in
error
self._log('error', msg)
File "/usr/lib/python2.6/site-packages/configshell/log.py", line 112, in
_log
self.con.display(msg)
File "/usr/lib/python2.6/site-packages/configshell/console.py", line
151, in display
self.raw_write(text)
File "/usr/lib/python2.6/site-packages/configshell/console.py", line
139, in raw_write
self._stdout.write(text)
TypeError: argument 1 must be string or read-only character buffer, not
exceptions.ValueError


# targetcli /tcm_fc/20:00:00:1b:21:59:12:37/luns create
/backstores/fileio/fcoe_lun
lun for storage object /backstores/fileio/fcoe_lun already exists

# targetcli /tcm_fc/20:00:00:1b:21:59:12:37/luns create
/backstores/fileio/fcoe_lun | grep ""
Traceback (most recent call last):
File "/usr/bin/targetcli", line 91, in <module>
main()
File "/usr/bin/targetcli", line 74, in main
shell.run_cmdline(" ".join(sys.argv[1:]))
File "/usr/lib/python2.6/site-packages/configshell/shell.py", line 934,
in run_cmdline
self._execute_command(path, command, pparams, kparams)
File "/usr/lib/python2.6/site-packages/configshell/shell.py", line 909,
in _execute_command
result = target.execute_command(command, pparams, kparams)
File "/usr/lib/python2.6/site-packages/targetcli/ui_node.py", line 84,
in execute_command
pparams, kparams)
File "/usr/lib/python2.6/site-packages/configshell/node.py", line 1407,
in execute_command
self.shell.log.error(msg)
File "/usr/lib/python2.6/site-packages/configshell/log.py", line 159, in
error
self._log('error', msg)
File "/usr/lib/python2.6/site-packages/configshell/log.py", line 112, in
_log
self.con.display(msg)
File "/usr/lib/python2.6/site-packages/configshell/console.py", line
151, in display
self.raw_write(text)
File "/usr/lib/python2.6/site-packages/configshell/console.py", line
139, in raw_write
self._stdout.write(text)
TypeError: argument 1 must be string or read-only character buffer, not
ExecutionError

------
In this case no traceback is generated.

# targetcli /tcm_fc/20:00:00:1b:21:59:12:37/acls create
10:00:00:00:c9:e6:61:d5
This NodeACL already exists in configFS.

# targetcli /tcm_fc/20:00:00:1b:21:59:12:37/acls create
10:00:00:00:c9:e6:61:d5 | grep ""
This NodeACL already exists in configFS.

Comment 1 RHEL Program Management 2013-08-20 01:10:08 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.

Comment 5 Jan Kurik 2017-12-06 12:08:20 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/