Closed apostasie closed 3 months ago
I have been scratching my head over suspicious CI failures that only affect Windows and that definitely involves volumes (hence file locking).
Closely reading source code, it looks like the behavior on unix is to lock exclusively:
https://github.com/containerd/nerdctl/blob/main/pkg/lockutil/lockutil_unix.go#L62
While on windows:
https://github.com/containerd/nerdctl/blob/main/pkg/lockutil/lockutil_windows.go#L54
We do not seem to request an exclusive lock (which would be LOCKFILE_EXCLUSIVE_LOCK = 2).
I will submit a PR now as this seems wrong - but I would like a confirmation from someone, as windows is not really my jam.
@AkihiroSuda opinion?
na
None
No response
I am also confused at the values we are setting for nNumberOfBytesToLockLow and nNumberOfBytesToLockHigh.
Any idea why?
Fixed by #3285
Description
I have been scratching my head over suspicious CI failures that only affect Windows and that definitely involves volumes (hence file locking).
Closely reading source code, it looks like the behavior on unix is to lock exclusively:
https://github.com/containerd/nerdctl/blob/main/pkg/lockutil/lockutil_unix.go#L62
While on windows:
https://github.com/containerd/nerdctl/blob/main/pkg/lockutil/lockutil_windows.go#L54
We do not seem to request an exclusive lock (which would be LOCKFILE_EXCLUSIVE_LOCK = 2).
I will submit a PR now as this seems wrong - but I would like a confirmation from someone, as windows is not really my jam.
@AkihiroSuda opinion?
Steps to reproduce the issue
na
Describe the results you received and expected
na
What version of nerdctl are you using?
na
Are you using a variant of nerdctl? (e.g., Rancher Desktop)
None
Host information
No response