Listing placement usages causes a circular reference error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Chris Dent |
Bug Description
With the removal of oslo versioned objects from from the Usage and UsageList classes, serializing usages can result in a ValueError: Circular reference detected because there is a decimal.Decimal in the data to be returned.
This is a result of a func.sum used in the query to get lists of aggregates.
Note that the creation of a Decimal does not happen with sqlite, so the problem is not revealed by the functional gabbi tests. It happened to show up in the pending gabbi-based integration tests https:/
This can be fixed by casting the 'used' value to an int when creating a Usage.
Changed in nova: | |
status: | Fix Committed → Fix Released |
Fixed by: https:/ /review. openstack. org/#/c/ 639216/