SUSE Support

Here When You Need Us

iSCSI LIO configuration with targetcli fails to saveconfig or exit

This document (7022130) is provided subject to the disclaimer at the end of this document.

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.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7022130
  • Creation Date: 19-Oct-2017
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.