Skip to content

Enforce global lock in oci hooks - #3522

Merged
AkihiroSuda merged 1 commit into
containerd:mainfrom
apostasie:cni-lock
Oct 10, 2024
Merged

AkihiroSuda merged 1 commit into
containerd:mainfrom
apostasie:cni-lock

Conversation

@apostasie

@apostasie apostasie commented Oct 8, 2024 •

Copy link
Copy Markdown
Contributor

See
#3518
#2908

and probably others.

At this point, nerdctl simply cannot be used in any non trivial scenario involving CNI and concurrency.

Besides local context, this started cropping up as soon as I disabled retries on the CI and cranked up parallelism on tests.

The bottom-line MAY be that CNI plugins cannot be used concurrently at all - whether by design or not - this is unconfirmed though.

A "proper" fix is likely very involved - probably rewriting most / all of CNIEnv, or the cni plugins themselves. As floated in the tickets, it is not even clear if separate binaries + ocihooks is a tenable design at all.

Anyhow, this is the best I can think of right now that does not involve too much work: enforce a global lock in hooks. It is a hammer. It will hurt performance, likely. But then the choice is "does not work" vs. "works slowly".
As stated in the comment, it will probably not even cover all cases - but it is better than nothing and will make things a bit more acceptable.

This has been forked out of #3517 which is currently ground zero.

@apostasie

Copy link
Copy Markdown
Contributor Author

@AkihiroSuda at your convenience.
(pending green)

@apostasie
apostasie marked this pull request as ready for review October 8, 2024 23:19
@apostasie

Copy link
Copy Markdown
Contributor Author

Failure is the usual TestIPFSComposeUp/stargz

Comment thread pkg/ocihook/ocihook.go Resolved
Comment thread pkg/ocihook/ocihook.go Resolved
@AkihiroSuda AkihiroSuda added this to the v2.0.0 milestone Oct 10, 2024

@AkihiroSuda AkihiroSuda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants