{"action":"created","issue":{"url":"https://api.github.com/repos/nlf/dlite/issues/69","labels_url":"https://api.github.com/repos/nlf/dlite/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/nlf/dlite/issues/69/comments","events_url":"https://api.github.com/repos/nlf/dlite/issues/69/events","html_url":"https://github.com/nlf/dlite/issues/69","id":129867590,"number":69,"title":"Can't lock files on NFS mounted volume","user":{"login":"cwandrews","id":1382553,"avatar_url":"https://avatars.githubusercontent.com/u/1382553?v=3","gravatar_id":"","url":"https://api.github.com/users/cwandrews","html_url":"https://github.com/cwandrews","followers_url":"https://api.github.com/users/cwandrews/followers","following_url":"https://api.github.com/users/cwandrews/following{/other_user}","gists_url":"https://api.github.com/users/cwandrews/gists{/gist_id}","starred_url":"https://api.github.com/users/cwandrews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwandrews/subscriptions","organizations_url":"https://api.github.com/users/cwandrews/orgs","repos_url":"https://api.github.com/users/cwandrews/repos","events_url":"https://api.github.com/users/cwandrews/events{/privacy}","received_events_url":"https://api.github.com/users/cwandrews/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-29T19:57:31Z","updated_at":"2016-01-29T21:36:50Z","closed_at":"2016-01-29T21:34:51Z","body":"Seems that you can't get a lock in a volume mount. Here is some code that reproduces:\r\n``` python\r\nimport os\r\nimport fcntl\r\nfull_path = \"/tmptmp/locktest.txt\"\r\nf = os.open(full_path, os.O_WRONLY | os.O_CREAT | os.O_EXCL | getattr(os, 'O_BINARY', 0))\r\ndef fd(f):\r\n    return hasattr(f, 'fileno') and fileno() or f\r\ntry:\r\n    fcntl.lockf(fd(f), fcntl.LOCK_EX)\r\nfinally:\r\n    fcntl.lockf(fd(f), fcntl.LOCK_UN)\r\n    os.close(f)\r\n    os.remove(full_path)\r\n```\r\nrun that inside of a docker container with '/tmptmp' as a volume mount to reproduce. [This](http://serverfault.com/questions/61594/what-does-no-locks-available-mean) leads me to believe there is no lock daemon running to handle this.\r\n\r\nThe stack trace here:\r\n```\r\nTraceback (most recent call last):\r\n  File \"/tmptmp/nfs_lock_test.py\", line 8, in <module>\r\n    fcntl.lockf(fd(f), fcntl.LOCK_EX)\r\nIOError: [Errno 37] No locks available\r\n```"},"comment":{"url":"https://api.github.com/repos/nlf/dlite/issues/comments/176979614","html_url":"https://github.com/nlf/dlite/issues/69#issuecomment-176979614","issue_url":"https://api.github.com/repos/nlf/dlite/issues/69","id":176979614,"user":{"login":"nlf","id":424045,"avatar_url":"https://avatars.githubusercontent.com/u/424045?v=3","gravatar_id":"","url":"https://api.github.com/users/nlf","html_url":"https://github.com/nlf","followers_url":"https://api.github.com/users/nlf/followers","following_url":"https://api.github.com/users/nlf/following{/other_user}","gists_url":"https://api.github.com/users/nlf/gists{/gist_id}","starred_url":"https://api.github.com/users/nlf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nlf/subscriptions","organizations_url":"https://api.github.com/users/nlf/orgs","repos_url":"https://api.github.com/users/nlf/repos","events_url":"https://api.github.com/users/nlf/events{/privacy}","received_events_url":"https://api.github.com/users/nlf/received_events","type":"User","site_admin":false},"created_at":"2016-01-29T21:36:50Z","updated_at":"2016-01-29T21:36:50Z","body":"added the lock daemon to dhyve-os 2.1.1, which i just published. also confirmed this fixed your issue"}}