yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #91393
[Bug 2008461] [NEW] Creating RequestSpec from flavor tries to use nonexistent attribute
Public bug reported:
Description
===========
Calling RequestSpec.from_primitives, which in turn calls spec._from_flavor ends with "AttributeError: module 'nova.objects' has no attribute 'Flavor'" after the check "isinstance(flavor, objects.Flavor)"
Steps to reproduce
==================
* I directly imported RequestSpec via "from nova.objects.request_spec import RequestSpec" for testing purposes
* I called RequestSpec.from_primitives
* RequestSpec.from_primitives called RequestSpec._from_flavor to fill the missing information
* RequestSpec._from_flavor performed a check "isinstance(flavor, objects.Flavor)", which resulted in the exception
Expected result
===============
I should have received a RequestSpec object or another error if the data provided was incorrect.
Actual result
=============
The exception "AttributeError: module 'nova.objects' has no attribute 'Flavor'" is raised.
Traceback:
RequestSpec.from_primitives(scheduler_connector_nova_rpc._context, dictionary_from_json, {})
File "/home/eouser/placement-simulation-tool/venv/lib/python3.10/site-packages/nova/objects/request_spec.py", line 331, in from_primitives
spec._from_flavor(flavor)
File "/home/eouser/placement-simulation-tool/venv/lib/python3.10/site-packages/nova/objects/request_spec.py", line 249, in _from_flavor
if isinstance(flavor, objects.Flavor):
AttributeError: module 'nova.objects' has no attribute 'Flavor'
Environment
===========
I use Nova 21.2.4 from PyPi, Python 3.10 on Ubuntu 20.04.
** Affects: nova
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/2008461
Title:
Creating RequestSpec from flavor tries to use nonexistent attribute
Status in OpenStack Compute (nova):
New
Bug description:
Description
===========
Calling RequestSpec.from_primitives, which in turn calls spec._from_flavor ends with "AttributeError: module 'nova.objects' has no attribute 'Flavor'" after the check "isinstance(flavor, objects.Flavor)"
Steps to reproduce
==================
* I directly imported RequestSpec via "from nova.objects.request_spec import RequestSpec" for testing purposes
* I called RequestSpec.from_primitives
* RequestSpec.from_primitives called RequestSpec._from_flavor to fill the missing information
* RequestSpec._from_flavor performed a check "isinstance(flavor, objects.Flavor)", which resulted in the exception
Expected result
===============
I should have received a RequestSpec object or another error if the data provided was incorrect.
Actual result
=============
The exception "AttributeError: module 'nova.objects' has no attribute 'Flavor'" is raised.
Traceback:
RequestSpec.from_primitives(scheduler_connector_nova_rpc._context, dictionary_from_json, {})
File "/home/eouser/placement-simulation-tool/venv/lib/python3.10/site-packages/nova/objects/request_spec.py", line 331, in from_primitives
spec._from_flavor(flavor)
File "/home/eouser/placement-simulation-tool/venv/lib/python3.10/site-packages/nova/objects/request_spec.py", line 249, in _from_flavor
if isinstance(flavor, objects.Flavor):
AttributeError: module 'nova.objects' has no attribute 'Flavor'
Environment
===========
I use Nova 21.2.4 from PyPi, Python 3.10 on Ubuntu 20.04.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/2008461/+subscriptions
Follow ups