lock_path config option seems to have no effect

Bug #1347915 reported by Alex Meade
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Valeriy Ponomaryov

Bug Description

It seems that manila always tries to create lock files in the current working directory for the manila service and ignores the 'lock_path' configuration option. This is a problem on systems where the manila service does not have permissions to write to the working directory and results in the following issue where the share service cannot start.

See: http://paste.openstack.org/show/87836/

Revision history for this message
Alex Meade (alex-meade) wrote :

This seems to be an issue with the current manila/openstack/common/lockutils.py which means this may affect other openstack projects as well.

Revision history for this message
Valeriy Ponomaryov (vponomaryov) wrote :

1) There is no such option as 'lock_file' in configuration.
2) There are option 'lock_path', that has default value to env var 'MANILA_LOCK_PATH', see:
https://github.com/stackforge/manila/blob/2a0890e3580f0cf1e7578c1f59eef55431ef0c65/manila/openstack/common/lockutils.py#L43

So, this can be changed in 2 (two) ways:

- set env var 'MANILA_LOCK_PATH' to some value, for example:
export MANILA_LOCK_PATH=/tmp/
It will use this dir as lock storage.

- set 'lock_path' opt in Manila's configuration.

In conclusion: there is no bug in Manila code, there is wrong configuration.

Changed in manila:
status: New → Invalid
Revision history for this message
Alex Meade (alex-meade) wrote :

Yeah i meant 'lock_path' and the bug is meant to say that specifying it in the config has no effect.

Changed in manila:
status: Invalid → New
description: updated
Changed in manila:
assignee: nobody → Valeriy Ponomaryov (vponomaryov)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.openstack.org/109562

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/109562
Committed: https://git.openstack.org/cgit/stackforge/manila/commit/?id=fe675be8329a29674436f6e9bfcd5eac87989249
Submitter: Jenkins
Branch: master

commit fe675be8329a29674436f6e9bfcd5eac87989249
Author: Valeriy Ponomaryov <email address hidden>
Date: Fri Aug 22 06:05:55 2014 -0400

    Updated usage of locks

    Changes:
    - replaced direct usage of sychronized func from lockutils with local wrapper,
      that provides prefix;
    - 'lock_path' is not provided anymore as hardcode, defined 'lock_path'
      in config is expected;
    - added MANILA_LOCK_PATH to devstack plugin, to be able to set path
      before installation.

    Change-Id: I6518df0a6d32f1021b19a48f928f9ec8b00140b2
    Closes-Bug: #1347915

Changed in manila:
status: In Progress → Fix Committed
Changed in manila:
status: Fix Committed → Fix Released
Changed in manila:
milestone: none → juno-3
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.