Add serial TCP mode#23
Merged
hertrste merged 11 commits intocyberus-technology:gardenlinuxfrom Sep 30, 2025
Merged
Conversation
c9a3669 to
919f56a
Compare
phip1611
approved these changes
Sep 17, 2025
Member
phip1611
left a comment
There was a problem hiding this comment.
LGTM! There are a few things but after that, ship it.
phip1611
reviewed
Sep 22, 2025
919f56a to
977ae82
Compare
In addition to configuration options like pty, file, tty, ... we allow setting the serial device to be accessed via some open TCP port on the host. Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Adding the TCP socket support to the serial device handling requires to add a new syscall to the seccomp filter list. Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Renaming the error makes it also usable for the new TCP socket support in the serial device. Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
977ae82 to
dcb7449
Compare
Similar to the unix socket implementation, we allow a user to set a port were the serial is reachable. Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
When using the TCP serial mode, we also want to write the serial output to a file. We use a generic write combiner that would allow us adding even more writers. Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
When using the newly added TCP serial mode, we allow specifying an additional file to log into. This allows users to access the complete bootlog of a VM, as the TCP socket does not buffer anything. Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Use the user provided file path that can be additionally specified when TCP mode is selected for serial. Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
dcb7449 to
752c013
Compare
Fix the clippy error in auto converge interation increasing.
fd140ac
into
cyberus-technology:gardenlinux
20 of 22 checks passed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This MR adds a TCP mode to the serial device configuration, allowing to send and receive serial communication via TCP.
The MR is meant for early review and shouldn't be merged until we have some feedback from the upstream maintainers how the API can look like.
Best reviewed commit by commit. Please watch out for wild
unwraps;)Further, I think the current structure of the code, especially in the
serial_manager.rs, looks pretty sub-optimal. Please avoid fix the world suggestions for now, I think that should be done in an separate effort.Usage:
Opens:
fileparameter. I guess for upstreaming, also TTY and PTY modes require the ability to log to file in parallel. Any idea how to elegantly add that to the current codebase?