CCI-MOC / openstack-billing-from-db

Simple billing from the database
Apache License 2.0
1 stars 3 forks source link

Query all controllers for backups #67

Closed knikolla closed 1 month ago

knikolla commented 1 month ago

There currently is a problem with ctl-0, which is where we always fetched backups from.

This extends the fetch script to look in the directories of other controllers too.

Additionally, it fixes a KeyError when nothing is returned from the query. It now checks for the presence of the key, rather than size.

File "/app/openstack_billing_db/fetch.py", line 67, in download_latest_dump_from_s3
    if len(dumps["Contents"]) == 0:
           ~~~~~^^^^^^^^^^^^
KeyError: 'Contents'