targetcli save error

Posted longchang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了targetcli save error相关的知识,希望对你有一定的参考价值。

iscsi configuration unable to save python error “ValueError: ‘Implict and Explict‘ is not in list”

/> ls
o- / ......................................................................................................................... [...]
  o- backstores .............................................................................................................. [...]
  | o- block .................................................................................................. [Storage Objects: 1]
  | | o- db_lun ..................................................... [/dev/mapper/db (10.0GiB) write-thru activated]
  | |   o- alua ................................................................................................... [ALUA Groups: 1]
  | |     o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
  | o- fileio ................................................................................................. [Storage Objects: 0]
  | o- pscsi .................................................................................................. [Storage Objects: 0]
  | o- ramdisk ................................................................................................ [Storage Objects: 0]
  o- iscsi ............................................................................................................ [Targets: 1]
  | o- iqn.2017-10.dbserver.com:server ................................................................................... [TPGs: 1]
  |   o- tpg1 ............................................................................................... [no-gen-acls, no-auth]
  |     o- acls .......................................................................................................... [ACLs: 1]
  |     | o- iqn.2017-10.dbserver.com:client ...................................................................... [Mapped LUNs: 1]
  |     |   o- mapped_lun0 ................................................................................ [lun0 block/db_lun (rw)]
  |     o- luns .......................................................................................................... [LUNs: 1]
  |     | o- lun0 ................................................ [block/db_lun (/dev/mapper/db) (default_tg_pt_gp)]
  |     o- portals .................................................................................................... [Portals: 1]
  |       o- 0.0.0.0:3260 ..................................................................................................... [OK]
  o- loopback ......................................................................................................... [Targets: 0]
/>


/> saveconfig
Last 10 configs saved in /etc/target/backup.
Traceback (most recent call last):
  File "/usr/bin/targetcli", line 121, in <module>
    main()
  File "/usr/bin/targetcli", line 111, in main
    shell.run_interactive()
  File "/usr/lib/python2.7/site-packages/configshell_fb/shell.py", line 905, in run_interactive
    self._cli_loop()
  File "/usr/lib/python2.7/site-packages/configshell_fb/shell.py", line 734, in _cli_loop
    self.run_cmdline(cmdline)
  File "/usr/lib/python2.7/site-packages/configshell_fb/shell.py", line 848, in run_cmdline
    self._execute_command(path, command, pparams, kparams)
  File "/usr/lib/python2.7/site-packages/configshell_fb/shell.py", line 823, in _execute_command
    result = target.execute_command(command, pparams, kparams)
  File "/usr/lib/python2.7/site-packages/configshell_fb/node.py", line 1406, in execute_command
    return method(*pparams, **kparams)
  File "/usr/lib/python2.7/site-packages/targetcli/ui_root.py", line 90, in ui_command_saveconfig
    self.rtsroot.save_to_file(savefile)
  File "/usr/lib/python2.7/site-packages/rtslib_fb/root.py", line 270, in save_to_file
    f.write(json.dumps(self.dump(), sort_keys=True, indent=2))
  File "/usr/lib/python2.7/site-packages/rtslib_fb/root.py", line 160, in dump
    d[‘storage_objects‘] = [so.dump() for so in self.storage_objects]
  File "/usr/lib/python2.7/site-packages/rtslib_fb/tcm.py", line 762, in dump
    d = super(BlockStorageObject, self).dump()
  File "/usr/lib/python2.7/site-packages/rtslib_fb/tcm.py", line 297, in dump
    d[‘alua_tpgs‘] = [tpg.dump() for tpg in self.alua_tpgs]
  File "/usr/lib/python2.7/site-packages/rtslib_fb/alua.py", line 302, in dump
    d[param] = getattr(self, param, None)
  File "/usr/lib/python2.7/site-packages/rtslib_fb/alua.py", line 129, in _get_alua_access_type
    return alua_types.index(alua_type)
ValueError: ‘Implict and Explict‘ is not in list

The issue is caused by the fact that these parameters were renamed in Linux kernel:

  • ImplictImplicit
  • ExplictExplicit

(Note that the i between the c and the final t, which had been omitted, is now present.  Here is link to the corresponding kernel commit https://github.com/torvalds/linux/commit/125d0119d158180eb38580adfbc1a83d56120709

Solution: upgrade kernel to the latest version.

 

以上是关于targetcli save error的主要内容,如果未能解决你的问题,请参考以下文章

imgwarp.cpp:3143: error: (-215:Assertion failed) _src.total() > 0 in function ‘warpPerspective‘(代码片段

使用Linux模拟FC存储阵列(targetcli)

连接MySQL出现错误:ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)(代码片段

CordovaError:承诺被非错误拒绝:错误代码 65

radhat7下使用targetcli为多个启动器配置iSCSI访问控制

radhat7下使用targetcli为多个启动器配置iSCSI访问控制