1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317
|
.. -*- rst -*-
Clusters (clusters)
===================
Administrator only. Lists all Cinder clusters, show cluster detail,
enable or disable a cluster.
Each cinder service runs on a *host* computer (possibly multiple services
on the same host; it depends how you decide to deploy cinder). In order
to support High Availibility scenarios, services can be grouped into
*clusters* where the same type of service (for example, cinder-volume)
can run on different hosts so that if one host goes down the service is
still available on a different host. Since there's no point having these
services sitting around doing nothing while waiting for some other host
to go down (which is also known as Active/Passive mode), grouping services
into clusters also allows cinder to support Active/Active mode in which
all services in a cluster are doing work all the time.
.. note::
Currently the only service that can be grouped into clusters is
``cinder-volume``.
Clusters are determined by the deployment configuration; that's why there
is no 'create-cluster' API call listed below. Once your services are up
and running, however, you can use the following API requests to get
information about your clusters and to update their status.
Disable cluster
~~~~~~~~~~~~~~~
.. rest_method:: PUT /v3/{project_id}/clusters/disable
Disables a cluster. Specify the cluster by its name and optionally the
binary name in the request body.
Available starting in the 3.7 microversion.
Response codes
--------------
.. rest_status_code:: success ../status.yaml
- 200
.. rest_status_code:: error ../status.yaml
- 400
- 404
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id_path
- name: cluster_name_required
- binary: cluster_binary
- disabled_reason: disabled_reason_body
Request Example
---------------
.. literalinclude:: ./samples/clusters/v3.7/cluster-disable-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- cluster: cluster
- name: cluster_name_resp
- binary: cluster_binary_resp
- state: cluster_state
- status: cluster_status
- replication_status: cluster_replication_status
- disabled_reason: disabled_reason_body
Response Example
----------------
.. literalinclude:: ./samples/clusters/v3.7/cluster-disable-response.json
:language: javascript
Enable cluster
~~~~~~~~~~~~~~
.. rest_method:: PUT /v3/{project_id}/clusters/enable
Enables a cluster. Specify the cluster by its name and optionally the
binary name in the request body.
Available starting in the 3.7 microversion.
Response codes
--------------
.. rest_status_code:: success ../status.yaml
- 200
.. rest_status_code:: error ../status.yaml
- 400
- 404
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id_path
- name: cluster_name_required
- binary: cluster_binary
Request Example
---------------
.. literalinclude:: ./samples/clusters/v3.7/cluster-enable-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- cluster: cluster
- name: cluster_name_resp
- binary: cluster_binary_resp
- state: cluster_state
- status: cluster_status
- replication_status: cluster_replication_status
- disabled_reason: disabled_reason_body
Response Example
----------------
.. literalinclude:: ./samples/clusters/v3.7/cluster-enable-response.json
:language: javascript
Show cluster details
~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v3/{project_id}/clusters/{cluster_name}
Shows details for a cluster by its name and optionally the
binary name.
Available starting in the 3.7 microversion.
Response codes
--------------
.. rest_status_code:: success ../status.yaml
- 200
.. rest_status_code:: error ../status.yaml
- 400
- 404
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id_path
- cluster_name: cluster_name_path
- binary: cluster_binary_query
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- cluster: cluster
- name: cluster_name_resp
- binary: cluster_binary_resp
- state: cluster_state
- status: cluster_status
- num_hosts: cluster_num_hosts
- num_down_hosts: cluster_num_down_hosts
- last_heartbeat: cluster_last_heartbeat
- created_at: created_at
- updated_at: updated_at
- disabled_reason: disabled_reason_body
- replication_status: cluster_replication_status
- frozen: cluster_frozen
- active_backend_id: cluster_active_backend_id
Response Example
----------------
.. literalinclude:: ./samples/clusters/v3.7/cluster-show-response.json
:language: javascript
List clusters
~~~~~~~~~~~~~
.. rest_method:: GET /v3/{project_id}/clusters
Lists all clusters.
Available starting in the 3.7 microversion.
Response codes
--------------
.. rest_status_code:: success ../status.yaml
- 200
.. rest_status_code:: error ../status.yaml
- 400
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id_path
- name: cluster_name_query
- binary: cluster_binary_query
- is_up: cluster_is_up_query
- disabled: cluster_disabled_query
- num_hosts: cluster_num_hosts_query
- num_down_hosts: cluster_num_down_hosts_query
- replication_status: cluster_replication_status_query
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- clusters: clusters
- name: cluster_name_resp
- binary: cluster_binary_resp
- state: cluster_state
- status: cluster_status
- replication_status: cluster_replication_status
Response Example
----------------
.. literalinclude:: ./samples/clusters/v3.7/clusters-list-response.json
:language: javascript
List clusters with details
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v3/{project_id}/clusters/detail
Lists all clusters with details.
Available starting in the 3.7 microversion.
Response codes
--------------
.. rest_status_code:: success ../status.yaml
- 200
.. rest_status_code:: error ../status.yaml
- 400
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id_path
- name: cluster_name_query
- binary: cluster_binary_query
- is_up: cluster_is_up_query
- disabled: cluster_disabled_query
- num_hosts: cluster_num_hosts_query
- num_down_hosts: cluster_num_down_hosts_query
- replication_status: cluster_replication_status_query
- frozen: cluster_frozen
- active_backend_id: cluster_active_backend_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- clusters: clusters
- name: cluster_name_resp
- binary: cluster_binary_resp
- state: cluster_state
- status: cluster_status
- num_hosts: cluster_num_hosts
- num_down_hosts: cluster_num_down_hosts
- last_heartbeat: cluster_last_heartbeat
- created_at: created_at
- updated_at: updated_at
- disabled_reason: disabled_reason_body
- replication_status: cluster_replication_status
- frozen: cluster_frozen
- active_backend_id: cluster_active_backend_id
Response Example
----------------
.. literalinclude:: ./samples/clusters/v3.7/clusters-list-detailed-response.json
:language: javascript
|