iSCSI LIO configuration with targetcli fails to saveconfig or exit

  • 7022130
  • 19-Oct-2017
  • 19-Oct-2017

Environment

SUSE Linux Enterprise Server 12 Service Pack 3 (SLES 12 SP3)
SUSE Linux Enterprise Server 12 Service Pack 2 (SLES 12 SP2)

Situation

When attempting to configure iSCSI targets using targetcli, the saveconfig and exit commands fail in the targetcli console. Users cannot exit the targetcli console unless the kill the targetcli process.

The following errors are observed:
# targetcli saveconfig
WARNING: Saving iscsisan current configuration to disk will overwrite your boot settings.
The current target configuration will become the default boot config.
Are you sure? Type 'yes': yes
Traceback (most recent call last):
  File "/usr/bin/targetcli", line 82, in <module>
    main()
  File "/usr/bin/targetcli", line 71, in main
    shell.run_cmdline(" ".join(sys.argv[1:]))
  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 103, 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/targetcli/ui_root.py", line 92, in ui_command_saveconfig
    config = Config()
  File "/usr/lib/python2.7/site-packages/rtslib/config.py", line 133, in __init__
    self._load_policy()
...
  File "/usr/lib/python2.7/site-packages/pyparsing.py", line 3511, in parseImpl
    ret = e._parse( instring, loc, doActions )
  File "/usr/lib/python2.7/site-packages/pyparsing.py", line 1405, in _parseNoCache
    tokens = fn( instring, tokensStart, retTokens )
  File "/usr/lib/python2.7/site-packages/pyparsing.py", line 1049, in wrapper
    ret = func(*args[limit[0]:])
  File "/usr/lib/python2.7/site-packages/rtslib/config_parser.py", line 225, in _parse_action_attr
    ref_path = " ".join(ref_path.asList())
AttributeError: 'list' object has no attribute 'asList'

Resolution

Uninstall the deprecated targetcli package and install the newer, more functional targetcli-fb package. The targetcli-fb package was introduced in SLES12 SP2 and supersedes the targetcli package.

Cause

The targetcli-2.1-17.1 version has the errors.

Feedback service temporarily unavailable. For content questions or problems, please contact Support.