分享

cinder创建逻辑卷后无法挂载到实例VM

renjie 发表于 2016-4-10 09:00:34 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 6 9160
环境:openstack icehouse版本,Centos6.5
1,在cinder节点创建卷v_test4,正常,日志如下:
2016-04-10 08:39:52.831 1592 INFO cinder.volume.flows.manager.create_volume [req-29f6c1ef-d82b-4f92-9194-d543808fb9da 6f62d63413654c3cb0bc3563d139a637 f770dc670f5d4cde8abf44c0f72d5a1d - - -] Volume volume-5792bff6-fd81-4bc2-b99f-f081e8c801d8 (5792bff6-fd81-4bc2-b99f-f081e8c801d8): created successfully

2,在dashboard中点击编辑挂载,使其挂到一个实例VM上
后台报错:
2016-04-10 08:53:18.695 1992 WARNING cinder.context [-] Arguments dropped when creating context: {'user': u'6f62d63413654c3cb0bc3563d139a637', 'tenant': u'f770dc670f5d4cde8abf44c0f72d5a1d', 'user_identity': u'6f62d63413654c3cb0bc3563d139a637 f770dc670f5d4cde8abf44c0f72d5a1d - - -'}
2016-04-10 08:53:18.785 1992 INFO cinder.brick.iscsi.iscsi [req-75186b34-3307-4fdf-a047-dcf899ab71d5 6f62d63413654c3cb0bc3563d139a637 f770dc670f5d4cde8abf44c0f72d5a1d - - -] Creating iscsi_target for volume: volume-3c7202a2-2f3a-4e4c-9d8d-e60d5f92a554
2016-04-10 08:53:19.085 1992 ERROR cinder.brick.iscsi.iscsi [req-75186b34-3307-4fdf-a047-dcf899ab71d5 6f62d63413654c3cb0bc3563d139a637 f770dc670f5d4cde8abf44c0f72d5a1d - - -] Failed to create iscsi target for volume id:volume-3c7202a2-2f3a-4e4c-9d8d-e60d5f92a554.
2016-04-10 08:53:19.086 1992 ERROR oslo.messaging.rpc.dispatcher [req-75186b34-3307-4fdf-a047-dcf899ab71d5 6f62d63413654c3cb0bc3563d139a637 f770dc670f5d4cde8abf44c0f72d5a1d - - -] Exception during message handling: info() takes exactly 4 arguments (3 given)
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 133, in _dispatch_and_reply
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher     incoming.message))
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 176, in _dispatch
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher     return self._do_dispatch(endpoint, method, ctxt, args)
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 122, in _do_dispatch
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher     result = getattr(endpoint, method)(ctxt, **new_args)
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/cinder/volume/manager.py", line 790, in initialize_connection
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher     volume)
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/cinder/volume/drivers/lvm.py", line 525, in create_export
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher     return self._create_export(context, volume)
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/cinder/volume/drivers/lvm.py", line 534, in _create_export
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher     data = self.target_helper.create_export(context, volume, volume_path)
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/cinder/volume/iscsi.py", line 53, in create_export
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher     chap_auth)
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/cinder/brick/iscsi/iscsi.py", line 539, in create_iscsi_target
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher     "id:%s.") % vol_id)
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib64/python2.6/logging/__init__.py", line 1337, in error
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher     self.logger.error(msg, *args, **kwargs)
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib64/python2.6/logging/__init__.py", line 1090, in error
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher     self._log(ERROR, msg, args, **kwargs)
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib64/python2.6/logging/__init__.py", line 1181, in _log
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher     self.handle(record)
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib64/python2.6/logging/__init__.py", line 1191, in handle
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher     self.callHandlers(record)
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib64/python2.6/logging/__init__.py", line 1228, in callHandlers
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher     hdlr.handle(record)
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib64/python2.6/logging/__init__.py", line 687, in handle
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher     self.emit(record)
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/cinder/openstack/common/log_handler.py", line 29, in emit
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher     dict(error=record.msg))
2016-04-10 08:53:19.086 1992 TRACE oslo.messaging.rpc.dispatcher TypeError: info() takes exactly 4 arguments (3 given)




已有(6)人评论

跳转到指定楼层
renjie 发表于 2016-4-10 09:04:02
补充:
创建卷后,在/etc/cinder/volumes里没有创建相应的target
回复

使用道具 举报

renjie 发表于 2016-4-10 09:13:46
刚才的错误发现原因了,是实例没有启动,但是启动后,又报了无法创建target的错误:

2016-04-10 09:12:33.192 1992 WARNING cinder.context [-] Arguments dropped when creating context: {'user': u'6f62d63413654c3cb0bc3563d139a637', 'tenant': u'f770dc670f5d4cde8abf44c0f72d5a1d', 'user_identity': u'6f62d63413654c3cb0bc3563d139a637 f770dc670f5d4cde8abf44c0f72d5a1d - - -'}
2016-04-10 09:12:33.298 1992 INFO cinder.brick.iscsi.iscsi [req-752dbb67-8196-455f-a2da-3bb2bd1af8b8 6f62d63413654c3cb0bc3563d139a637 f770dc670f5d4cde8abf44c0f72d5a1d - - -] Creating iscsi_target for volume: volume-3c7202a2-2f3a-4e4c-9d8d-e60d5f92a554
2016-04-10 09:12:33.604 1992 ERROR cinder.brick.iscsi.iscsi [req-752dbb67-8196-455f-a2da-3bb2bd1af8b8 6f62d63413654c3cb0bc3563d139a637 f770dc670f5d4cde8abf44c0f72d5a1d - - -] Failed to create iscsi target for volume id:volume-3c7202a2-2f3a-4e4c-9d8d-e60d5f92a554.
2016-04-10 09:12:33.607 1992 ERROR oslo.messaging.rpc.dispatcher [req-752dbb67-8196-455f-a2da-3bb2bd1af8b8 6f62d63413654c3cb0bc3563d139a637 f770dc670f5d4cde8abf44c0f72d5a1d - - -] Exception during message handling: info() takes exactly 4 arguments (3 given)
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 133, in _dispatch_and_reply
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher     incoming.message))
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 176, in _dispatch
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher     return self._do_dispatch(endpoint, method, ctxt, args)
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 122, in _do_dispatch
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher     result = getattr(endpoint, method)(ctxt, **new_args)
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/cinder/volume/manager.py", line 790, in initialize_connection
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher     volume)
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/cinder/volume/drivers/lvm.py", line 525, in create_export
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher     return self._create_export(context, volume)
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/cinder/volume/drivers/lvm.py", line 534, in _create_export
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher     data = self.target_helper.create_export(context, volume, volume_path)
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/cinder/volume/iscsi.py", line 53, in create_export
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher     chap_auth)
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/cinder/brick/iscsi/iscsi.py", line 539, in create_iscsi_target
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher     "id:%s.") % vol_id)
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib64/python2.6/logging/__init__.py", line 1337, in error
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher     self.logger.error(msg, *args, **kwargs)
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib64/python2.6/logging/__init__.py", line 1090, in error
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher     self._log(ERROR, msg, args, **kwargs)
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib64/python2.6/logging/__init__.py", line 1181, in _log
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher     self.handle(record)
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib64/python2.6/logging/__init__.py", line 1191, in handle
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher     self.callHandlers(record)
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib64/python2.6/logging/__init__.py", line 1228, in callHandlers
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher     hdlr.handle(record)
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib64/python2.6/logging/__init__.py", line 687, in handle
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher     self.emit(record)
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/cinder/openstack/common/log_handler.py", line 29, in emit
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher     dict(error=record.msg))
2016-04-10 09:12:33.607 1992 TRACE oslo.messaging.rpc.dispatcher TypeError: info() takes exactly 4 arguments (3 given)
回复

使用道具 举报

renjie 发表于 2016-4-10 09:42:54
问题解决,方法如下:
1,yum install scsi-target-utils
2,vi /etc/cinder/cinder.conf
# iscsi target user-land tool to use (string value)
iscsi_helper=tgtadm
之后重启,可以挂载到实例
回复

使用道具 举报

bioger_hit 发表于 2016-4-10 10:25:34
renjie 发表于 2016-4-10 09:42
问题解决,方法如下:
1,yum install scsi-target-utils
2,vi /etc/cinder/cinder.conf

这是哪个版本的
回复

使用道具 举报

renjie 发表于 2016-4-11 09:42:44
iscsi块存储
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条