Skip to content
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

TestReadRotatedLog fails on windows #3554

Open
apostasie opened this issue Oct 16, 2024 · 2 comments
Open

TestReadRotatedLog fails on windows #3554

apostasie opened this issue Oct 16, 2024 · 2 comments
Labels
kind/unconfirmed-bug-claim Unconfirmed bug claim

Comments

@apostasie
Copy link
Contributor

Description

=== RUN   TestReadRotatedLog
    cri_logger_test.go:285: failed to rotate log "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\TestReadRotatedLog3469684812\\001\\logfile2318891333" to "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\TestReadRotatedLog3469684812\\001\\logfile2318891333.1620241016-014354", error: rename C:\Users\RUNNER~1\AppData\Local\Temp\TestReadRotatedLog3469684812\001\logfile2318891333 C:\Users\RUNNER~1\AppData\Local\Temp\TestReadRotatedLog3469684812\001\logfile2318891333.1620241016-014354: The process cannot access the file because it is being used by another process.
    testing.go:1232: TempDir RemoveAll cleanup: remove C:\Users\RUNNER~1\AppData\Local\Temp\TestReadRotatedLog3469684812\001\logfile2318891333: The process cannot access the file because it is being used by another process.
--- FAIL: TestReadRotatedLog (2.05s)

Steps to reproduce the issue

Run unit tests for windows.

Describe the results you received and expected

This does not seem like a non-compatible test, but rather an actual issue?

I'll skip the test for the time being so that we can enable unit tests for windows, but this should be looked into?

What version of nerdctl are you using?

main

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

@fahedouch
Copy link
Member

fahedouch commented Oct 16, 2024

it seems like the file is not closed correctly or cri is playing with the file, I think we can lock the file before processing the renaming operation

@apostasie
Copy link
Contributor Author

@fahedouch would you claim dibs on this?

Pretty sure a fix on this would significantly improve windows logs stability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/unconfirmed-bug-claim Unconfirmed bug claim
Projects
None yet
Development

No branches or pull requests

2 participants