+
Skip to content

Conversation

T0MASD
Copy link

@T0MASD T0MASD commented Sep 19, 2025

/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, causing conmon to fail when attempting to create log files. This results in container creation failures with the error:

[conmon:e]: Failed to open log file No such file or directory

this may be handled by crio user, which was not the case when trying to get kind to work in crio

Does this PR introduce a user-facing change?

Eliminates errors

fix: create container log directories to prevent conmon failures

@T0MASD T0MASD requested a review from mrunalp as a code owner September 19, 2025 19:15
@openshift-ci openshift-ci bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. dco-signoff: no Indicates the PR's author has not DCO signed all their commits. labels Sep 19, 2025
@openshift-ci openshift-ci bot requested review from QiWang19 and bitoku September 19, 2025 19:15
@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 19, 2025
Copy link
Contributor

openshift-ci bot commented Sep 19, 2025

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

Copy link
Contributor

openshift-ci bot commented Sep 19, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: T0MASD
Once this PR has been reviewed and has the lgtm label, please assign giuseppe for approval. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: Tomas Dabašinskas <todabasi@redhat.com>
@openshift-ci openshift-ci bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. and removed dco-signoff: no Indicates the PR's author has not DCO signed all their commits. labels Sep 19, 2025
Copy link

codecov bot commented Sep 21, 2025

Codecov Report

❌ Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.01%. Comparing base (d91a449) to head (99d327d).
⚠️ Report is 57 commits behind head on main.

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@haircommander
Copy link
Member

weird the kubelet should be creating this path, what version of k8s are you using?
/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 22, 2025
Copy link
Contributor

openshift-ci bot commented Sep 22, 2025

@T0MASD: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn 99d327d link true /test e2e-aws-ovn

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.

@T0MASD
Copy link
Author

T0MASD commented Sep 30, 2025

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

@saschagrunert
Copy link
Member

Shouldn't conmon create the directory if it does not exists? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/feature Categorizes issue or PR as related to a new feature. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载