Management commands¶
A management command is an instruction sent to a running service, for example "reset", "reload the model" or "change the auto-scaler's threshold". Commands go to the policies inside a block's services (load balancer, auto-scaler, health checker), to the block's instances, or to a cluster's stability checker.
At a glance
Submit with: POST /api/executeMgmtCommand on the Parser.
What's available: depends on the target. Each policy defines its commands in its management() method, and each instance defines them in its management() method.
How it works¶
The Parser validates the request against its template, then sends it through the Cluster Controller Gateway to the right cluster. There, governance checks apply (the block_mgmt or cluster_mgmt pre-check policies), and the command is delivered to the target service.
flowchart LR
U["You"] -->|"executeMgmtCommand"| P["Parser"]
P --> G["Cluster Controller Gateway<br/><small>block_mgmt / cluster_mgmt checks</small>"]
G --> CC["Cluster Controller"]
CC --> S["Target service<br/><small>instances, executor, autoscaler,<br/>health, stability_checker</small>"]
Targets¶
| Target | Identify with | service values |
|---|---|---|
| A block | blockId |
instances (all instance pods), executor (load balancer), autoscaler, health |
| A cluster | clusterId |
stability_checker |
Fields¶
| Field | Type | Required | Description |
|---|---|---|---|
blockId |
string | One of blockId or clusterId |
Target block, for block commands. |
clusterId |
string | One of blockId or clusterId |
Target cluster, for cluster commands. |
service |
string | Yes | Which service receives the command (see the table above). |
mgmtCommand |
string | Yes | The command name, as implemented by the target. |
mgmtData |
object | No | Data the command needs. |
Set either blockId or clusterId, not both.
Examples¶
Send it:
curl -X POST http://<parser-url>/api/executeMgmtCommand \
-H "Content-Type: application/json" \
-d '{
"header": {
"templateUri": "Parser/V1",
"parameters": {}
},
"body": {
"spec": {
"values": {
"blockId": "block-xyz-001",
"service": "executor",
"mgmtCommand": "<command>",
"mgmtData": {}
}
}
}
}'
Other ways to send commands¶
| Route | When to use it | Reference |
|---|---|---|
| Parser (this page) | Standard route, with template validation. | — |
Cluster Controller Gateway: /blocks/mgmt, /cluster/mgmt |
Direct to the network gateway. | Gateway API |
Cluster Controller: /mgmt |
Inside a specific cluster. | Cluster Controller API |
Block endpoints: /block/<id>/executor/mgmt and others |
Straight to one block service. | Block runtime |
vDAG controller: /quota/mgmt, /health/mgmt, /quality-check/mgmt |
vDAG controller policies. | vDAG controller |