Skip to content

Operations

Anything that changes your cloud runs in the background as an operation. The request returns at once with the operation, and you follow it until it finishes. This keeps the console, the CLI and agents responsive while a cloud takes minutes.

Kind Console label Started by
vm.create Create machine Creating a machine
vm.start Start machine Start
vm.stop Stop machine Stop
vm.delete Delete machine Delete
connection.sync Sync account Sync, connections sync
app.deploy Deploy app Deploying or rolling back an app
app.delete Delete app Delete app

Creating, checking, replacing and deleting connections, creating apps and setting app secrets are immediate; they are not operations.

Status Console Meaning
pending Waiting Queued.
running Running In progress.
succeeded Done Finished. result holds what it produced (e.g. a deploy’s release and URL).
failed Failed Finished with an error: code, message and usually a hint.

An operation also records its target, the resource or connection it acts on, when it was created, started and finished, and attempts: how many times Mayadyn picked it up. If Mayadyn is interrupted while running an operation, it picks the operation up again, up to 5 times.

Operation Typical time
Create or delete a machine 30 seconds to 3 minutes
Stop a machine on OCI Up to about 4 minutes
First deploy of an app (creates its host) Up to about 10 minutes
Later deploys Seconds to a minute or two

Console: Operations lists recent operations with Operation, Target, Status, Started, Took and Error. Machines and apps also show their own progress; a machine with work in progress shows Operation in progress.

CLI:

Terminal window
mayadyn ops list [--status pending|running|succeeded|failed]
mayadyn ops get <id>
mayadyn ops wait <id> [--timeout 10m]

Commands that start an operation accept --wait to wait until it finishes. Without it they print the operation and follow with: mayadyn ops wait <id>. ops wait gives up after --timeout (default 15 minutes).

Agents: wait_operation waits up to 55 seconds per call; call it again while the status is pending or running. See AI agents.

API: add ?wait=30s to a request that starts an operation, or to GET /v1/operations/{id}, to wait up to that long (at most 60 seconds). If the operation finished in time you get it finished; otherwise you get it as it stands. (A request that starts an operation answers 200 when it is finished and 202 otherwise.) See API: Operations.

An idempotency key is a string you attach to a change. If you send the same change again with the same key (because a call timed out, or you are not sure it went through), Mayadyn returns the first operation instead of doing the work twice. It never creates a second machine.

  • Keys are unique per project, up to 200 characters.
  • The same key with a different request is refused (conflict: “this Idempotency-Key was used for a different request”).
  • The console and the CLI generate a random key for every change. Pass your own with --idempotency-key on vms create, vms start|stop|delete and apps deploy.
  • Agents pass idempotency_key; generate one (e.g. a UUID) and keep it for retries.
  • API: the Idempotency-Key header.

Never retry a failed create with a new key until you have checked that no machine was made (mayadyn vms list).

A dry run checks a request and changes nothing.

Where How What it checks
Console Review in Create machine Name, region, size and image; shows the plan with the native size and image.
CLI --dry-run on vms create, vms start|stop|delete, apps deploy vms create prints what would be created and any warnings; the others print dry run: allowed or the error.
Agents dry_run: true on create_vm, start_vm, stop_vm, delete_vm, deploy_app Same as the CLI.
API ?dry_run=true Same.

Warnings in a dry run tell you when a size or image is not in the catalog (it is passed to the cloud as a native value), or when there is no SSH key (“you will not be able to log in to this VM”).

  • One operation at a time per machine and per app. A second request gets conflict with the running operation’s id; wait for it, then retry.
  • A workspace can have at most 200 operations waiting or running (per project for project tokens). Beyond that, new ones are refused with rate_limited: wait for some to finish.
  • Repeated syncs of one connection share one waiting operation.

A failed operation is final; Mayadyn does not retry it on its own. Read the error’s hint and act on it:

Code Retry?
capacity_unavailable, rate_limited, timeout, provider_error Usually yes, later (or another region or size for capacity).
quota_exceeded, auth_failed, permission_denied, connection_not_bound Only after you fix the account.
invalid_input, conflict After you change the request or wait for the other operation.

See Troubleshooting for every code.