How to setup NFS v4 on shared instance storage?

asked 2013-10-10 01:39:19 -0500

Danie gravatar image

updated 2013-10-11 17:41:12 -0500

smaffulli gravatar image

Ubuntu 12.04 LTS/Openstack Grizzly an all nodes. 1 Controller and 2 Computes. Controller acts as a NFSv4 server.

# cat /etc/exports
/srv/nfs/instances      192.168.10.0/24(fsid=0,rw,sync,no_subtree_check,no_root_squash)

Computes nodes have it mounted under /var/lib/nova/instances Note: The uid and gid for kvm and nova are exactly the same on the compute nodes.

#cat /etc/libvirt/qemu.conf
user = "nova"
group = "kvm"

The 1st compute node gets the request to start up and vm and proceeds, while the 2nd complains about not finding a lock on the shared mounted volume. Look at the logs below for the 2nd compute. So how do I setup nfs to do this? Am I missing something?

Many Thanks! Danie

     2013-10-09 16:40:49.531 11868 TRACE nova.compute.manager [instance: 09f3ae51-9994-4f9f-ae59-b91722b8aafd] Traceback (most recent call last):
    2013-10-09 16:40:49.531 11868 TRACE nova.compute.manager [instance: 09f3ae51-9994-4f9f-ae59-b91722b8aafd]   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1119, in _spawn
    2013-10-09 16:40:49.531 11868 TRACE nova.compute.manager [instance: 09f3ae51-9994-4f9f-ae59-b91722b8aafd]     block_device_info)
    2013-10-09 16:40:49.531 11868 TRACE nova.compute.manager [instance: 09f3ae51-9994-4f9f-ae59-b91722b8aafd]   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 1524, in spawn
    2013-10-09
 16:40:49.531 11868 TRACE nova.compute.manager [instance: 09f3ae51-9994-4f9f-ae59-b91722b8aafd]     admin_pass=admin_password)
    2013-10-09 16:40:49.531 11868 TRACE nova.compute.manager [instance: 09f3ae51-9994-4f9f-ae59-b91722b8aafd]   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 1809, in _create_image
    2013-10-09 16:40:49.531 11868 TRACE nova.compute.manager [instance: 09f3ae51-9994-4f9f-ae59-b91722b8aafd]     project_id=instance['project_id'])
    2013-10-09 16:40:49.531 11868 TRACE nova.compute.manager [instance: 09f3ae51-9994-4f9f-ae59-b91722b8aafd]   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 158, in cache
    2013-10-09 16:40:49.531 11868 TRACE nova.compute.manager [instance: 09f3ae51-9994-4f9f-ae59-b91722b8aafd]     *args, **kwargs)
    2013-10-09 16:40:49.531 11868 TRACE nova.compute.manager [instance: 09f3ae51-9994-4f9f-ae59-b91722b8aafd]   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 294, in create_image
    2013-10-09 16:40:49.531 11868 TRACE nova.compute.manager [instance: 09f3ae51-9994-4f9f-ae59-b91722b8aafd]     copy_qcow2_image(base, self.path, size)
    2013-10-09 16:40:49.531 11868 TRACE nova.compute.manager [instance: 09f3ae51-9994-4f9f-ae59-b91722b8aafd]   File "/usr/lib/python2.7/dist-packages/nova/openstack/common/lockutils.py", line 221, in inner
    2013-10-09 16:40:49.531 11868 TRACE nova.compute.manager [instance: 09f3ae51-9994-4f9f-ae59-b91722b8aafd]     with lock:
    2013-10-09 16:40:49.531 11868 TRACE nova.compute.manager [instance: 09f3ae51-9994-4f9f-ae59-b91722b8aafd]   File "/usr/lib/python2.7/dist-packages/nova/openstack/common/lockutils.py", line 83, in __enter__
    2013-10-09 16:40:49.531 11868 TRACE nova.compute.manager [instance: 09f3ae51-9994-4f9f-ae59-b91722b8aafd]     self.trylock()
    2013-10-09 16:40:49.531 11868 TRACE nova.compute.manager [instance: 09f3ae51-9994-4f9f-ae59-b91722b8aafd]   File "/usr/lib/python2.7/dist-packages/nova/openstack/common/lockutils.py", line 118, in trylock
    2013-10-09 16:40:49.531 11868 TRACE nova.compute.manager [instance: 09f3ae51-9994-4f9f-ae59-b91722b8aafd]     fcntl.lockf(self.lockfile, fcntl.LOCK_EX | fcntl.LOCK_NB)
    2013-10-09 16:40:49.531 11868 TRACE nova.compute.manager [instance: 09f3ae51-9994-4f9f-ae59-b91722b8aafd] IOError: [Errno 37] No locks available
    2013-10-09 16:40 ...
(more)
edit retag flag offensive close delete