Story #801
closedAs a user, I can use the pulp API to check on the status of my Pulp deployment
100%
Description
(this story was originally rally story #US2840)
There are a lot of Pulp services to manage, especially on multi-machine installations. For correct operation some services need to be singletons, which further complicates starting Pulp correctly. This story is designed to use the status field of the API to give information about the state of the Pulp deployment. It should help the user answer the question "is Pulp online and ready?"
There are three main things to implement here:
1) Gather the state of the all celery workers, celerybeat, the resource manager, mongodb, and qpid
2) Evaluate the health of the data gathered in (1), and determine an overall status
3) Take the data from (1) and (2), and also include any errors and return them to the user as a json data structure
The availability of httpd returning a 200 OK monitors the availability of httpd implicitly
Also you'll need to:
Document this API call as the status field
Add a new, short section on monitoring Pulp which refers to the API docs
additional notes:
The /status call can be invoked via 'curl -k https://localhost/pulp/api/v2/status/', it does not require any auth.
The returned JSON should display the following:
- list of running workers
- the status of the qpid connection, via 'messaging_connection'
- the status of the mongo connection, via 'database_connection'
- the api version (this is a legacy item that's hard-coded to '2')
- the platform version under 'versions' (should be '2.6.0' for now)
If qpidd or mongo is started/stopped, the status on the returned info should change immediately.
More info is available at http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/status.html. There is a small bug in the doc, the '500' response should not occur. I believe Ina is fixing that as part of a Django conversion.
Related issues
Fix pulpcore deploy dir
closes #801