VNFM against Fenix API schema validation fix
[doctor.git] / docs / development / manuals / mark-host-down_manual.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3
4 =========================================
5 OpenStack NOVA API for marking host down.
6 =========================================
7
8 Related Blueprints:
9 ===================
10
11   https://blueprints.launchpad.net/nova/+spec/mark-host-down
12   https://blueprints.launchpad.net/python-novaclient/+spec/support-force-down-service
13
14 What the API is for
15 ===================
16
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
20   actions.
21
22 What this API does
23 ==================
24
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
37
38 REST API for forcing down:
39 ==========================
40
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.
48
49   request:
50   PUT /v2.1/{tenant_id}/os-services/force-down
51   {
52   "binary": "nova-compute",
53   "host": "compute1",
54   "forced_down": true
55   }
56
57   response:
58   200 OK
59   {
60   "service": {
61   "host": "compute1",
62   "binary": "nova-compute",
63   "forced_down": true
64   }
65   }
66
67   Example:
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}'
72
73 CLI for forcing down:
74 =====================
75
76   nova service-force-down <hostname> nova-compute
77
78   Example:
79   nova service-force-down compute1 nova-compute
80
81 REST API for disabling forced down:
82 ===================================
83
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.
91
92   request:
93   PUT /v2.1/{tenant_id}/os-services/force-down
94   {
95   "binary": "nova-compute",
96   "host": "compute1",
97   "forced_down": false
98   }
99
100   response:
101   200 OK
102   {
103   "service": {
104   "host": "compute1",
105   "binary": "nova-compute",
106   "forced_down": false
107   }
108   }
109
110   Example:
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}'
115
116 CLI for disabling forced down:
117 ==============================
118
119   nova service-force-down --unset <hostname> nova-compute
120
121   Example:
122   nova service-force-down --unset compute1 nova-compute