Bug 991249

Summary: [targetcli] hit python error when the parameter is null
Product: Red Hat Enterprise Linux 7 Reporter: Xiaowei Li <xiaoli>
Component: targetcliAssignee: Andy Grover <agrover>
Status: CLOSED CURRENTRELEASE QA Contact: Bruno Goncalves <bgoncalv>
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: bgoncalv, qcai
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: targetcli-2.1.fb28-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 12:51:48 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 Xiaowei Li 2013-08-02 01:05:35 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
# rpm -q targetcli
targetcli-2.1.fb26-2.el7.noarch

/iscsi/iqn.20...m.redhat:test> pwd
/iscsi/iqn.2003-01.org.linux-iscsi.dhcp12-156.x8664:sn.9fb3f5fee5bf/tpg1/acls/iqn.1994-05.com.redhat:test

/iscsi/iqn.20...m.redhat:test> get parameter 
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/configshell/shell.py", line 990, in run_interactive
    self._cli_loop()
  File "/usr/lib/python2.7/site-packages/configshell/shell.py", line 813, in _cli_loop
    self.run_cmdline(cmdline)
  File "/usr/lib/python2.7/site-packages/configshell/shell.py", line 934, in run_cmdline
    self._execute_command(path, command, pparams, kparams)
  File "/usr/lib/python2.7/site-packages/configshell/shell.py", line 909, in _execute_command
    result = target.execute_command(command, pparams, kparams)
  File "/usr/lib/python2.7/site-packages/targetcli/ui_node.py", line 87, in execute_command
    pparams, kparams)
  File "/usr/lib/python2.7/site-packages/configshell/node.py", line 1416, in execute_command
    result = method(*pparams, **kparams)
  File "/usr/lib/python2.7/site-packages/configshell/node.py", line 607, in ui_command_get
    value = group_getter(p_def['name'])
  File "/usr/lib/python2.7/site-packages/targetcli/ui_target.py", line 867, in ui_getgroup_parameter
    return self.rtsnode[0].get_parameter(parameter)
AttributeError: 'UINodeACL' object has no attribute 'rtsnode'


/iscsi/iqn.20...m.redhat:test> set parameter 
PARAMETER CONFIG GROUP
======================
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Andy Grover 2013-08-02 18:17:13 UTC
Fixed upstream, will be in targetcli-2.1.fb28

Comment 3 Bruno Goncalves 2013-10-03 08:50:11 UTC
Verified with:
rpm -q targetcli
targetcli-2.1.fb30-1.el7.noarch


/iscsi/iqn.20...m.redhat:test> pwd
/iscsi/iqn.2009-10.com.redhat:storage-1/tpg1/acls/iqn.1994-05.com.redhat:test

/iscsi/iqn.20...m.redhat:test> get parameter
PARAMETER CONFIG GROUP
======================
DataPDUInOrder=No Active iSCSI Session [ro]
-------------------------------------------
The DataPDUInOrder parameter.
...

set parameter
PARAMETER CONFIG GROUP
======================

Comment 4 Ludek Smid 2014-06-13 12:51:48 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.