I’m deploying some user code using Fly machines. I’ve set the restart policy to “no” so that when the process crashes, it won’t restart. When the user’s container fails to get spun up (when there’s a bug in their code, for example), the fly machines run
command hangs forever since the CLI waits for the machine to reach “started” state, and it never does; since restart was set to “no”, the process crashes and sets the state to “stopped.”
Can we make it so that the fly m run
command will exit with an error if a machine moves from created to stopped state due to an error, instead of waiting around forever?
fly m run . -a 105349741723321386951-fly-machines-4-say-hello -t QCMUb_9WFgHAZkjd3lb6b1BjVV3eDtmBkeEgYF8Mrzo -c {"config":{"guest":{"cpu_kind":"shared","cpus":1,"memory_mb":256},"restart":{"policy":"no"}}}