Bug 1041296

Summary: [RFE][nova]: Show internal scheduler information
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/internal-scheduler
Whiteboard: upstream_milestone_none upstream_status_unknown upstream_definition_drafting
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-19 17:22:30 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 14:16:45 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/nova/+spec/internal-scheduler.

Description:

Currently, NoValidHost exception happend without any detail information.
The only way to find out the reason is looking through nova logs. But if there 
are thousands of host, it will make sysadmin crazy.

So the blueprint propose an API to show internal information of scheduler process.
The API shows the filter result of each host and the reason why the host is failed.

The API looks like bellow:

GET /v2/{tenant}/servers/{instance}/os-schedule-info

{
    "schedule_info": [
        {
            "host": "ops1",
            "result": "failed",
            "reason": "does not have 16384 MB usable ram, it only has -106745.0 MB usable ram",
            "created_at": "2013-06-01 01:01:02.000"
        },
        {
            "host": "ops2",
            "result": "failed",
            "reason": "blablabla",
           "created_at": "2013-06-01 01:01:03.000"
        },
        {
            "host": "ops3",
            "result": "passed",
           "created_at": "2013-06-01 01:01:04.000"
        }
    ]
}

Specification URL (additional information):

None