bilelmsekni / OpenStack-Folsom-Install-guide

A full installation guide for OpenStack Folsom with Quantum
161 stars 136 forks source link

Cinder won't start ... #107

Closed goku417 closed 11 years ago

goku417 commented 11 years ago

Hi everybody !

Does anyone had think about a Disaster Recovery Process ? In my case, I did. So I simulate a disaster (rebooting the controller node) and my cinder-volume won't start...

Here's my log from /var/log/cinder/cinder-volume.log

2013-05-10 14:12:22 DEBUG cinder.utils [req-c74c4571-4d68-4297-83bc-ae030d8919b4 None None] backend <module 'cinder.db.sqlalchemy.api' from '/usr/lib/python2.7/dist-packages/cinder/db/sqlalchemy/api.pyc'> __get_backend /usr/lib/python2.7/dist-packages/cinder/utils.py:481 2013-05-10 14:12:22 DEBUG cinder.volume.manager [req-c74c4571-4d68-4297-83bc-ae030d8919b4 None None] Re-exporting 2 volumes init_host /usr/lib/python2.7/dist-packages/cinder/volume/manager.py:98 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

So I'm wondering if somebody has succeeded to recover from that error...

Thanks for your help!

fmanco commented 11 years ago

I think this is a know bug https://bugs.launchpad.net/cinder/+bug/1175207. It is already fixed but I don't know if or when it will be backported to folsom.

Since things changed a lot you cannot simply apply the patch. Once I fixed it only be removing old_name=old_name from /usr/lib/python2.7/dist-packages/cinder/volume/driver.py:352. You can try it but it was a quick hack. Don't know if it will cause problems.

goku417 commented 11 years ago

Thanks for your help ! I'll try this today !

pedrojimenez commented 11 years ago

I am also affected, i have changed it and it works inmediately. Volumes back to normality, and by the moment no more errors in cinder neither in volumes attached nor in booting from volumes.

vim /usr/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py

383 # NOTE(jdg): For TgtAdm case iscsi_name is the ONLY param we need 384 # should clean this all up at some point in the future 385 self.tgtadm.create_iscsi_target(iscsi_name, iscsi_target, 386 0, volume_path, chap_auth, 387 check_exit_code=False) 388 #check_exit_code=False, <--- OLD LINE 389 #old_name=old_name) <--- OLD LINE

Thanks to all for the help.

goku417 commented 11 years ago

Thx a lot guys !

It's really appreciated !