I run some long-running commands on a machine of mine using the machines API exec endpoint. Apparently something changed a few weeks ago because the same API calls now fail. My analysis showed that commands which should fork (run in the background and return immediately where called) do not fork any longer. I was able to confirm that passing the following command arrays to that endpoint actually waits for 4 seconds instead of returning immediately:
Fair enough. Could you put a shell script in your Dockerfile which contains the & / --fork background device, so that you don’t have to specify it in your exec? Maybe the command doesn’t like to do the fork, but the container should be fine with it.
Next I would try having this script baked into your container, launch the machine in Fly in the usual way. Now if you were to use exec then it will block per your original report. But if you shell into the machine, and run it from the console, what happens in that case?
I was wondering if your exec endpoint was opening up an interactive shell for the lifetime of the command, but I can’t see any such option in the JSON request body.
Finally I would suggest launching a very common Docker image (e.g. Slim Ubuntu) in Fly in case there is something weird with the kernel of the image you’re using.
No, I’m just a customer. There’s support information here, though it looks like staff hereabouts are pretty flexible about diving into anything. I can’t speak for them though