Ask Your Question
2

Cinder ERROR cinder.api.middleware.fault

asked 2016-06-30 09:47:10 -0500

jckreddy gravatar image
 Not able to attach cinder volumes 
got below error 

cinder error :  Caught error: [Errno [Errno 20] Not a directory: u'/var/lock/cinder/cinder-a8b88ce2-0084-4119-bca9-23f2d7361ae3'

"/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line
 395, in lock\n    ext_lock.acquire(delay=delay)\n', '  File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 200, in acquire\n    self.lockfile = open(self.
fname, \'a\')\n', "IOError: [Errno 20] Not a directory: u'/var/lock/cinder/cinder-a8b88ce2-0084-4119-bca9-23f2d7361ae3'\n"]
Sep 27 16:51:58 controller cinder-api: 2015-09-27 16:51:58.336 4166 ERROR cinder.api.middleware.fault [req-d9645d19-5458-450e-9cab-fbc4497b2485 e992f26acdc945ddaa971b9bba0fa2d3 0f
99344d13e14359a277ae2e497ba145 - - -] Caught error: [Errno [Errno 20] Not a directory: u'/var/lock/cinder/cinder-a8b88ce2-0084-4119-bca9-23f2d7361ae3'
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2016-06-30 10:28:11 -0500

jckreddy gravatar image

updated 2017-12-19 07:54:36 -0500

After hours of struggle i realized that 
this path "/var/lock/cinder" where cinder was a file not a directory 
(worngly created as file)
so deleted file and created cinder dir 

mkdir /var/lock/cinder
chmod 777 /var/lock/cinder/
chown -R cinder:cinder /var/lock/cinder/

[root@controller ~]# ls -lrt /var/lock/
total 0
drwxrwxr-x 2 root   lock    40 Jun 27 13:41 lockdev
drwx------ 2 root   root    60 Jun 22 15:15 iscsi
drwxr-xr-x 2 root   root   100 Jun 24 16:06 subsys
drwxrwxrwx 2 cinder cinder  40 Jul  1 10:15 cinder
drwx------ 2 root   root    40 Jun 27 17:41 lvm

After that able to do successfull volume attach 
[root@controller ~]# ls /var/lock/cinder/* -lrt
-rw-r--r-- 1 cinder cinder 0 Jul  1 10:26 /var/lock/cinder/cinder-a8b88ce2-0084-4119-bca9-23f2d7361ae3
-rw-r--r-- 1 cinder cinder 0 Jul  1 10:24 /var/lock/cinder/cinder-4433d217-f046-444a-9f5c-65ab92a9aa83
edit flag offensive delete link more
3

answered 2016-06-30 10:04:33 -0500

RHK gravatar image

updated 2016-06-30 10:17:20 -0500

check this in cinder.conf

[lvm]
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_group = cinder-volumes
iscsi_protocol = iscsi
iscsi_helper = tgtadm

Let me know if this works. If not provide some more information from logs.

Regards,
RHK

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-06-30 09:47:10 -0500

Seen: 790 times

Last updated: Dec 19 '17