Listing placement usages causes a circular reference error

Bug #1817633 reported by Chris Dent on 2019-02-25
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
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 . See: for an example.

This can be fixed by casting the 'used' value to an int when creating a Usage.

Chris Dent (cdent) wrote :
Changed in nova:
status: Triaged → Fix Committed

This issue was fixed in the openstack/placement release candidate.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers