-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent use of socat in firecracker-pilot
Do not shell out socat and use proper UnixListener/UnixStream to do this job. This version of the commit works but I stumbled across a few issues: 1. Permission denied when the UnixListener runs as user and the firecracker process was called as root (run_as: root in the flake). The former implementation ran socat via sudo in the same way as the firecracker process. Thus if you register the flake to run as root it can now also only be called as root, which is acceptable. 2. The behavior in interactive sessions differs compared to socat. When sci in the guest is called it creates a pty and all data is copied to the vsock stream. The host connects via an UDS socket to this data and we multiplex stdin->stream and stream->stdout. When doing this with socat the behavior is different in a way that e.g tabs are effectively interpreted and the pty prompt allows for input on the same line when my code now always needs a newline to renew the prompt. I did not debug further what is needed to make this look nicer.
- Loading branch information
Showing
6 changed files
with
220 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.