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 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344
|
.. -*- rst -*-
================
Instance actions
================
Restart instance
~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{project_id}/instances/{instanceId}/action
Restarts the database service for an instance.
The restart operation restarts only the database instance. Restarting
the database erases any dynamic configuration settings that you make
in the database instance.
The database service is unavailable until the instance restart finishes.
Normal response codes: 202
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id
- instanceId: instanceId
Request Example
---------------
.. literalinclude:: samples/instance-action-restart-request.json
:language: javascript
Resize instance flavor
~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{project_id}/instances/{instanceId}/action
Resizes the (Nova)flavor for an instance.
If you provide a valid ``flavorRef``, this operation changes the
memory size of the instance, and restarts the database.
Normal response codes: 202
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id
- instanceId: instanceId
- flavorRef: flavorRef
Request Example
---------------
.. literalinclude:: samples/instance-action-resize-request.json
:language: javascript
Resize instance volume
~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{project_id}/instances/{instanceId}/action
Resizes the volume that is attached to an instance.
You can use this operation to increase but not decrease the volume
size. A valid volume size is an integer value in gigabytes (GB).
You cannot increase the volume to a size that is larger than the
API volume size limit.
For replication cluster, resizing volume of the primary will also resize
replicas automatically.
Normal response codes: 202
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id
- instanceId: instanceId
- volume: volume
Request Example
---------------
.. literalinclude:: samples/instance-action-resize-volume-request.json
:language: javascript
Promote instance to replica master
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{project_id}/instances/{instanceId}/action
Promotes a replica.
If you have set up replication, and the master instance is still reachable, you
can use this operation to promote a replica to be the new master instance.
This can be useful if you want to make a configuration change or maintenance to
the master instance. If you made the change on the master instance directly,
you would need to take the master instance down for the duration of the
operation. Instead, you can create a replica, make the configuration change on
the replica, and then promote the replica to become the new master instance.
Once this command is executed, the status of all the instances will be set to
``PROMOTE`` and Trove will work its magic until all of them to come back to
``HEALTHY``.
The ``instanceId`` is the instance ID of the replica you want to promote.
Normal response codes: 202
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id
- instanceId: instanceId
Request Example
---------------
.. literalinclude:: samples/instance-action-promote-replica-request.json
:language: javascript
Eject the master instance
~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{project_id}/instances/{instanceId}/action
Remove the master instance in a replication set.
This should be only done in a failed master scenario. This command ejects the
current master and then forces a re-election for the new master. The new master
is effectively the one with the most current replica of the old master.
Once this command is executed, the status of all the instances will be set to
``EJECT`` and Trove will work its magic until all of them to come back to
``HEALTHY``.
The ``instanceId`` is the ID of the current unavailable master instance.
Normal response codes: 202
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id
- instanceId: instanceId
Request Example
---------------
.. literalinclude:: samples/instance-action-eject-replica-request.json
:language: javascript
Reset instance status
~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{project_id}/instances/{instanceId}/action
Set instance service status to ``ERROR`` and clear the current task status.
Mark any running backup operations as ``FAILED``.
Normal response codes: 202
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id
- instanceId: instanceId
Request Example
---------------
.. literalinclude:: samples/instance-action-reset-status-request.json
:language: javascript
Stop database service
~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{project_id}/mgmt/instances/{instanceId}/action
Admin only API. Stop database service inside an instance.
Normal response codes: 202
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id
- instanceId: instanceId
Request Example
---------------
.. literalinclude:: samples/instance-mgmt-action-stop-request.json
:language: javascript
Reboot instance
~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{project_id}/mgmt/instances/{instanceId}/action
Admin only API. Reboot the database instance, database service will be stopped
before rebooting.
Normal response codes: 202
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id
- instanceId: instanceId
Request Example
---------------
.. literalinclude:: samples/instance-mgmt-action-reboot-request.json
:language: javascript
Cold Migrate instance
~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{project_id}/mgmt/instances/{instanceId}/action
Admin only API. Migrate(resize) the database instance, database service will be
stopped before migrating.
Normal response codes: 202
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id
- instanceId: instanceId
Request Example
---------------
.. literalinclude:: samples/instance-mgmt-action-migrate-request.json
:language: javascript
Reset instance task status
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{project_id}/mgmt/instances/{instanceId}/action
Admin only API. Reset task status of an instance, mark any running backup
operations as ``FAILED``.
Normal response codes: 202
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id
- instanceId: instanceId
Request Example
---------------
.. literalinclude:: samples/instance-mgmt-action-reset-task-status-request.json
:language: javascript
Rebuild instance
~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{project_id}/mgmt/instances/{instanceId}/action
Admin only API. Rebuild the Nova server's operating system for the database
instance. The rebuild operation is mainly for Trove upgrade, especially when
the interface between Trove controller and guest agent changes. After Trove
controller is upgraded, the cloud administrator needs to send rebuild request
with the new guest image ID. Communication with the end users is needed as the
database service goes offline during the process. User's data in the database
is not affected.
Normal response codes: 202
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id
- instanceId: instanceId
Request Example
---------------
.. literalinclude:: samples/instance-mgmt-action-rebuild-instance-request.json
:language: javascript
|