nova.quota.py uses CONF on module load

Bug #1154371 reported by Chris Behrens
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Chris Behrens

Bug Description

Something started importing nova.quota before config options are parsed, meaning that the use of CONF.quota_driver does not work. Only the default value of that option is seen and used.

From eventlet backdoor on a service that has quota_driver=nova.quota.NoopQuotaDriver:

>>> nova.quota.QUOTAS._driver
<nova.quota.DbQuotaDriver object at 0x28de6d0>
>>> cfg.CONF.quota_driver
'nova.quota.NoopQuotaDriver'

Chris Behrens (cbehrens)
Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Chris Behrens (cbehrens)
Chris Behrens (cbehrens)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/24269
Committed: http://github.com/openstack/nova/commit/57e13de015307981bc6e34c970ad589d5671088f
Submitter: Jenkins
Branch: master

commit 57e13de015307981bc6e34c970ad589d5671088f
Author: Chris Behrens <email address hidden>
Date: Tue Mar 12 23:52:29 2013 +0000

    Lazy load CONF.quota_driver.

    nova.quota is imported before config options are parsed and it looks at
    CONF.quota_driver on module-load. This changes it so we look at
    CONF.quota_driver post-module-load.

    Fixes bug 1154371

    Change-Id: Ia2e63a7aeab2234be683ff507e7856d46601a9a8

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc1 → 2013.1
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.