-
Notifications
You must be signed in to change notification settings - Fork 85
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
Add incoming/indexer/storage information to V1 API's status endpoint #995
Conversation
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.
Test fails for a good reason; you'd also need to add a few Gabbi tests.
Otherwise that looks promising!
@@ -232,3 +233,6 @@ def process_measures_for_sack(self, sack): | |||
self.ioctx.remove_omap_keys(op, tuple(processed_keys)) | |||
self.ioctx.operate_write_op(op, str(sack), | |||
flags=self.OMAP_WRITE_FLAGS) | |||
|
|||
def get_health_status(self): |
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.
you can just go with get_health_status = get_ceph_health_status
I guess?
@@ -0,0 +1,108 @@ | |||
# -*- coding:Utf-8 -*- |
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.
add license header (copy paste from any file)
from collections import OrderedDict | ||
import six | ||
|
||
|
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.
This file has a bunch of Ceph, Redis, etc specific stuff so I'm not comforable having that here.
There's already a gnocchi/common
directory where you can put those function, e.g. put the get_ceph_health_status
in gnocchi/common/ceph.py
file.
('name', driver.__class__.__name__) | ||
]) | ||
try: | ||
driver.s3.list_objects_v2( |
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.
I feel like this is an heavy operation with a lot of data that can be returned. Maybe something lighter? or setting a limit of just returning 1 object?
This is a great addition, would you like to continue working on this? |
@mergify rebase |
Command
Hey, I reacted but my real name is @Mergifyio |
Superceeded by #1078 |
Performed during pycon 2018 at Lille, FR.
This PR adds a common API to all incoming/indexer/storage drivers to check their availability.
Availability (and some extra information on each driver, if available) is returned within the V1 status endpoint.
Should address the #958 issue (
v1/status/
should be used instead ofhealthcheck/
).