Closed kusor closed 1 year ago
In case you guys care about this, we stopped using this in-line exec endpoint in favour of a websocket, since dealing with timeouts on long-running commands through this interface is pretty painful. https://github.com/arekinath/sdc-cloudapi/commit/8ee0fa4ce9d16ee3b1b50ef7f6010cbd28fe14b7 is the current revision of our patch with the websocket bit (it's very similar to the VNC websocket endpoint, though probably needs some of the same cleanup which the VNC one had done to it when it was upstreamed).
In case you guys care about this, we stopped using this in-line exec endpoint in favour of a websocket, since dealing with timeouts on long-running commands through this interface is pretty painful. arekinath@8ee0fa4 is the current revision of our patch with the websocket bit (it's very similar to the VNC websocket endpoint, though probably needs some of the same cleanup which the VNC one had done to it when it was upstreamed).
I definitely like the idea of using a websocket, yeah! I'm gonna make a new issue to update the end-point to use websockets.
Btw, now that I've got your attention: any special preference to use a FSM? I'd personally go ahead with something simpler for this kind of thing, though.
@arekinath Curious if you brought over other docker api features into cloudapi zones like the /archive endpoint for uploading tar.gz's into zones? Might be worth adding this functionality.
https://github.com/joyent/sdc-docker/blob/master/lib/endpoints/containers.js#L838
@kusor I use the FSMs because I don't trust myself to cover all the async error cases and racey bits without them. If you're confident you can cover everything without them, go for it.
@Smithx10 Nah, we haven't bothered with that. We just use exec to run tar | curl
or curl | tar
if we need to move things in and out with this mechanism at the moment. It seemed easier to do in parallel across a lot of machines (just sign a Manta URL for all of them to upload to and hand them out in the curl
commands, instead of dealing with a whole bunch of high bandwidth tar streams all coming through cloudapi and the client that requested the tarballs at once).
Co-authored-by: Alex Wilson alex@uq.edu.au