-
Notifications
You must be signed in to change notification settings - Fork 931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow retrieving stdout/stderr from a backgrounded exec #180
Comments
What exactly does this mean? |
On Wed, Dec 09, 2015 at 02:26:09PM -0800, Sven R. Kunze wrote:
we don't capture stdout/stderr by default since they could be very I think we initially filed this when we kept operations around
|
Yeah, if we wanted to still be able to retrieve them, we'd need to have an API under the operation to fetch them and then keep the operation in running state until after they've been fetched and the operation cancelled. |
You mean something for |
On Wed, Dec 09, 2015 at 02:54:49PM -0800, Sven R. Kunze wrote:
i don't know what you mean by "but different" here, but yes. something
|
This bug is about the LXD API rather than the client. There is a feature in our API which the client doesn't expose that allows you to spawn a command inside the container and not attach to it, in that mode, the command will just run to completion and the background operation will return. It's in that mode that we've been considering adding a way to keep the operation around and expose the content of stdout and stderr as it was when the command completed. |
I didn't know that. However, it sounds extremely useful for automation and to get rid of that weird shell-specific file redirection syntax. (I daresay built-in logrotate-like functionality would be great here, too. ;) ) Te me, non-interactive stdout and stderr are basically log data only. So, you basically want something like a |
Going to take a stab at this. One of my concerns when first thinking through this was polluting the host with all that console output. Luckily, we've since grown a log expiry mechanism that we can use for this. Current plan is:
That will then allow the client to retrieve stdout and stderr for the next 48 hours, after which, the log expiry mechanism will kick in and clear those files. |
When spawning exec without websocket, it'd be nice to have an extra flag in the API which would have the server capture stdout and stderr and make them available through the operation entry.
The text was updated successfully, but these errors were encountered: