How a command stands, with the end of its output
With wait_seconds, the answer comes when the command has ended or the time is up, whichever is first; when the time is up the answer is 200 with status running, and the caller asks again. Waiting keeps the sandbox from going to sleep by itself; if it is put to sleep while this call waits, the call waits on, and answers when its time is up with the command as it stood when the sandbox went to sleep, without waking it; if the sandbox is restarted from its disk meanwhile, the answer is 409 command_lost. Wakes a sandbox that sleeps, to read the command's output; not for an id the sandbox does not have, which is 404 from what the node noted.
Takes exec, or a token of the sandbox with exec.
https://api.glac.ai/v1/sandboxes/{id}/exec/{exec_id}인증
경로 파라미터
쿼리 파라미터
헤더 파라미터
Returns
200
The command; without the output fields when output=false.
다음 중 하나:
- ExecResult
- Exec
400
The request is not one this call takes. unknown_parameter: the query has a parameter this call does not take; invalid_field: a field or query parameter has the wrong type or is out of range.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.
401
missing_api_key, invalid_api_key, expired_api_key, invalid_token.
403
The credential may not do this. token_scope: the sandbox token lacks the scope. spend_limit_reached: the sandbox is frozen because a spend limit was reached; it sleeps, with its data, until the limit is raised.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.
404
Something the request names does not exist. sandbox_not_found: no such sandbox; exec_not_found: no such command in the sandbox.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.
409
The state of something stands in the way. sandbox_failed: the sandbox is failed; command_lost: the sandbox was restarted from its disk while the call waited; sandbox_moved: it was moved to another node while the call waited, and the command goes on there (to, epoch, offset): the same call through the control plane asks it there.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.
default
Any other failure, in the same shape. internal (500): the node failed; the message says no more, and the node's log has the reason under the request's id. unavailable (503, retryable): no_capacity, every network slot of the node is in use; memory_full, a machine the call has to start (made, woken, booted from its disk, resumed, rolled back, built) does not fit in the host's memory beside what the machines that run on it are promised, and nothing paused or idle could be put to sleep to make room for it (memory of the node); drive_full, the call would have a template built and the node's data drive has no room for one (drive of the node); unavailable, the node is shutting down, the sandbox was still starting after 10 minutes, or it did not answer, or it is being moved to this node (with Retry-After: 1); fenced, the node's lease fences the sandbox (Node.lease). moved (409): the sandbox was moved to another node, which to names.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.