-
Notifications
You must be signed in to change notification settings - Fork 187
devshell: Print serial console as status line, dump when interrupted #1380
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
devshell: Print serial console as status line, dump when interrupted #1380
Conversation
|
Tried this out, though the output is a bit messy because it seems like some control characters still get through or something and we get a mix of some newline characters and some not? I'm pretty happy with |
I ran out of space in `/tmp` today and it turned out I had a whole lot of `/tmp/mantle-qemu` files, including some really big disk images. This is a combination of changes from coreos#1338 and the multipath PR coreos#1296 Basically if we get interrupted by Ctrl-C which is a lot more likely now when qemu isn't owning the serial console from the start, we will leak our tmpfiles. We probably need to install a `SIGINT` handler but that's a whole mess that's avoided if we just let the kernel clean up our resources for us, which is what was happening before the multipath PR (well, at least for files and not the swtpm tmpdir, but that's small). And actually coreos#1380 does install a `SIGINT` handler so someone please review that and we can maybe fix this more after that lands.
Previously if one had just `cosa build ostree` then `cosa run`, qemu just stalls out confused. (But this would be a bit better with coreos#1380 so someone review that please!)
Previously if one had just `cosa build ostree` then `cosa run`, qemu just stalls out confused. (But this would be a bit better with #1380 so someone review that please!)
I ran out of space in `/tmp` today and it turned out I had a whole lot of `/tmp/mantle-qemu` files, including some really big disk images. This is a combination of changes from coreos#1338 and the multipath PR coreos#1296 Basically if we get interrupted by Ctrl-C which is a lot more likely now when qemu isn't owning the serial console from the start, we will leak our tmpfiles. We probably need to install a `SIGINT` handler but that's a whole mess that's avoided if we just let the kernel clean up our resources for us, which is what was happening before the multipath PR (well, at least for files and not the swtpm tmpdir, but that's small). And actually coreos#1380 does install a `SIGINT` handler so someone please review that and we can maybe fix this more after that lands.
I ran out of space in `/tmp` today and it turned out I had a whole lot of `/tmp/mantle-qemu` files, including some really big disk images. This is a combination of changes from coreos#1338 and the multipath PR coreos#1296 Basically if we get interrupted by Ctrl-C which is a lot more likely now when qemu isn't owning the serial console from the start, we will leak our tmpfiles. We probably need to install a `SIGINT` handler but that's a whole mess that's avoided if we just let the kernel clean up our resources for us, which is what was happening before the multipath PR (well, at least for files and not the swtpm tmpdir, but that's small). And actually coreos#1380 does install a `SIGINT` handler so someone please review that and we can maybe fix this more after that lands.
I ran out of space in `/tmp` today and it turned out I had a whole lot of `/tmp/mantle-qemu` files, including some really big disk images. This is a combination of changes from #1338 and the multipath PR #1296 Basically if we get interrupted by Ctrl-C which is a lot more likely now when qemu isn't owning the serial console from the start, we will leak our tmpfiles. We probably need to install a `SIGINT` handler but that's a whole mess that's avoided if we just let the kernel clean up our resources for us, which is what was happening before the multipath PR (well, at least for files and not the swtpm tmpdir, but that's small). And actually #1380 does install a `SIGINT` handler so someone please review that and we can maybe fix this more after that lands.
This is a followup to the previous progress status for coreos#1367 Rather than trying to parse the serial console, just print it as is, except strip control characters/newlines so that it becomes effectively a progress bar. This way, we don't corrupt the terminal, and we don't fill up its history either. And, go a step farther and dump the whole serial console in the case where we get Ctrl-C before a successful login. This aids in debugging.
3b6ee7e to
c2145ab
Compare
OK, fixed that.
They're a bit entangled in this patch; seemed simpler to fix the bug. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, jlebon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Ugh, I swear I fixed the "grub prompt spewed to console" but apparently not... |
This is a followup to the previous progress status for
#1367
Rather than trying to parse the serial console, just print it as
is, except strip control characters/newlines so that it becomes
effectively a progress bar. This way, we don't corrupt the terminal,
and we don't fill up its history either.
And, go a step farther and dump the whole serial console in the
case where we get Ctrl-C before a successful login. This aids
in debugging.