Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Task Update MappedPipe operation #1865

Closed
wants to merge 1 commit into from

Conversation

jterry75
Copy link
Contributor

@jterry75 jterry75 commented Aug 4, 2023

Adds support to the containerd shim to Add/Remove a mapped pipe to a Windows Container Silo (argon) dynamically.

Hey all,

There are two approaches in this CR. We need the ability to dynamically Add/Remove named pipes to an Argon container. Unfortunately all of the v2 API and schema is internal only packages. Because we only need containerd support it seemed ok to add it as an Update API operation to the Task API of containerd shim. However, if we dont want to go down that road, I also added an example container-pipe.exe that simply adds a cmdline support for such an operation. Please let me know which approach we would like to continue with in order to add this support and export it to callers. Thanks!!

See: #1863 for background and FYI.

Adds support to the containerd shim to Add/Remove a
mapped pipe to a Windows Container Silo (argon) dynamically.

Signed-off-by: Justin Terry <[email protected]>
@jterry75 jterry75 requested a review from a team as a code owner August 4, 2023 21:27
@jterry75
Copy link
Contributor Author

jterry75 commented Aug 4, 2023

@katiewasnothere - FYI

@jterry75
Copy link
Contributor Author

jterry75 commented Aug 4, 2023

@kevpar - PTAL and provide your insights when you can.

@jterry75
Copy link
Contributor Author

Any chance I could get some feedback on the approach so we can solidify how to get this in? Thanks!

@@ -110,6 +110,7 @@ func verifyTaskUpdateResourcesType(data interface{}) error {
case *specs.WindowsResources:
case *specs.LinuxResources:
case *ctrdtaskapi.PolicyFragment:
case *ctrdtaskapi.MappedPipe:
Copy link
Contributor

Choose a reason for hiding this comment

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

I know we'll want to support other types in the future. I'm not sure if we will want to directly enumerate all the different additional resources we may want to support like this or if we'll want to create a type like ExtendedWindowsContainerResources or if we'll want to add the options directly to the runtime spec's structs themselves. I'm hesitant to move forward with this especially since we could potentially accidentally break you in the future. I'd like to hear more feedback from @kevpar or @ambarve here.

Copy link
Member

Choose a reason for hiding this comment

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

I think this is fine. Even if we add more types in the future, I don't expect it would be difficult to continue supporting this type as well for update task calls.

@@ -0,0 +1,79 @@
package main
Copy link
Contributor

Choose a reason for hiding this comment

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

if we decided that we didn't want to support the Update path, would this tool be something that we'd need to agree to maintain?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The tool is mostly an example of it working. The proper spot to put it if we want it in a tool I think is in "shimdiag share" which already has a precedent for this ad-hoc call but isnt supported nicely via containerd. I think we should just remove the tool now that we know it will work via containerd update api. Only reason for tool I guess is non-containerd based approach, but I dont see why thats important anymore :)

Copy link
Member

@kevpar kevpar left a comment

Choose a reason for hiding this comment

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

Update task path seems fine to me. Did you still want to check in the cmd in this case, or can we remove that?

@jterry75
Copy link
Contributor Author

Update task path seems fine to me. Did you still want to check in the cmd in this case, or can we remove that?

Nah, it was an either or. I'm good with containerd approach, will remove tool and submit for final. Ty!

@jterry75 jterry75 closed this Dec 12, 2023
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.

3 participants