[Openstack] Nova writing lock files in /usr/lib/pymodules/python2.6

Soren Hansen soren at linux2go.dk
Wed Apr 27 04:42:19 UTC 2011


2011/4/26 Thomas Goirand <thomas at goirand.fr>:
> Hi,
>
> I thought I was the only one, as using Debian, but it seems I'm not.
>
> Nova is trying to write in /usr/lib/pymodules/python2.6. It should not,
> as an admin can decide to mount /usr read only. Here's the output:
>
> http://paste.openstack.org/show/1253/
>
> Of course, doing:
>
> chown nova /usr/lib/pymodules/python2.6
>
> kinds of fixes it, but that should never happens. Lock files should be
> written somewhere in /var, probably in /var/lib/nova/locks in this case.
>
> Is this a known issue (I haven't see it in a launchpad bug)? Is that an
> issue in python-lockfile? And more importantly: how to fix?
>
> I saw, in utils.py, a "FLAGS.lock_path". Should I just add a
> --lock_path=/var/lib/nova/locks in /etc/nova/nova.conf? In this case,
> why isn't /var/lib/nova/locks the default, and how to change that
> default in the code so that by default it goes in /var?

The nova.conf we ship in the Debian packages already sets lock_path to
/var/lock/nova.

The default matches the default for everything else: images_path,
instances_path, buckets_path, etc.  They all default to the top
srcdir, although they can be modified all at once by setting
state_path. This is convenient during development, but dreadful for
deployment. Patches that fix this would be happily accepted. I'd be
thrilled we didn't have to have a nova.conf by default.

-- 
Soren Hansen        | http://linux2go.dk/
Ubuntu Developer    | http://www.ubuntu.com/
OpenStack Developer | http://www.openstack.org/




More information about the Openstack mailing list