Files
Callum Dickinson ce80a04a26 Make image attributes in Gnocchi optional
The container_format and disk_format attributes for Glance images
can be set to null in certain cases (such as when images are "empty"
and have not any data uploaded to them yet).

Ceilometer does generate samples for these when processing
notifications or doing polling, and if the size attribute is available
and not set to None (which can happen in certain cases) it will try to
create the resource in Gnocchi and publish measures. This ends up
failing as the container_format and disk_format attributes are marked
as "required" in Gnocchi.

To make handling for this situation a little better (so these kinds of
resources can be monitored for at least), make the container_format and
disk_format attributes optional in Gnocchi.

Change-Id: I63edfa7d48aa3b75ee73cdcc091fa093c53879d3
Signed-off-by: Callum Dickinson <callum.dickinson@catalystcloud.nz>
2025-09-11 23:12:40 +12:00
..