[1.1] runc list: fix race with runc delete#4231
[1.1] runc list: fix race with runc delete#4231AkihiroSuda merged 2 commits intoopencontainers:release-1.1from
Conversation
|
I think we should also change the go version to 1.21 in github workflow definition file because of #4193. |
Yes, done.
I see that for cross-386 job we use Ubuntu 22.04 in main and 20.04 here, plus we only run unit tests (for some reason unit tests do not fail in 22.04 with Go 1.22, I guess we use nsenter in a slightly different manner). Hmm. |
Ah, nevermind, Ubuntu 22.04 fails for different reason (spec validator test, see here) and its glibc seems to be fine wrt Go 1.22 issue. |
|
we look forward to use this PR once it is included in the release in minikube, currently causing integration test failures |
Instead of a huge if {} block, use continue.
Best reviewed with --ignore-all-space.
Signed-off-by: Kir Kolyshkin <[email protected]>
(cherry picked from commit 095929b)
Signed-off-by: Kir Kolyshkin <[email protected]>
Since commit 5516294 we can (and should) use Info() to get access to file stat. Do this. While going over directory entries, a parallel runc delete can remove an entry, and with the current code it results in a fatal error (which was not observed in practice, but looks quite possible). To fix, add a special case to continue on ErrNotExist. Signed-off-by: Kir Kolyshkin <[email protected]> (cherry picked from commit 1a3ee49) Signed-off-by: Kir Kolyshkin <[email protected]>
This is a backport of #3349 to release-1.1. Original description follows.
It is possible that parallel execution of runc list with runc delete will result in runc list fatal failure. Fix this.
Bonus: some refactoring.
Please review with
--ignore-all-space("Hide whitespace" checked on GH).