targetcli saveconfig fails after install

Bug #1574394 reported by LnxGnome
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
targetcli (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

New/fresh install of 16.04 server. (Ubuntu 16.04 LTS)

disable qlini_mode on qla2xxx, mkinitramfs, reboot

Enter targetcli and configure a FC LUN.

saveconfig fails with....
  ConfigError: Unknown value type 'qla2xxx_wwn' when validating <WWPN>

Can exit targetcli and re-enter with config intact (running), but cannot save the config (will not survive a reboot).

Seen in 2014 > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764005

uberk@aphrodite:~$ apt-cache policy targetcli
targetcli:
  Installed: 1:3.0~pre4.1~ga55d018-2
  Candidate: 1:3.0~pre4.1~ga55d018-2
  Version table:
 *** 1:3.0~pre4.1~ga55d018-2 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu xenial/universe i386 Packages
        100 /var/lib/dpkg/status

Hardware is QLE2564 HBA.

Set attachment for full targetcli usage details.

Error output:

/qla2xxx> 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/lib/python2.7/dist-packages/configshell/shell.py", line 820, in _cli_loop
    self.run_cmdline(cmdline)
  File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line 934, in run_cmdline
    self._execute_command(path, command, pparams, kparams)
  File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line 909, in _execute_command
    result = target.execute_command(command, pparams, kparams)
  File "/usr/lib/python2.7/dist-packages/targetcli/ui_node.py", line 225, in execute_command
    return UINode.execute_command(self, command, pparams, kparams)
  File "/usr/lib/python2.7/dist-packages/targetcli/ui_node.py", line 104, in execute_command
    pparams, kparams)
  File "/usr/lib/python2.7/dist-packages/configshell/node.py", line 1416, in execute_command
    result = method(*pparams, **kparams)
  File "/usr/lib/python2.7/dist-packages/targetcli/ui_node.py", line 123, in ui_command_saveconfig
    CliConfig.save_running_config()
  File "/usr/lib/python2.7/dist-packages/targetcli/cli_config.py", line 65, in save_running_config
    config.load_live()
  File "/usr/lib/python2.7/dist-packages/rtslib/config.py", line 565, in load_live
    source=source, allow_new_attrs=True)
  File "/usr/lib/python2.7/dist-packages/rtslib/config.py", line 190, in _load_parse_tree
    token = self.validate_obj(token, cur)
  File "/usr/lib/python2.7/dist-packages/rtslib/config.py", line 377, in validate_obj
    valid_value = self.validate_val(valid_token['key'][1], id_type)
  File "/usr/lib/python2.7/dist-packages/rtslib/config.py", line 355, in validate_val
    % (val_type, value))
ConfigError: Unknown value type 'qla2xxx_wwn' when validating 21:00:00:24:ff:68:68:3c

Revision history for this message
LnxGnome (78luphr0rnk2nuqimstywepozxn-launchpad) wrote :

uberk@aphrodite:~$ apt-cache policy python-configshell
python-configshell:
  Installed: 1.6.1~g020d540-2
  Candidate: 1.6.1~g020d540-2
  Version table:
 *** 1.6.1~g020d540-2 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu xenial/universe i386 Packages
        100 /var/lib/dpkg/status

Revision history for this message
LnxGnome (78luphr0rnk2nuqimstywepozxn-launchpad) wrote :

Testing with patch from: https://github.com/bootc/rtslib/commit/727c345bd18137c424e4fba62bfab7bcfabfc024
Save config did not produce error. Will reboot to see if config is save/valid.

Revision history for this message
LnxGnome (78luphr0rnk2nuqimstywepozxn-launchpad) wrote :

Patch from https://github.com/bootc/rtslib/commit/727c345bd18137c424e4fba62bfab7bcfabfc024 'works for me'. Config is saved and active after a reboot.

Revision history for this message
LnxGnome (78luphr0rnk2nuqimstywepozxn-launchpad) wrote :

Expectation: For the package maintainer to apply the patch to Ubuntu package for testing and eventual roll into release.

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
Revision history for this message
Markus (moswald) wrote :

Can confirm - got hit by that bug and the patch worked for me as well.

Revision history for this message
Florian Schönbeck (schoenbeck) wrote :

Same problem here.

python-configshell:
  Installiert: 1.6.1~g020d540-2
targetcli:
  Installiert: 1:3.0~pre4.1~ga55d018-2
python-rtslib:
  Installiert: 1:3.0~pre4.1~g1b33ceb-2

Saving configuration works after applying patch to /usr/share/pyshared/rtslib/config.py and /usr/share/pyshared/rtslib/utils.py

HBA is QLogic QMH2562 with driver qla2xxx

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.