oslo_concurrency.lock_path: sensible default value is missing

Bug #1550188 reported by James Page
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron (Ubuntu)
Won't Fix
High
Unassigned
openstack-pkg-tools (Ubuntu)
Won't Fix
Undecided
Unassigned
python-oslo.concurrency (Ubuntu)
Fix Released
High
Corey Bryant

Bug Description

Prior to upstream switching to generation of configuration files, oslo_concurrency.lock_path was set explicitly in neutron.conf to $state_path/lock, providing a sane default for end users.

With generation, this is not set explicitly in the configuration file and as a result is not set by default (it uses OSLO_LOCK_PATH by default which is unset in any package init/upstart/systemd configs).

This causes problems when agents try to create locks to perform actions, and caused quite alot of problems in mitaka b2 for the openstack puppet modules team (as they mutate installed configuration files, rather than managing a complete file).

James Page (james-page)
summary: - oslo_concurrency.lock_path default value is missing
+ oslo_concurrency.lock_path: sensible default value is missing
Changed in neutron (Ubuntu):
status: New → Triaged
importance: Undecided → High
milestone: none → ubuntu-16.02
Revision history for this message
James Page (james-page) wrote :

Couple of ideas on resolution:

1) update oslo_concurrency to fallback to '$state_path/lock' if OSLO_LOCK_PATH is not set

2) set OSLO_LOCK_PATH in agent configurations across the package.

3) patch the neutron.conf to set this explicitly (fragile - but we do already patch a few other things.)

Revision history for this message
James Page (james-page) wrote :

For reference, devstack sets a load of these explicitly:

lib/nova: iniset $NOVA_CONF oslo_concurrency lock_path "$NOVA_STATE_PATH"
lib/neutron-legacy: iniset $NEUTRON_CONF oslo_concurrency lock_path $DATA_DIR/neutron/lock
lib/cinder: iniset $CINDER_CONF oslo_concurrency lock_path $CINDER_STATE_PATH
lib/tempest: iniset $TEMPEST_CONFIG oslo_concurrency lock_path $TEMPEST_STATE_PATH

Revision history for this message
James Page (james-page) wrote :

The change in neutron-legacy was introduced as part of the switch to using generated config files:

   https://github.com/openstack-dev/devstack/commit/30d5fae3

Revision history for this message
James Page (james-page) wrote :

I'm favouring:

2) set OSLO_LOCK_PATH in agent configurations across the package.

as we can apply that quite generically across all pkgs with an update to openstack-pkg-tools + some minor delta on project specific configs.

Revision history for this message
James Page (james-page) wrote :

Throwing a test build into:

 https://launchpad.net/~james-page/+archive/ubuntu/xenial

for nova and neutron for this.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openstack-pkg-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
James Page (james-page) wrote :
Revision history for this message
Emilien Macchi (emilienm) wrote :
Revision history for this message
James Page (james-page) wrote :

Marking won't fix for anything other than oslo_concurrency.

Changed in openstack-pkg-tools (Ubuntu):
status: Confirmed → Won't Fix
Changed in neutron (Ubuntu):
status: Triaged → Won't Fix
Changed in python-oslo.concurrency (Ubuntu):
importance: Undecided → High
status: New → Triaged
assignee: nobody → Corey Bryant (corey.bryant)
Revision history for this message
Corey Bryant (corey.bryant) wrote :

I've just uploaded python-oslo.concurrency 3.0.0-1ubuntu1 which cherry picks the patch from upstream that uses tempfile.tempdir for lock_path if OSLO_LOCK_PATH is not set.

Changed in python-oslo.concurrency (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-oslo.concurrency - 3.0.0-1ubuntu1

---------------
python-oslo.concurrency (3.0.0-1ubuntu1) xenial; urgency=medium

  * d/p/lock-path-tempfile.patch: Cherry picked from upstream to set default
    of lock_file to a tempfile if OSLO_LOCK_PATH isn't set (LP: #1550188).
  * d/rules: Run tests for available Py3 versions instead of hardcoded Py3.4.

 -- Corey Bryant <email address hidden> Fri, 26 Feb 2016 08:21:02 -0500

Changed in python-oslo.concurrency (Ubuntu):
status: Fix Committed → Fix Released
Mathew Hodson (mhodson)
Changed in neutron (Ubuntu):
milestone: ubuntu-16.02 → none
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.