nova-volume fails to start: OSError: [Errno 2] No such file or directory: '/var/lock/nova'

Bug #940780 reported by Adam Gandelman
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
nova (Ubuntu)
Fix Released

Bug Description

Seems this commit has broken our CI testing, specifically nova-volume:

Devstack volume exercise failure at

euca-describe-instance shows the volume is the 'creating' state, traceback on nova-volume node shows:

2012-02-24 23:59:46 CRITICAL nova [-] [Errno 2] No such file or directory: '/var/lock/nova'
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/bin/nova-volume", line 49, in <module>
(nova): TRACE: service.wait()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/", line 413, in wait
(nova): TRACE: _launcher.wait()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/", line 131, in wait
(nova): TRACE: service.wait()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/", line 166, in wait
(nova): TRACE: return self._exit_event.wait()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/", line 116, in wait
(nova): TRACE: return hubs.get_hub().switch()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/hubs/", line 177, in switch
(nova): TRACE: return self.greenlet.switch()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/", line 192, in main
(nova): TRACE: result = function(*args, **kwargs)
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/", line 101, in run_server
(nova): TRACE: server.start()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/", line 161, in start
(nova): TRACE: utils.cleanup_file_locks()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/", line 896, in cleanup_file_locks
(nova): TRACE: files = os.listdir(FLAGS.lock_path)
(nova): TRACE: OSError: [Errno 2] No such file or directory: '/var/lock/nova'

nova-volume fails to start up.

Related branches

Revision history for this message
Adam Gandelman (gandelman-a) wrote :

It appears this is a packaging issue, as nova-volume.upstart does not create /var/lock/nova like other nova-* jobs. We should check that all nova-* upstart jobs ensure the directory exists, because the commit above adds a periodic task to all nova services that will fail if the directory is non-existent.

Changed in nova:
status: New → Invalid
Changed in nova (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nova - 2012.1~e4-0ubuntu1

nova (2012.1~e4-0ubuntu1) precise; urgency=low

  [ Adam Gandleman ]
  * debian/patches/libvirt-use-console-pipe.patch: Refreshed.
  * debain/ Ensure lock directory is created
    (LP: #940780)
  * debain/control: Fix nova-compute-$flavor Depends
  * debian/control: Add python-iso8601 to python-nova Depends

  [ Chuck Short ]
  * debian/rules: Fix FTBFS.
  * Merge Ubuntu/Debian packaging:
    - Thanks to Julien Danjou, Ghe Rivero, and Thomas Goirand
    - debian/copyright: Update copyright file.
    - debian/nova-api.init, debian/nova-compute.init,
      debian/nova-network.init, debian/nova-objectstore,
      debian/nova-scheduler, debian/nova-volume.init:
      Synchronize init scripts.
    - nova-common.install, debian/rules: Install policy.json
    - debian/rules, debian/nova-xcp-network.install,
      debian/nova-xcp-plugins.install, nova-xcp-plugins.postrm,
      debian/nova-xcp-plugins.doc, debian/nova-xcp-plugins.postinst,
      debian/README.xcp_and_openstack, debian/control,
      Add Xen XCP support.
    - debian/control,
      debian/nova-compute-{kvm,lxc,qemu,xen,uml}.postinst: Make
      nova-compute a virtual package.
    - Dropped ubuntu_ubuntu_control_vars: We dont use it
  * New upstream release.
  * Dropped python-babel, it will be handled by langpacks.
  * debian/patches/ec2-fixes.patch: Backport turnk fix for ec2
  * debian/patches/path-to-the-xenhost.conf-fixup.patch: Refreshed.
 -- Chuck Short <email address hidden> Fri, 02 Mar 2012 11:04:04 -0500

Changed in nova (Ubuntu):
status: New → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote :

Fixed in Precise, needs a packaging sync

Thierry Carrez (ttx)
no longer affects: openstack-ppa
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers