unit tests fail w/ RPC error importutils.import_module(_CONF.rpc_backend)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Dan Prince |
Bug Description
I'm seeing failures when running a variety of the unit tests suites indivudually:
_RPCIMPL = importutils.
AttributeError: 'NoneType' object has no attribute 'rpc_backend'
This happens right now when I run:
./run_tests.sh test_compute
Or :
./run_tests.sh api.openstack.
Essentially anything that makes use of fake rpc stuff during testing.
The fix seems to be to do this:
diff --git a/nova/
index 31e1902..1eadf9f 100644
--- a/nova/
+++ b/nova/
@@ -68,6 +68,7 @@ def setup():
from nova.db import migration
from nova.network import manager as network_manager
from nova.tests import fake_flags
+ #rpc.register_
if FLAGS.sql_
if migration.
Changed in nova: | |
importance: | Undecided → High |
assignee: | nobody → Dan Prince (dan-prince) |
status: | New → In Progress |
Changed in nova: | |
milestone: | none → folsom-1 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | folsom-1 → 2012.2 |
I've been running the tests a bunch, both individual tests and the whole test suite, and never saw a problem. :-(
I'm wondering why the line " FLAGS.register_ opts(rpc. rpc_opts) " that comes just a few lines above the line you're adding didn't avoid this problem. The only difference is that this line would also call into whatever rpc_backend is configured and let it register anything it wants to, as well. Since fake_flags is loaded at this point, it's going to call into nova.rpc.impl_fake, which doesn't register anything....