Bug 1041191

Summary: [RFE][nova]: API extension for fpinging instances
Product: Red Hat OpenStack Reporter: RHOS Integration <rhos-integ>
Component: RFEsAssignee: RHOS Maint <rhos-maint>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: markmc, yeylon
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/nova/+spec/fping-instances-ext
Whiteboard: upstream_milestone_none upstream_status_unknown upstream_definition_obsolete
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-19 17:10:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description RHOS Integration 2013-12-12 13:53:31 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/nova/+spec/fping-instances-ext.

Description:

It may be interesting for a cloud user or administrator to perform a simple instance monitoring. A ping could be an acceptable solution: it is fast and it quite reliable.

Proposed API calls.

GET /os-fping?[all_tenants=1]&[include=uuid[,uuid...][&exclude=...]
 
Performs fping for all VM in the current project and returns results. If `all_tenants` is requested, returns data for all projects.
`include` and `exclude` are parameters specifying VM masks. Consider that VM list is `VM_all`, then if `include` is set, the result will be `VM_all * VM_include`. if `include` is set, the result will be `VM_all  - VM_exclude`. `exclude` is ignored if `include` is specified.
 
Response: {“servers": [
{“id”: “038ab3ef-88d8-4be4-9587-ec37e59722e3”, “project_id”: “112”, “alive”: true}
]}


GET /os-fping/<vm-uuid>
Performs a check for single instance.
 
Response: {“server”: {
{“id”: “038ab3ef-88d8-4be4-9587-ec37e59722e3”, “project_id”: “112”, “alive”: true}
}


This API can be useful for a daemon that periodically polls VMs and sends notification for interested users.

 
Future plan: store `monitored` flag for VMs. It affects `GET /os-fping` call. VMs with this flag are always considered as `excluded` if `exclude` parameter is not specified.
This flag can be changed with the following call.

PUT /os-fping/vms/<vm-id>
Request body: {“monitored”: true}
Response: {“vm”: {
{“id”: “038ab3ef-88d8-4be4-9587-ec37e59722e3”, “project_id”: “112”, “monitored”: true, “alive”: true}
}




Specification URL (additional information):

None