Skip to content

Conversation

@klihub
Copy link
Member

@klihub klihub commented Jan 16, 2026

Fix hook ownership tracking and add a proper test case for it.

Ownership tracking for OCI hooks is supposed to be accumulative. The implementation tried to accumulate owners, but it was buggy. It tried to delete existing ownership by unclaiming which marks ownershipdeleted by the plugin instead of clearing it.

This went unnoticed since we lacked any kind of proper test for hook ownership accumulation. It was only noticed thanks to #263 which switches much of the ownership tracking code to generated from hand-written.

Fix hook ownership tracking and add a proper test case for it.

Ownership tracking for OCI hooks is supposed to be accumulative.
The implementation tried to accumulate owners, but it was buggy.
It tried to delete existing ownership by unclaiming which marks
ownershipdeleted by the plugin instead of clearing it.

This went unnoticed since we lacked any kind of proper test for
hook ownership accumulation. It was only noticed thanks to containerd#263
which switches much of the ownership tracking code to generated
from hand-written.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
@klihub klihub force-pushed the fixes/accumulate-oci-hook-ownership branch from b360c00 to 95ba09f Compare January 16, 2026 09:12
Verify that a registered plugin name is not empty and only contains
characters from the set [a-zA-Z0-9_.+-].

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
@klihub klihub force-pushed the fixes/accumulate-oci-hook-ownership branch from 6f103f3 to 91a7760 Compare January 19, 2026 08:20
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