Skip to content

Add send2vsock to send systemd journal from a guest to the host #352

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

Closed
wants to merge 1 commit into from

Conversation

kzys
Copy link
Contributor

@kzys kzys commented Nov 30, 2019

Signed-off-by: Kazuyoshi Kato [email protected]

Issue #, if available:

#276

Description of changes:

This PR is still work-in-progress. Early feedback is welcome!

Basically I want to run journalctl -f | send2vsock as a systemd unit. systemd can forward logs to syslogd, but supporting a remote syslogd location is not supported and using a mini daemon is recommended instead (see systemd/systemd#7170).

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sipsma
Copy link
Contributor

sipsma commented Dec 5, 2019

Think the basic idea here is good, just some more things we'll need to figure out:

  1. Users are going to need a way to consume these logs
  2. We'll need to make sure that the vsock port used by this doesn't conflict with the vsock ports used internally for apis/stdio.

One initial thought I had was to run this code as a semi-privileged "sidecar" container (we could vend the container definition in some utility library in this repo). That solves both of the above problems pretty cleanly but has a pretty big disadvantage in that we won't be able to get the logs until the container has actually started, which misses a lot of problems that can happen during boot+agent start.

My only other idea is to add parameters to the CreateVM api that define "reserved" vsock streams, which will allow us to reserve port numbers and tell users where to find the unix socket on which they can listen to services from within their VM, such as this journal forwarder. Curious to hear others' thoughts.

@kzys
Copy link
Contributor Author

kzys commented Jan 21, 2020

I'm going to close the PR for now. We will check the overall performance first instead of just avoid using the console device.

@kzys kzys closed this Jan 21, 2020
fangn2 pushed a commit to fangn2/firecracker-containerd that referenced this pull request Mar 23, 2023
…ependabot/go_modules/github.com/go-openapi/validate-0.20.3

Bump github.com/go-openapi/validate from 0.19.12 to 0.20.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants