I added some traceback to nova-manage when it fails, so the error is this:
(venv) stack@filters:/opt/stack/nova$ nova-manage cell_v2 discover_hosts
2016-12-17 01:00:42.678 DEBUG oslo_policy.policy [req-3451c236-fd9d-4ab6-aa58-5b918a3b0fb0 None None] The policy file policy.json could not be found. from (pid=29801) load_rules /opt/stack/nova/.tox/venv/local/lib/python2.7/site-packages/oslo_policy/policy.py:520
error:
Traceback (most recent call last):
File "/opt/stack/nova/nova/cmd/manage.py", line 1584, in main
ret = fn(*fn_args, **fn_kwargs)
File "/opt/stack/nova/nova/cmd/manage.py", line 1519, in discover_hosts
cell_mappings = objects.CellMappingList.get_all(context)
File "/opt/stack/nova/.tox/venv/local/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 184, in wrapper
result = fn(cls, context, *args, **kwargs)
File "/opt/stack/nova/nova/objects/cell_mapping.py", line 127, in get_all
db_mappings = cls._get_all_from_db(context)
File "/opt/stack/nova/.tox/venv/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 894, in wrapper
return fn(*args, **kwargs)
File "/opt/stack/nova/nova/objects/cell_mapping.py", line 123, in _get_all_from_db
return context.session.query(api_models.CellMapping).all()
AttributeError: 'module' object has no attribute 'session'
I added some traceback to nova-manage when it fails, so the error is this:
(venv) stack@filters: /opt/stack/ nova$ nova-manage cell_v2 discover_hosts fd9d-4ab6- aa58-5b918a3b0f b0 None None] The policy file policy.json could not be found. from (pid=29801) load_rules /opt/stack/ nova/.tox/ venv/local/ lib/python2. 7/site- packages/ oslo_policy/ policy. py:520 nova/nova/ cmd/manage. py", line 1584, in main nova/nova/ cmd/manage. py", line 1519, in discover_hosts CellMappingList .get_all( context) nova/.tox/ venv/local/ lib/python2. 7/site- packages/ oslo_versionedo bjects/ base.py" , line 184, in wrapper nova/nova/ objects/ cell_mapping. py", line 127, in get_all all_from_ db(context) nova/.tox/ venv/local/ lib/python2. 7/site- packages/ oslo_db/ sqlalchemy/ enginefacade. py", line 894, in wrapper nova/nova/ objects/ cell_mapping. py", line 123, in _get_all_from_db session. query(api_ models. CellMapping) .all()
2016-12-17 01:00:42.678 DEBUG oslo_policy.policy [req-3451c236-
error:
Traceback (most recent call last):
File "/opt/stack/
ret = fn(*fn_args, **fn_kwargs)
File "/opt/stack/
cell_mappings = objects.
File "/opt/stack/
result = fn(cls, context, *args, **kwargs)
File "/opt/stack/
db_mappings = cls._get_
File "/opt/stack/
return fn(*args, **kwargs)
File "/opt/stack/
return context.
AttributeError: 'module' object has no attribute 'session'