add and patch containerd/pkg/shim to be used with new Windows shims#2601
add and patch containerd/pkg/shim to be used with new Windows shims#2601rawahars merged 2 commits intomicrosoft:mainfrom
Conversation
785f197 to
61fe5f1
Compare
|
theres already containerd/pkg/shim that implements a lot of the management and parsing needed, can we leverage that? |
61fe5f1 to
61e79b5
Compare
|
@helsaawy Using the upstream shim pkg would have been the absolute right way to go. However, Windows implementation is not yet robust upstream. Reference- https://github.com/containerd/containerd/blob/main/pkg/shim/shim_windows.go Also, we have custom logic related to setting up ETW provider among other things. In my opinion, as a follow-up to the new shim, we can work to ensure that containerd's shim pkg has robust Windows implementation and then move our new shim to the upstream package once it is released. What are your thoughts? |
61e79b5 to
0623f40
Compare
|
Even without the |
|
@helsaawy While I totally agree, the upstream shim implementation has stubbed out even |
0623f40 to
db41239
Compare
03bafb4 to
e5ada72
Compare
| @@ -0,0 +1,186 @@ | |||
| //go:build windows | |||
There was a problem hiding this comment.
Hey can we check in the exact 2.X package then do the delta commit to make it work. That will give us a history that is the changes you made and will make it easier for us to see what needs to be patched back to containerd/containerd to get this to work upstream.
There was a problem hiding this comment.
Any of the _windows are not really that important as its obvious where they changed. But I'm just surprised to see we had to change the shim.go file. That "should" be platform agnostic
There was a problem hiding this comment.
Yes sure. I have bifurcated the commits into 2 as requested.
The existing runhcs shim management logic is tightly coupled, making it difficult to reuse for new shim implementations. Additionally, aligning with upstream's move toward BootstrapParams requires additional effort in existing logic. To maintain compatibility and reduce technical debt, this commit vendors the containerd/pkg/shim implementation. Source: https://github.com/containerd/containerd/tree/64ed272067a24c2d917064eea25a78e1479d632f/pkg/shim (based on v2.1.2) Signed-off-by: Harsh Rawat <harshrawat@microsoft.com>
This commit adds the changes to ensure that upstream pkg/shim works with Windows shims. Signed-off-by: Harsh Rawat <harshrawat@microsoft.com>
e5ada72 to
b3c8fa2
Compare
This PR introduces a vendored and modified version of the upstream
containerd/pkg/shimpackage. This transition will benefit the newer Windows shims, allowing for a more modular and reusable shim management logic. Moreover, By aligning with the upstream pkg/shim structure, we enable better interoperability with containerd v2 while maintaining the specific hooks necessary for Windows.Key changes
Testing
Created a new shim and tested it with this logic.