Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query all controllers for backups #67

Merged
merged 1 commit into from
May 30, 2024

Conversation

knikolla
Copy link
Collaborator

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'

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.

```python
File "/app/openstack_billing_db/fetch.py", line 67, in download_latest_dump_from_s3
    if len(dumps["Contents"]) == 0:
           ~~~~~^^^^^^^^^^^^
KeyError: 'Contents'
```
@knikolla knikolla requested a review from naved001 May 30, 2024 19:29
@knikolla knikolla merged commit 6b30a5e into CCI-MOC:main May 30, 2024
3 checks passed
@knikolla knikolla deleted the other_controller_backups branch May 30, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants