Bug 961557

Summary: Missing /var/lock/nova' Directory
Product: [Community] RDO Reporter: itzikb
Component: openstack-novaAssignee: RHOS Maint <rhos-maint>
Status: CLOSED NOTABUG QA Contact: Ami Jeain <ajeain>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: ndipanov, pbrady, rbryant, yeylon, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-10 13:09:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description itzikb 2013-05-10 00:03:36 UTC
Description of problem:

When Launching a new Instance I'm getting the following error:

2013-05-09 15:25:15.319 6734 TRACE nova.manager Traceback (most recent call last):
2013-05-09 15:25:15.319 6734 TRACE nova.manager   File "/usr/lib/python2.6/site-packages/nova/manager.py", line 241, in periodic_tasks
2013-05-09 15:25:15.319 6734 TRACE nova.manager     task(self, context)
2013-05-09 15:25:15.319 6734 TRACE nova.manager   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 4007, in _run_image_cache_manager_pass
2013-05-09 15:25:15.319 6734 TRACE nova.manager     storage_users.register_storage_use(CONF.instances_path, CONF.host)
2013-05-09 15:25:15.319 6734 TRACE nova.manager   File "/usr/lib/python2.6/site-packages/nova/openstack/common/lockutils.py", line 210, in inner
2013-05-09 15:25:15.319 6734 TRACE nova.manager     fileutils.ensure_tree(local_lock_path)
2013-05-09 15:25:15.319 6734 TRACE nova.manager   File "/usr/lib/python2.6/site-packages/nova/openstack/common/fileutils.py", line 29, in ensure_tree
2013-05-09 15:25:15.319 6734 TRACE nova.manager     os.makedirs(path)
2013-05-09 15:25:15.319 6734 TRACE nova.manager   File "/usr/lib64/python2.6/os.py", line 157, in makedirs
2013-05-09 15:25:15.319 6734 TRACE nova.manager     mkdir(name, mode)
2013-05-09 15:25:15.319 6734 TRACE nova.manager OSError: [Errno 13] Permission denied: '/var/lock/nova'

Running:
mkdir /var/lock/nova
chown nova:nova /var/lock/nova

Solved the problem.

Version-Release number of selected component (if applicable):
openstack-nova-compute-2013.1-2.el6.noarch

How reproducible:
Always after Installation

Steps to Reproduce:
1.Install openstack-compute Node with a proper configuration.
2.Launch an Instance
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Pádraig Brady 2013-05-10 11:36:57 UTC
RDO nova should come configured with lock_path=/var/lib/nova/tmp
in /etc/nova/nova.conf

/var/lock is controlled by the system, rather than nova,
and so the nova process doesn't have write access there.
Is there some reason why /var/lib/nova/tmp doesn't suffice?

Note it's important to define some value for lock_path,
as leaving it as "None" will trigger buggy tmp dir logic in nova.