rpc.register_opts race in service.py causes NoneType exception

Bug #995328 reported by Dan Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Dan Prince

Bug Description

Using the latest Nova Folsom. I'm seeing a race condition where sometimes rpc.register_opts isn't called quick enough on startup causing the following error:

2012-05-06 02:29:24 INFO nova.wsgi [-] Started S3 Objectstore on 172.19.0.3:3333
2012-05-06 02:29:25 AUDIT nova.service [-] SIGTERM received
2012-05-06 02:29:25 INFO nova.wsgi [-] WSGI server has stopped.
2012-05-06 02:29:25 CRITICAL nova [-] 'NoneType' object has no attribute 'rpc_backend'

----

The issue seems to be that 'wait()' gets called while service.start is still running. The issue *only* occurs if you try to use the RPC defaults (as in not specifying rpc_backend in the nova.conf file).

Dan Prince (dan-prince)
Changed in nova:
assignee: nobody → Dan Prince (dan-prince)
status: New → In Progress
importance: Undecided → Medium
importance: Medium → High
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/7168

Changed in nova:
milestone: none → folsom-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/7168
Committed: http://github.com/openstack/nova/commit/9a9a28e80ae043bdf7476651ea8d92aedf0ba36c
Submitter: Jenkins
Branch: master

commit 9a9a28e80ae043bdf7476651ea8d92aedf0ba36c
Author: Dan Prince <email address hidden>
Date: Sat May 5 22:42:36 2012 -0400

    Fix a race with rpc.register_opts in service.py.

    Fixes an issue in service.py where rpc.register_opts may not
    get called before wait() accesses FLAGS... which can cause
    NoneType exceptions with some versions of nova.conf.

    Fixes LP Bug #995328.

    Change-Id: Ib177c2a082a4cf1c22935c1e6fdf3ba714a33aca

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-1 → 2012.2
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.