1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
4 =========================================
5 OpenStack NOVA API for marking host down.
6 =========================================
11 https://blueprints.launchpad.net/nova/+spec/mark-host-down
12 https://blueprints.launchpad.net/python-novaclient/+spec/support-force-down-service
17 This API will give external fault monitoring system a possibility of telling
18 OpenStack Nova fast that compute host is down. This will immediately enable
19 calling of evacuation of any VM on host and further enabling faster HA
25 In OpenStack the nova-compute service state can represent the compute host
26 state and this new API is used to force this service down. It is assumed
27 that the one calling this API has made sure the host is also fenced or
28 powered down. This is important, so there is no chance same VM instance will
29 appear twice in case evacuated to new compute host. When host is recovered
30 by any means, the external system is responsible of calling the API again to
31 disable forced_down flag and let the host nova-compute service report again
32 host being up. If network fenced host come up again it should not boot VMs
33 it had if figuring out they are evacuated to other compute host. The
34 decision of deleting or booting VMs there used to be on host should be
35 enhanced later to be more reliable by Nova blueprint:
36 https://blueprints.launchpad.net/nova/+spec/robustify-evacuate
38 REST API for forcing down:
39 ==========================
41 Parameter explanations:
42 tenant_id: Identifier of the tenant.
43 binary: Compute service binary name.
44 host: Compute host name.
45 forced_down: Compute service forced down flag.
46 token: Token received after successful authentication.
47 service_host_ip: Serving controller node ip.
50 PUT /v2.1/{tenant_id}/os-services/force-down
52 "binary": "nova-compute",
62 "binary": "nova-compute",
68 curl -g -i -X PUT http://{service_host_ip}:8774/v2.1/{tenant_id}/os-services
69 /force-down -H "Content-Type: application/json" -H "Accept: application/json
70 " -H "X-OpenStack-Nova-API-Version: 2.11" -H "X-Auth-Token: {token}" -d '{"b
71 inary": "nova-compute", "host": "compute1", "forced_down": true}'
76 nova service-force-down <hostname> nova-compute
79 nova service-force-down compute1 nova-compute
81 REST API for disabling forced down:
82 ===================================
84 Parameter explanations:
85 tenant_id: Identifier of the tenant.
86 binary: Compute service binary name.
87 host: Compute host name.
88 forced_down: Compute service forced down flag.
89 token: Token received after successful authentication.
90 service_host_ip: Serving controller node ip.
93 PUT /v2.1/{tenant_id}/os-services/force-down
95 "binary": "nova-compute",
105 "binary": "nova-compute",
111 curl -g -i -X PUT http://{service_host_ip}:8774/v2.1/{tenant_id}/os-services
112 /force-down -H "Content-Type: application/json" -H "Accept: application/json
113 " -H "X-OpenStack-Nova-API-Version: 2.11" -H "X-Auth-Token: {token}" -d '{"b
114 inary": "nova-compute", "host": "compute1", "forced_down": false}'
116 CLI for disabling forced down:
117 ==============================
119 nova service-force-down --unset <hostname> nova-compute
122 nova service-force-down --unset compute1 nova-compute