Commit 95ba09f
committed
api: fix OCI hook ownership tracking.
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 <[email protected]>1 parent 2d1ee56 commit 95ba09f
2 files changed
+30
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
| 478 | + | |
486 | 479 | | |
487 | 480 | | |
488 | 481 | | |
| |||
678 | 671 | | |
679 | 672 | | |
680 | 673 | | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
681 | 682 | | |
682 | 683 | | |
683 | 684 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
0 commit comments