Targetcli 能够运行
[root@controller ~]# targetcli
targetcli shell version 2.1.fb34
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.
/> exit
Global pref auto_save_on_exit=true
Last 10 configs saved in /etc/target/backup.
Configuration saved to /etc/target/saveconfig.json
更新后
[root@controller ~]# yum update targetcli -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.nluug.nl
* epel: ftp.nluug.nl
* extras: ftp.nluug.nl
* updates: ftp.nluug.nl
Resolving Dependencies
--> Running transaction check
---> Package targetcli.noarch 0:2.1.fb34-1.el7 will be updated
---> Package targetcli.noarch 0:2.1.fb37-3.el7 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
=================================================================================
Package Arch Version Repository Size
=================================================================================
Updating:
targetcli noarch 2.1.fb37-3.el7 base 56 k
Transaction Summary
=================================================================================
Upgrade 1 Package
Total download size: 56 k
Downloading packages:
No Presto metadata available for base
targetcli-2.1.fb37-3.el7.noarch.rpm | 56 kB 00:00:05
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : targetcli-2.1.fb37-3.el7.noarch 1/2
Cleanup : targetcli-2.1.fb34-1.el7.noarch 2/2
Verifying : targetcli-2.1.fb37-3.el7.noarch 1/2
Verifying : targetcli-2.1.fb34-1.el7.noarch 2/2
Updated:
targetcli.noarch 0:2.1.fb37-3.el7
Complete!
它不再开始了
[root@controller ~]# targetcli
Traceback (most recent call last):
File "/bin/targetcli", line 24, in <module>
from targetcli import UIRoot
File "/usr/lib/python2.7/site-packages/targetcli/__init__.py", line 18, in <module>
from ui_root import UIRoot
File "/usr/lib/python2.7/site-packages/targetcli/ui_root.py", line 25, in <module>
from ui_target import UIFabricModule
File "/usr/lib/python2.7/site-packages/targetcli/ui_target.py", line 24, in <module>
from rtslib import Target, TPG, LUN, StorageObjectFactory
ImportError: cannot import name StorageObjectFactory
输入返回后即收到一封电子邮件
[root@controller ~]#
You have mail in /var/spool/mail/root
该邮件表明
[root@controller ~]# mail
Heirloom Mail version 12.5 7/5/10. Type ? for help.
"/var/spool/mail/root": 1 message 1 new
>N 1 [email protected] Sat Jun 20 12:24 223/10885 "[abrt] full crash repo"
& 1
Message 1:
From [email protected] Sat Jun 20 12:24:47 2015
Return-Path: <[email protected]>
X-Original-To: root@localhost
Delivered-To: [email protected]
Date: Sat, 20 Jun 2015 12:24:47 +0000
From: [email protected]
To: [email protected]
Subject: [abrt] full crash report
User-Agent: Heirloom mailx 12.5 7/5/10
Content-Type: text/plain; charset=us-ascii
Status: R
abrt_version: 2.1.11
cmdline: /usr/bin/python /bin/targetcli
executable: /bin/targetcli
hostname: controller
kernel: 3.10.0-123.el7.x86_64
last_occurrence: 1434803085
pid: 6839
pkg_arch: noarch
pkg_epoch: 0
pkg_name: targetcli
pkg_release: 3.el7
pkg_version: 2.1.fb37
runlevel: unknown
time: Sat 20 Jun 2015 12:24:45 PM UTC
uid: 0
username: root
backtrace:
:ui_target.py:24:<module>:ImportError: cannot import name StorageObjectFactory
:
:Traceback (most recent call last):
: File "/bin/targetcli", line 24, in <module>
: from targetcli import UIRoot
: File "/usr/lib/python2.7/site-packages/targetcli/__init__.py", line 18, in <mo
dule>
: from ui_root import UIRoot
: File "/usr/lib/python2.7/site-packages/targetcli/ui_root.py", line 25, in <mod
ule>
: from ui_target import UIFabricModule
: File "/usr/lib/python2.7/site-packages/targetcli/ui_target.py", line 24, in <m
odule>
: from rtslib import Target, TPG, LUN, StorageObjectFactory
:ImportError: cannot import name StorageObjectFactory
:
:Local variables in innermost frame:
:TPG: None
:RTSLibBrokenLink: None
:Target: None
:NodeACL: None
:__builtins__: {'bytearray': <type 'bytearray'>, 'IndexError': <type 'exceptions.
IndexError'>, 'all': <built-in function all>, 'help': Type help() for interactive
help, or help(object) for help about object., 'vars': <built-in function vars>,
'SyntaxError': <type 'exceptions.SyntaxError'>, 'unicode': <type 'unicode'>, 'Uni
codeDecodeError': <type 'exceptions.UnicodeDecodeError'>, 'memoryview': <type 'me
moryview'>, 'isinstance': <built-in function isinstance>, 'copyright': Copyright
(c) 2001-2013 Python Software Foundation.
:All Rights Reserved.
:
:Copyright (c) 2000 BeOpen.com.
:All Rights Reserved.
:
:Copyright (c) 1995-2001 Corporation for National Research Initiatives.
:All Rights Reserved.
:
:Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
:All Rights Reserved., 'NameError': <type 'exceptions.NameError'>, 'BytesWarning'
: <type 'exceptions.BytesWarning'>, 'dict': <type 'dict'>, 'input': <built-in fun
ction input>, 'oct': <built-in function oct>, 'bin': <built-in function bin>, 'Sy
stemExit': <type 'exceptions.SystemExit'>, 'StandardError': <type 'exceptions.Sta
ndardError'>, 'format': <built-in function format>, 'repr': <built-in function re
pr>, 'sorted': <built-in function sorted>, 'False': False, 'RuntimeWarning': <typ
e 'exceptions.RuntimeWarning'>, 'list': <type 'list'>, 'iter': <built-in function
iter>, 'reload': <built-in function reload>, 'Warning': <type 'exceptions.Warnin
g'>, '__package__': None, 'round': <built-in function round>, 'dir': <built-in fu
nction dir>, 'cmp': <built-in function cmp>, 'set': <type 'set'>, 'bytes': <type
'str'>, 'reduce': <built-in function reduce>, 'intern': <built-in function intern
>, 'issubclass': <built-in function issubclass>, 'Ellipsis': Ellipsis, 'EOFError'
: <type 'exceptions.EOFError'>, 'locals': <built-in function locals>, 'BufferErro
r': <type 'exceptions.BufferError'>, 'slice': <type 'slice'>, 'FloatingPointError
': <type 'exceptions.FloatingPointError'>, 'sum': <built-in function sum>, 'getat
tr': <built-in function getattr>, 'abs': <built-in function abs>, 'exit': Use exi
t() or Ctrl-D (i.e. EOF) to exit, 'print': <built-in function print>, 'True': Tru
e, 'FutureWarning': <type 'exceptions.FutureWarning'>, 'ImportWarning': <type 'ex
ceptions.ImportWarning'>, 'None': None, 'hash': <built-in function hash>, 'Refere
nceError': <type 'exceptions.ReferenceError'>, 'len': <built-in function len>, 'c
redits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thou
sands
: for supporting Python development. See www.python.org for more information.
, 'frozenset': <type 'frozenset'>, '__name__': '__builtin__', 'ord': <built-in fu
nction ord>, 'super': <type 'super'>, 'TypeError': <type 'exceptions.TypeError'>,
'license': See http://www.python.org/2.7/license.html, 'KeyboardInterrupt': <typ
e 'exceptions.KeyboardInterrupt'>, 'UserWarning': <type 'exceptions.UserWarning'>
, 'filter': <built-in function filter>, 'range': <built-in function range>, 'stat
icmethod': <type 'staticmethod'>, 'SystemError': <type 'exceptions.SystemError'>,
'BaseException': <type 'exceptions.BaseException'>, 'pow': <built-in function po
w>, 'RuntimeError': <type 'exceptions.RuntimeError'>, 'float': <type 'float'>, 'M
emoryError': <type 'exceptions.MemoryError'>, 'StopIteration': <type 'exceptions.
StopIteration'>, 'globals': <built-in function globals>, 'divmod': <built-in func
tion divmod>, 'enumerate': <type 'enumerate'>, 'apply': <built-in function apply>
, 'LookupError': <type 'exceptions.LookupError'>, 'open': <built-in function open
>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'basestring': <type 'basestri
ng'>, 'UnicodeError': <type 'exceptions.UnicodeError'>, 'zip': <built-in function
zip>, 'hex': <built-in function hex>, 'long': <type 'long'>, 'next': <built-in f
unction next>, 'ImportError': <type 'exceptions.ImportError'>, 'chr': <built-in f
unction chr>, 'xrange': <type 'xrange'>, 'type': <type 'type'>, '__doc__': "Built
-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' ob
ject; Ellipsis represents `...' in slices.", 'Exception': <type 'exceptions.Excep
tion'>, 'tuple': <type 'tuple'>, 'UnicodeTranslateError': <type 'exceptions.Unico
deTranslateError'>, 'reversed': <type 'reversed'>, 'UnicodeEncodeError': <type 'e
xceptions.UnicodeEncodeError'>, 'IOError': <type 'exceptions.IOError'>, 'hasattr'
: <built-in function hasattr>, 'delattr': <built-in function delattr>, 'setattr':
<built-in function setattr>, 'raw_input': <built-in function raw_input>, 'Syntax
Warning': <type 'exceptions.SyntaxWarning'>, 'compile': <built-in function compil
e>, 'ArithmeticError': <type 'exceptions.ArithmeticError'>, 'str': <type 'str'>,
'property': <type 'property'>, 'GeneratorExit': <type 'exceptions.GeneratorExit'>
, 'int': <type 'int'>, '__import__': <built-in function __import__>, 'KeyError':
<type 'exceptions.KeyError'>, 'coerce': <built-in function coerce>, 'PendingDepre
cationWarning': <type 'exceptions.PendingDeprecationWarning'>, 'file': <type 'fil
e'>, 'EnvironmentError': <type 'exceptions.EnvironmentError'>, 'unichr': <built-i
n function unichr>, 'id': <built-in function id>, 'OSError': <type 'exceptions.OS
Error'>, 'DeprecationWarning': <type 'exceptions.DeprecationWarning'>, 'min': <bu
ilt-in function min>, 'UnicodeWarning': <type 'exceptions.UnicodeWarning'>, 'exec
file': <built-in function execfile>, 'any': <built-in function any>, 'complex': <
type 'complex'>, 'bool': <type 'bool'>, 'ValueError': <type 'exceptions.ValueErro
r'>, 'NotImplemented': NotImplemented, 'map': <built-in function map>, 'buffer':
<type 'buffer'>, 'max': <built-in function max>, 'object': <type 'object'>, 'TabE
rror': <type 'exceptions.TabError'>, 'callable': <built-in function callable>, 'Z
eroDivisionError': <type 'exceptions.ZeroDivisionError'>, 'eval': <built-in funct
ion eval>, '__debug__': True, 'IndentationError': <type 'exceptions.IndentationEr
ror'>, 'AssertionError': <type 'exceptions.AssertionError'>, 'classmethod': <type
'classmethod'>, 'UnboundLocalError': <type 'exceptions.UnboundLocalError'>, 'Not
ImplementedError': <type 'exceptions.NotImplementedError'>, 'AttributeError': <ty
pe 'exceptions.AttributeError'>, 'OverflowError': <type 'exceptions.OverflowError
'>}
:UIRTSLibNode: None
:__file__: None
:UINode: None
:__package__: None
:complete_path: None
:NetworkPortal: None
:LUN: None
:__name__: None
:RTSLibError: None
:__doc__: None
:utils: None
:MappedLUN: None
environ:
:USERNAME=root
:LANG=en_US.UTF-8
:TERM=xterm
:SHELL=/bin/bash
:SUDO_COMMAND=/bin/bash
:SHLVL=1
:HOSTNAME=controller
:SUDO_UID=1000
:SUDO_GID=1000
:HISTSIZE=1000
:HISTCONTROL=ignoredups
:PWD=/root
:LOGNAME=root
:USER=root
:MAIL=/var/spool/mail/root
:PATH=/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
:SUDO_USER=vagrant
:LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd
=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42
:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.
lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;3
1:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*
.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:
*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;3
1:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01
;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pg
m=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:
*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01
;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m
4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:
*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;3
5:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01
;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid
=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.
wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:
:HOME=/root
:LESSOPEN=||/usr/bin/lesspipe.sh %s
:_=/bin/targetcli
os_info:
:NAME="CentOS Linux"
:VERSION="7 (Core)"
:ID="centos"
:ID_LIKE="rhel fedora"
:VERSION_ID="7"
:PRETTY_NAME="CentOS Linux 7 (Core)"
:ANSI_COLOR="0;31"
:CPE_NAME="cpe:/o:centos:centos:7"
:HOME_URL="https://www.centos.org/"
:BUG_REPORT_URL="https://bugs.centos.org/"
:
&
我想这可能是一个错误。我用谷歌搜索但没有找到任何东西。我决定降级该软件包,但这似乎不可能。
[root@controller ~]# yum downgrade targetcli
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.nluug.nl
* epel: ftp.nluug.nl
* extras: ftp.nluug.nl
* updates: ftp.nluug.nl
Nothing to do
现在我真的很担心,因为我无法再访问 iSCSI 目标。如何解决问题或降级软件包以便我可以再次访问 iSCSI?
答案1
您好,我遇到了同样的问题,以下步骤解决了它。
yum remove targetcli
yum update
yum install targetcli
答案2
遇到完全相同的问题,我发现解决方案是安装 py-parsing 模块。
1)我会安装easy_install
https://pypi.python.org/pypi/setuptools#downloads)
2)获取解析模块easy_install py-parsing
答案3
我有同样的问题。可能是版本问题,请检查版本
[root@linux ~]# rpm -qi targetcli | grep -i version
Version : 2.1.fb41
fb41描述的版本是41。
[root@linux ~]# yum -y remove targetcli
[root@linux ~]# wget -c ftp://bo.mirror.garr.it/1/slc/centos/7.1.1503/os/x86_64/Packages/targetcli-2.1.fb37-3.el7.noarch.rpm
[root@linux ~]# yum install targetcli-2.1.fb37-3.el7.noarch.rpm
[root@linux ~]# targetcli
希望以上链接对您有所帮助。
答案4
执行下面的命令它将解决
yum install python-six python