targetcli saveconfig crashes on Ubuntu 16.04.2 LTS

Bug #1675946 reported by Alexander Lebedev
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
targetcli (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I installed targetcli (1:3.0~pre4.1~ga55d018-2) on fresh Ubuntu 16.04.2

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"

and got this error after entering 'saveconfig':
/> saveconfig
Save configuration? [Y/n]: y
Saving new startup configuration
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line 990, in run_interactive
    self._cli_loop()
  .......
  File "/usr/local/lib/python2.7/dist-packages/pyparsing.py", line 1049, in wrapper
    ret = func(*args[limit[0]:])
  File "/usr/lib/python2.7/dist-packages/rtslib/config_parser.py", line 228, in _parse_action_attr
    ref_path = " ".join(ref_path.asList())
AttributeError: 'list' object has no attribute 'asList'

same error occurred when I tried to run targetcli-ng from console.

Workaround:
After some investigation, I found that the problem was in the pyparsing python library version:
root@adUntu:/home/ad# pip freeze
....
pyparsing==2.1.10
....

Everything is fine after downgrade it to the version 2.0.3:
root@adUntu:/home/ad# pip install -U pyparsing==2.0.3
Collecting pyparsing==2.0.3
  Downloading pyparsing-2.0.3-py2.py3-none-any.whl
Installing collected packages: pyparsing
  Found existing installation: pyparsing 2.1.10
    Uninstalling pyparsing-2.1.10:
      Successfully uninstalled pyparsing-2.1.10
Successfully installed pyparsing-2.0.3

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in targetcli (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.