“timeout”: -1, hasnt help.
Problem is, I start a newly created instance. It has very limited resources(CPU RAM …)
Than I force stop and delete it.
It seems the process of stopping takes too long despite:
{
“action”: “stop”,
“timeout”: -1,
“force”: true,
“stateful”: false
}
so, an immediate delete doesnt work.
I wished, at least this one would go easy without monitoring processes.
But indeed, operation need to be watched.
BTW, is there a clear instruction or examples of those two operations polling modes?
/1.0/operations/uuid/wait
/1.0/operations/uuid/websocket
You can just hit /wait for a blocking call until the operation is complete.
/websocket is only used for websocket operations (migrate, exec, console, …).
The other way to monitor operations is to connect to /1.0/events ahead of time (also a websocket) and then monitor the notification messages received on it. That’s what the CLI does as that’s a bit lighter weight and in some cases less racy than hitting /wait, but it’s quite a bit harder to implement so for what you want, just use /wait.