1 =========================================
2 OpenStack NOVA API for marking host down.
3 =========================================
8 https://blueprints.launchpad.net/nova/+spec/mark-host-down
9 https://blueprints.launchpad.net/python-novaclient/+spec/support-force-down-service
14 This API will give external fault monitoring system a possibility of telling
15 OpenStack Nova fast that compute host is down. This will immediately enable
16 calling of evacuation of any VM on host and further enabling faster HA
22 In OpenStack the nova-compute service state can represent the compute host
23 state and this new API is used to force this service down. It is assumed
24 that the one calling this API has made sure the host is also fenced or
25 powered down. This is important, so there is no chance same VM instance will
26 appear twice in case evacuated to new compute host. When host is recovered
27 by any means, the external system is responsible of calling the API again to
28 disable forced_down flag and let the host nova-compute service report again
29 host being up. If network fenced host come up again it should not boot VMs
30 it had if figuring out they are evacuated to other compute host. The
31 decision of deleting or booting VMs there used to be on host should be
32 enhanced later to be more reliable by Nova blueprint:
33 https://blueprints.launchpad.net/nova/+spec/robustify-evacuate
35 REST API for forcing down:
36 ==========================
38 Parameter explanations:
39 tenant_id: Identifier of the tenant.
40 binary: Compute service binary name.
41 host: Compute host name.
42 forced_down: Compute service forced down flag.
43 token: Token received after successful authentication.
44 service_host_ip: Serving controller node ip.
47 PUT /v2.1/{tenant_id}/os-services/force-down
49 "binary": "nova-compute",
59 "binary": "nova-compute",
65 curl -g -i -X PUT http://{service_host_ip}:8774/v2.1/{tenant_id}/os-services
66 /force-down -H "Content-Type: application/json" -H "Accept: application/json
67 " -H "X-OpenStack-Nova-API-Version: 2.11" -H "X-Auth-Token: {token}" -d '{"b
68 inary": "nova-compute", "host": "compute1", "forced_down": true}'
73 nova service-force-down <hostname> nova-compute
76 nova service-force-down compute1 nova-compute
78 REST API for disabling forced down:
79 ===================================
81 Parameter explanations:
82 tenant_id: Identifier of the tenant.
83 binary: Compute service binary name.
84 host: Compute host name.
85 forced_down: Compute service forced down flag.
86 token: Token received after successful authentication.
87 service_host_ip: Serving controller node ip.
90 PUT /v2.1/{tenant_id}/os-services/force-down
92 "binary": "nova-compute",
102 "binary": "nova-compute",
108 curl -g -i -X PUT http://{service_host_ip}:8774/v2.1/{tenant_id}/os-services
109 /force-down -H "Content-Type: application/json" -H "Accept: application/json
110 " -H "X-OpenStack-Nova-API-Version: 2.11" -H "X-Auth-Token: {token}" -d '{"b
111 inary": "nova-compute", "host": "compute1", "forced_down": false}'
113 CLI for disabling forced down:
114 ==============================
116 nova service-force-down --unset <hostname> nova-compute
119 nova service-force-down --unset compute1 nova-compute