-
Notifications
You must be signed in to change notification settings - Fork 38.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
Copy logs from dead containers to local files to facilitate immediate GC of dead containers #26923
Comments
Will we do this for dead containers only, or this apply to all |
As of now, logs of running containers are controlled by runtimes. To avoid duplicated storage of log files, it's better to avoid managing logs of running instances for now. |
Issues go stale after 30d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
This issue is still very much relevant for us: having access to the logs of a dead container is needed, but most of the container itself is just using disk space that should be reclaimed and better used for something more productive. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/reopen |
We also has a case which depend on get container logs when the job completed successfully. |
This issue is relevant for me. I use fluentd to get logs from pods and send them elsewhere, but two conditions can make me lose valuable logs:
This seems to me to be a big problem. How many folks are using the likes of fluentd, specifically in an attempt to preserve their logs and don't even realize that in some cases, the kubelet isn't even giving them a fair opportunity to do so? |
/reopen |
@krancour: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen |
@krancour: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen |
@krancour: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This is relevant for me the same way as for @krancour's first case. Would it be fair to say that having a Also, I see that Thanks! EDIT. If I read correctly, it seems that the property is compared with the container creation time, so that wouldn't help save logs if the container was long-lived. I'll keep reading the code to try find something useful. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
One of the reasons for keeping dead containers around in kubelet today is to get access to logs from previous instances. Dead container instances can take up disk space via their root filesystem and result in disk pressure on the nodes. To alleviate disk pressure and improve the logging experience in kubernetes, kubelet can retrieve logs from dead containers and GC them right away once kubelet doesn't depend on metadata associated with old containers.
Specifically,
/var/log/
directory. For the docker runtime, this can be a simple move operation. For rkt, we will have to retrieve the logs remotely./var/log/<podUID>/<ContainerName>/<InstanceNumber>_stdout.log
kubectl logs -p
to return logs from the files instead of relying on the runtime for previous logs./logs
REST endpoint. In the future, we can consider expandingkubectl logs
interface to support an instance number or add support for the first attempt specifically.The text was updated successfully, but these errors were encountered: