Show internal scheduler information

Registered by Tiantian Gao

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"
        }
    ]
}

Blueprint information

Status:
Not started
Approver:
Andrew Laski
Priority:
Undefined
Drafter:
Tiantian Gao
Direction:
Needs approval
Assignee:
Qiu Yu
Definition:
Drafting
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Whiteboard

@Tiantian, as we discussed in Hong Kong summit. I'd like to assign myself to this BP. Besides, it could be related to BP record-scheduler-information [1]. However, record-scheduler-information BP is scheduler centric, while this one could be instance centric. --qiuyu

[1] https://blueprints.launchpad.net/nova/+spec/record-scheduler-information

Please find more discussion at following link. --qiuyu
http://lists.openstack.org/pipermail/openstack-dev/2013-December/021650.html

[alaski] Can this be accomplished by just storing the reason in an instance-action-event? That way we don't need a new table and API to expose information that's very similar to what instance actions already provides. I would prefer to not add a new table or API if possible.

[qiuyu] Yes, that's what I'm trying to do by storing such infomation into instance-action-event. Please check following BP for reference. Still a work in progress though.
https://blueprints.launchpad.net/nova/+spec/improve-instance-action-events

[qiuyu] The orignal requirement shall be addressed after following two bp [1][2]have been finished. Could someone assign me the bp so that I could update the bp dependency here?
[1] https://blueprints.launchpad.net/nova/+spec/improve-instance-action-events
[2] https://blueprints.launchpad.net/nova/+spec/make-instance-action-use-objects@Tiantian, as we discussed in Hong Kong summit. I'd like to assign myself to this BP. Besides, it could be related to BP record-scheduler-information [1]. However, record-scheduler-information BP is scheduler centric, while this one could be instance centric. --qiuyu

[1] https://blueprints.launchpad.net/nova/+spec/record-scheduler-information

Please find more discussion at following link. --qiuyu
http://lists.openstack.org/pipermail/openstack-dev/2013-December/021650.html

[alaski] Can this be accomplished by just storing the reason in an instance-action-event? That way we don't need a new table and API to expose information that's very similar to what instance actions already provides. I would prefer to not add a new table or API if possible.

[qiuyu] Yes, that's what I'm trying to do by storing such infomation into instance-action-event. Please check following BP for reference. Still a work in progress though.
https://blueprints.launchpad.net/nova/+spec/improve-instance-action-events

[qiuyu] The orignal requirement shall be addressed after following two bp [1][2]have been finished. Could someone assign me the bp so that I could update the bp dependency here?
[1] https://blueprints.launchpad.net/nova/+spec/improve-instance-action-events
[2] https://blueprints.launchpad.net/nova/+spec/make-instance-action-use-objects

Marking this blueprint as definition: Drafting. If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)@Tiantian, as we discussed in Hong Kong summit. I'd like to assign myself to this BP. Besides, it could be related to BP record-scheduler-information [1]. However, record-scheduler-information BP is scheduler centric, while this one could be instance centric. --qiuyu

[1] https://blueprints.launchpad.net/nova/+spec/record-scheduler-information

Please find more discussion at following link. --qiuyu
http://lists.openstack.org/pipermail/openstack-dev/2013-December/021650.html

[alaski] Can this be accomplished by just storing the reason in an instance-action-event? That way we don't need a new table and API to expose information that's very similar to what instance actions already provides. I would prefer to not add a new table or API if possible.

[qiuyu] Yes, that's what I'm trying to do by storing such infomation into instance-action-event. Please check following BP for reference. Still a work in progress though.
https://blueprints.launchpad.net/nova/+spec/improve-instance-action-events

[qiuyu] The orignal requirement shall be addressed after following two bp [1][2]have been finished. Could someone assign me the bp so that I could update the bp dependency here?
[1] https://blueprints.launchpad.net/nova/+spec/improve-instance-action-events
[2] https://blueprints.launchpad.net/nova/+spec/make-instance-action-use-objects@Tiantian, as we discussed in Hong Kong summit. I'd like to assign myself to this BP. Besides, it could be related to BP record-scheduler-information [1]. However, record-scheduler-information BP is scheduler centric, while this one could be instance centric. --qiuyu

[1] https://blueprints.launchpad.net/nova/+spec/record-scheduler-information

Please find more discussion at following link. --qiuyu
http://lists.openstack.org/pipermail/openstack-dev/2013-December/021650.html

[alaski] Can this be accomplished by just storing the reason in an instance-action-event? That way we don't need a new table and API to expose information that's very similar to what instance actions already provides. I would prefer to not add a new table or API if possible.

[qiuyu] Yes, that's what I'm trying to do by storing such infomation into instance-action-event. Please check following BP for reference. Still a work in progress though.
https://blueprints.launchpad.net/nova/+spec/improve-instance-action-events

[qiuyu] The orignal requirement shall be addressed after following two bp [1][2]have been finished. Could someone assign me the bp so that I could update the bp dependency here?
[1] https://blueprints.launchpad.net/nova/+spec/improve-instance-action-events
[2] https://blueprints.launchpad.net/nova/+spec/make-instance-action-use-objects

Marking this blueprint as definition: Drafting. If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)

Marking this blueprint as definition: Drafting. If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.