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
Fix metadata service for OpenStack #526
Conversation
requests.get().json() returns a dict and not an object. fixes #525
The tests failed, but looking at the error |
@@ -389,7 +389,7 @@ def get_instance_metadata(provider): | |||
mapping = {} # Disable multi-url fetch | |||
url = 'http://169.254.169.254/openstack/latest/meta_data.json' | |||
openstack_metadata = requests.get(url, timeout=5).json() | |||
metadata['zone'] = openstack_metadata.availability_zone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no dealing at this point with errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the old implementation just crashed. If the current MR has an issue the same would happen.
👍 |
1 similar comment
👍 |
Merged. |
requests.get().json() returns a dict and not an object.
fixes #525
@baylisscg you contributed the change a few months ago in https://github.com/zalando/spilo/pull/486/files. Maybe you could have a look at this change and the issue #525 and provide some feedback if you agree with it or if you see an issue?