OpenStack Folsom实例重启之后cinder(2)

2013-05-10 14:12:22 2235 CRITICAL cinder [-] Got unknown keyword args to utils.execute: {'old_name': None}
2013-05-10 14:12:22 2235 TRACE cinder Traceback (most recent call last):
2013-05-10 14:12:22 2235 TRACE cinder File "/usr/bin/cinder-volume", line 48, in
2013-05-10 14:12:22 2235 TRACE cinder service.wait()
2013-05-10 14:12:22 2235 TRACE cinder File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 422, in wait
2013-05-10 14:12:22 2235 TRACE cinder _launcher.wait()
2013-05-10 14:12:22 2235 TRACE cinder File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 127, in wait
2013-05-10 14:12:22 2235 TRACE cinder service.wait()
2013-05-10 14:12:22 2235 TRACE cinder File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 166, in wait
2013-05-10 14:12:22 2235 TRACE cinder return self._exit_event.wait()
2013-05-10 14:12:22 2235 TRACE cinder File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 116, in wait
2013-05-10 14:12:22 2235 TRACE cinder return hubs.get_hub().switch()
2013-05-10 14:12:22 2235 TRACE cinder File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 177, in switch
2013-05-10 14:12:22 2235 TRACE cinder return self.greenlet.switch()
2013-05-10 14:12:22 2235 TRACE cinder File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
2013-05-10 14:12:22 2235 TRACE cinder result = function(*args, **kwargs)
2013-05-10 14:12:22 2235 TRACE cinder File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 88, in run_server
2013-05-10 14:12:22 2235 TRACE cinder server.start()
2013-05-10 14:12:22 2235 TRACE cinder File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 159, in start
2013-05-10 14:12:22 2235 TRACE cinder self.manager.init_host()
2013-05-10 14:12:22 2235 TRACE cinder File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 101, in init_host
2013-05-10 14:12:22 2235 TRACE cinder self.driver.ensure_export(ctxt, volume)
2013-05-10 14:12:22 2235 TRACE cinder File "/usr/lib/python2.7/dist-packages/cinder/volume/driver.py", line 352, in ensure_export
2013-05-10 14:12:22 2235 TRACE cinder old_name=old_name)
2013-05-10 14:12:22 2235 TRACE cinder File "/usr/lib/python2.7/dist-packages/cinder/volume/iscsi.py", line 198, in create_iscsi_target
2013-05-10 14:12:22 2235 TRACE cinder self._new_target(name, tid, **kwargs)
2013-05-10 14:12:22 2235 TRACE cinder File "/usr/lib/python2.7/dist-packages/cinder/volume/iscsi.py", line 211, in _new_target
2013-05-10 14:12:22 2235 TRACE cinder **kwargs)
2013-05-10 14:12:22 2235 TRACE cinder File "/usr/lib/python2.7/dist-packages/cinder/volume/iscsi.py", line 60, in _run
2013-05-10 14:12:22 2235 TRACE cinder self._execute(self._cmd, *args, run_as_root=True, **kwargs)
2013-05-10 14:12:22 2235 TRACE cinder File "/usr/lib/python2.7/dist-packages/cinder/utils.py", line 146, in execute
2013-05-10 14:12:22 2235 TRACE cinder 'to utils.execute: %r') % kwargs)
2013-05-10 14:12:22 2235 TRACE cinder Error: Got unknown keyword args to utils.execute: {'old_name': None}
2013-05-10 14:12:22 2235 TRACE cinder

错误分析:这是OpenStack Folsom版本的一个BUG,造成cinder-volumn服务在节点重启后无法正常启动,最新版本已经修订https://bugs.launchpad.net/cinder/+bug/1175207,可以自己通过修改源代码进行修改,修改如下:

1、打开文件/usr/lib/python2.7/dist-packages/cinder/volume/driver.py

2、找到352行,注释掉old_name=old_name这行代码,修改如下:

self.tgtadm.create_iscsi_target(iscsi_name, iscsi_target,
                                        0, volume_path,
                                        check_exit_code=False)
                                        #old_name=old_name)

3、重启cinder-volumn服务

service cinder-volume restart

服务正常启动,问题解决。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/1dd35f9515506ba08799000c966087cf.html