-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix: create container log directories to prevent conmon failures #9470
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
base: main
Are you sure you want to change the base?
Conversation
Hi @T0MASD. Thanks for your PR. I'm waiting for a cri-o member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: T0MASD The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Tomas Dabašinskas <todabasi@redhat.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #9470 +/- ##
==========================================
- Coverage 67.16% 67.01% -0.16%
==========================================
Files 202 202
Lines 28025 28048 +23
==========================================
- Hits 18824 18797 -27
- Misses 7629 7677 +48
- Partials 1572 1574 +2 🚀 New features to boost your workflow:
|
weird the kubelet should be creating this path, what version of k8s are you using? |
@T0MASD: The following test failed, say
Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
I have discovered this behaviour while developing https://github.com/T0MASD/kinc using AI. somehow I got to the state where the kubelet was not creating the mentioned dir, then I asked AI to find the issue and here we are... I agree this should be handled by user of crio, but exiting crio because when it's not with cryptic error is sub-optimal |
Shouldn't conmon create the directory if it does not exists? 🤔 |
/kind feature
What this PR does / why we need it:
CRI-O constructs log paths but doesn't create container subdirectories,
causing conmon to fail with "No such file or directory" errors.
Add os.MkdirAll() in LogPath() to ensure directories exist before
container creation. Uses single syscall, succeeds silently if directories
already exist.
Fixes container creation failures in Kubernetes environments.
Special notes for your reviewer:
CRI-O fails to create container-specific subdirectories within the configured
log_dir
, causingconmon
to fail when attempting to create log files. This results in container creation failures with the error:this may be handled by crio user, which was not the case when trying to get
kind
to work in crioDoes this PR introduce a user-facing change?
Eliminates errors