nova-volume fails at start time: bad init script

Bug #950763 reported by Rafael Durán Castañeda
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Unassigned

Bug Description

Hi,

I'm runing nova-volume from 2012.1~e4-0ubuntu0~ppa1~oneiric1 package, when nova-volume starts it fails inmediatly:

Starting volume node (version 2012.1-LOCALBRANCH:LOCALREVISION)
2012-03-09 11:43:14 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/service.py", line 413, in wait
(nova): TRACE: _launcher.wait()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/service.py", line 131, in wait
(nova): TRACE: service.wait()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 166, in wait
(nova): TRACE: return self._exit_event.wait()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 116, in wait
(nova): TRACE: return hubs.get_hub().switch()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 177, in switch
(nova): TRACE: return self.greenlet.switch()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
(nova): TRACE: result = function(*args, **kwargs)
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/service.py", line 101, in run_server
(nova): TRACE: server.start()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/service.py", line 161, in start
(nova): TRACE: utils.cleanup_file_locks()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/utils.py", line 898, 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): TRACE:

This is due a missing check for '/var/lock/nova' in nova-volume.conf init script:

description "Nova Volume server"
author "Soren Hansen <email address hidden>"

start on (filesystem and net-device-up IFACE!=lo)
stop on runlevel [016]

chdir /var/run

pre-start script
        mkdir -p /var/run/nova
        chown nova:root /var/run/nova/
end script

exec su -s /bin/sh -c "exec nova-volume --flagfile=/etc/nova/nova.conf" nova

So you can fix it just adding:

        mkdir -p /var/lock/nova
        chown nova:root /var/lock/nova/

as you do in other Nova packages.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.