-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Verify docker_logs
support for podman
#6807
Comments
docker_logs
support for podman
Reusing this issue to validate Vector's support for podman. Resolving it should include documentation and tests. |
I tested this briefly and while it didn't crash, it certainly didn't work either. It appears to just be constantly starting and stopping the log stream:
Config: [sources.docker_logs]
type = "docker_logs"
docker_host = "unix:///var/run/podman/podman.sock" My guess is that there's a subtle incompatibility between the Docker and Podman log APIs. |
Yes I also observed a significant increase in load generated on the podman process as soon as I started to read the logs with vector
|
Ok update from my side: the issue was podman version 4.3.1. Updating to 5.1.1 (build from source) fixed the issue |
I tested Vector 0.41.0 with Podman 5.2.1. It works if Podman generates system events and container logs within 2 minutes after Vector starts. Otherwise, Vector returns timeout errors and stops watching for events and container logs:
It appears that the docker_logs source in Vector uses a hardcoded DEFAULT_TIMEOUT for requests. If no response is received within this default timeout period while querying events and logs, Vector will return an error and stop watching for container logs without further retries. With the Docker API, everything works fine because it immediately sends an HTTP response status code when a stream is started, even if no data is available yet. However, Podman delays sending the response until some events or logs are actually generated, which can lead to issues if the timeout expires before any data is available. Since there is definitely a difference in the behavior of the Docker API and the Podman compat API for the logs and events endpoints, I opened containers/podman#23712 Config:
|
The issue mentioned above is fixed in Podman 5.3.0. |
@jjzxcd Thanks for opening that issue on the Podman repo. I encountered this issue a lot when using Vector with Podman too and I haven't had the time to dig into it. |
Hi folks, it seems like this issue is fixed by using Podman >= 5.1? I am closing this but feel free to re-open if there's any action needed from Vector maintainers. |
Current Vector Version
Use-cases
@jszwedko mentioned this in Discord on March 5, 2021:
I'm not personally familiar with podman, but it seems like it exposes a docker compatible API: https://docs.podman.io/en/latest/_static/api.html . If that is true, it might Just Work with the existing docker integrations
Trying to use Vector 0.12 with Podman, but:
thread 'tokio-runtime-worker' panicked at 'called
Option::unwrap()
on aNone
value', src/sources/docker_logs.rs:472:55
note: run with
RUST_BACKTRACE=1
environment variable to display a backtraceMar 16 15:43:20.377 ERROR source{component_kind="source" component_name=docker component_type=doc
ker_logs}: vector::topology: An error occurred that vector couldn't handle.
So there might be some differences in the protocol after all...
Attempted Solutions
Proposal
References
The text was updated successfully, but these errors were encountered: