*Theinfo returned by this endpoint is a subset of the info returned by `GET /status`.*
responses:
'500':
@ -164,7 +167,12 @@ paths:
summary:"Send modifications to the cluster layout"
description:|
Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout.
Note that setting the capacity to `null` will configure the node as a gateway.
Setting the capacity to `null` will configure the node as a gateway.
Otherwise, capacity must be now set in bytes (before Garage 0.9 it was arbitrary weights).
For example to declare 100GB, you must set `capacity:100000000000`.
Garage uses internally the International System of Units (SI), it assumes that 1kB = 1000 bytes, and displays storage as kB, MB, GB (and not KiB, MiB, GiB that assume 1KiB = 1024 bytes).
requestBody:
description:|
To add a new node to the layout or to change the configuration of an existing node, simply set the values you want (`zone`, `capacity`, and `tags`).
Applies to the cluster the layout changes currently registered as staged layout changes.
*Note:do not try to parse the `message` field of the response, it is given as an array of string specifically because its format is not stable.*
requestBody:
description:|
Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster.
@ -223,6 +233,31 @@ paths:
description:"Invalid syntax or requested change"
'200':
description:"The staged layout has been applied as the new layout of the cluster, a rebalance has been triggered."
content:
application/json:
schema:
type:object
required:[message, layout ]
properties:
message:
type:array
items:
type:string
example:
- "==== COMPUTATION OF A NEW PARTITION ASSIGNATION ===="
- ""
- "Partitions are replicated 1 times on at least 1 distinct zones."
- ""
- "Optimal partition size: 419.4 MB (3 B in previous layout)"