Project

Profile

Help

Story #801

As a user, I can use the pulp API to check on the status of my Pulp deployment

Added by cduryee almost 7 years ago. Updated 11 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
2.6.0
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
January 2015
Quarter:

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

Has duplicate Pulp - Story #7: As an API user, I can see what workers are known to pulpCLOSED - DUPLICATE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 56c4cb57 View on GitHub
Added by Fabricio Aguiar 2 months ago

Fix pulpcore deploy dir

closes #801

Revision 56c4cb57 View on GitHub
Added by Fabricio Aguiar 2 months ago

Fix pulpcore deploy dir

closes #801

History

#1 Updated by bmbouter almost 7 years ago

  • Has duplicate Story #7: As an API user, I can see what workers are known to pulp added

#2 Updated by pthomas@redhat.com almost 7 years ago

verified

[root@sparks qpid]#  curl -k https://localhost/pulp/api/v2/status/
{"known_workers": [{"last_heartbeat": "2015-03-20T16:47:39Z", "name": "scheduler@sparks.idmqe.lab.eng.bos.redhat.com"}, {"last_heartbeat": "2015-03-20T16:47:49Z", "name": "reserved_resource_worker-2@sparks.idmqe.lab.eng.bos.redhat.com"}, {"last_heartbeat": "2015-03-20T16:47:48Z", "name": "reserved_resource_worker-3@sparks.idmqe.lab.eng.bos.redhat.com"}, {"last_heartbeat": "2015-03-20T16:47:48Z", "name": "reserved_resource_worker-0@sparks.idmqe.lab.eng.bos.redhat.com"}, {"last_heartbeat": "2015-03-20T16:47:48Z", "name": "resource_manager@sparks.idmqe.lab.eng.bos.redhat.com"}, {"last_heartbeat": "2015-03-20T16:47:48Z", "name": "reserved_resource_worker-1@sparks.idmqe.lab.eng.bos.redhat.com"}], "messaging_connection": {"connected": true}, "database_connection": {"connected": true}, "api_version": "2", "versions": {"platform_version": "2.6.0c10"}}[root@sparks qpid]# 
[root@sparks qpid]# 
[root@sparks qpid]# 
[root@sparks qpid]# 
[root@sparks qpid]# 
[root@sparks qpid]# service qpidd stop
Stopping Qpid AMQP daemon: [  OK  ]
[root@sparks qpid]# 
[root@sparks qpid]# 
[root@sparks qpid]#  curl -k https://localhost/pulp/api/v2/status/
{"known_workers": [{"last_heartbeat": "2015-03-20T16:49:09Z", "name": "scheduler@sparks.idmqe.lab.eng.bos.redhat.com"}, {"last_heartbeat": "2015-03-20T16:50:34Z", "name": "reserved_resource_worker-2@sparks.idmqe.lab.eng.bos.redhat.com"}, {"last_heartbeat": "2015-03-20T16:50:33Z", "name": "reserved_resource_worker-3@sparks.idmqe.lab.eng.bos.redhat.com"}, {"last_heartbeat": "2015-03-20T16:50:33Z", "name": "reserved_resource_worker-0@sparks.idmqe.lab.eng.bos.redhat.com"}, {"last_heartbeat": "2015-03-20T16:50:33Z", "name": "resource_manager@sparks.idmqe.lab.eng.bos.redhat.com"}, {"last_heartbeat": "2015-03-20T16:50:33Z", "name": "reserved_resource_worker-1@sparks.idmqe.lab.eng.bos.redhat.com"}], "messaging_connection": {"connected": false}, "database_connection": {"connected": true}, "api_version": "2", "versions": {"platform_version": "2.6.0c10"}}[root@sparks qpid]# 
[root@sparks qpid]# 
[root@sparks qpid]# 
[root@sparks qpid]# service qpidd start
Starting Qpid AMQP daemon: [  OK  ]
[root@sparks qpid]# 
[root@sparks qpid]# 
[root@sparks qpid]#  curl -k https://localhost/pulp/api/v2/status/
{"known_workers": [{"last_heartbeat": "2015-03-20T16:50:39Z", "name": "scheduler@sparks.idmqe.lab.eng.bos.redhat.com"}], "messaging_connection": {"connected": true}, "database_connection": {"connected": true}, "api_version": "2", "versions": {"platform_version": "2.6.0c10"}}[root@sparks qpid]# 
[root@sparks qpid]# 
[root@sparks qpid]#  curl -k https://localhost/pulp/api/v2/status/
{"known_workers": [{"last_heartbeat": "2015-03-20T16:50:39Z", "name": "scheduler@sparks.idmqe.lab.eng.bos.redhat.com"}, {"last_heartbeat": "2015-03-20T16:51:25Z", "name": "resource_manager@sparks.idmqe.lab.eng.bos.redhat.com"}, {"last_heartbeat": "2015-03-20T16:51:25Z", "name": "reserved_resource_worker-3@sparks.idmqe.lab.eng.bos.redhat.com"}, {"last_heartbeat": "2015-03-20T16:51:25Z", "name": "reserved_resource_worker-1@sparks.idmqe.lab.eng.bos.redhat.com"}, {"last_heartbeat": "2015-03-20T16:51:25Z", "name": "reserved_resource_worker-0@sparks.idmqe.lab.eng.bos.redhat.com"}, {"last_heartbeat": "2015-03-20T16:51:25Z", "name": "reserved_resource_worker-2@sparks.idmqe.lab.eng.bos.redhat.com"}], "messaging_connection": {"connected": true}, "database_connection": {"connected": true}, "api_version": "2", "versions": {"platform_version": "2.6.0c10"}}[root@sparks qpid]# 
[root@sparks qpid]# 

#3 Updated by pthomas@redhat.com almost 7 years ago

  • Status changed from 5 to 6

[root@sparks qpid]# rpm -qa pulp-server
pulp-server-2.6.0-0.10.rc.el6.noarch
[root@sparks qpid]#

#4 Updated by cduryee almost 7 years ago

  • Sprint/Milestone set to 9

This got done awhile back, I believe it was completed in January. Setting milestone as such.

#5 Updated by rbarlow almost 7 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#7 Updated by bmbouter almost 4 years ago

  • Sprint set to January 2015

#8 Updated by bmbouter almost 4 years ago

  • Sprint/Milestone deleted (9)

#9 Updated by bmbouter almost 3 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF