Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Add Implementation for WCOW process isolation support. #1264

Merged
merged 5 commits into from
Sep 18, 2019

Conversation

Random-Liu
Copy link
Member

For #1257.

The PR has 5 commits:

@Random-Liu Random-Liu added this to the v1.4 milestone Sep 5, 2019
@Random-Liu Random-Liu force-pushed the windows-support-2 branch 6 times, most recently from ca19b53 to e41a2fd Compare September 5, 2019 08:19
pkg/netns/netns_windows.go Outdated Show resolved Hide resolved
if username != "" {
specOpts = append(specOpts, oci.WithUser(username))
}
// TODO(windows): Add CredentialSpec support.
Copy link
Contributor

Choose a reason for hiding this comment

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

microsoft/hcsshim#347 for tracking

Copy link
Contributor

@jterry75 jterry75 left a comment

Choose a reason for hiding this comment

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

This is awesome!

}
// TODO(windows): Add CredentialSpec support.

for pKey, pValue := range getPassthroughAnnotations(sandboxConfig.Annotations,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a TODO for ContainerAnnotations pending: #1260

Copy link
Member Author

@Random-Liu Random-Liu Sep 5, 2019

Choose a reason for hiding this comment

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

And I still need to talk with @jiayingz about how we should pass the annotation.

The unit test will catch this anyway, don't worry. :) One good thing about sharing the common unit test in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

This merged want to update?

Copy link
Member Author

@Random-Liu Random-Liu Sep 16, 2019

Choose a reason for hiding this comment

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

Already updated. See below.

pkg/server/helpers_windows.go Show resolved Hide resolved
@Random-Liu
Copy link
Member Author

OK. No images meet our requirement in either appveyor or travis.

I'll build a simple framework to use GCE to run the CRI validation test.

@Random-Liu Random-Liu force-pushed the windows-support-2 branch 4 times, most recently from e261abd to 3a57573 Compare September 9, 2019 23:17
@Random-Liu
Copy link
Member Author

/test pull-cri-containerd-windows-cri

@Random-Liu
Copy link
Member Author

/test pull-cri-containerd-windows-cri

@Random-Liu
Copy link
Member Author

/test pull-cri-containerd-windows-cri

@Random-Liu
Copy link
Member Author

/test pull-cri-containerd-windows-cri

@Random-Liu
Copy link
Member Author

/test pull-cri-containerd-windows-cri

@jterry75
Copy link
Contributor

This is awesome!

@Random-Liu
Copy link
Member Author

/test pull-cri-containerd-windows-cri

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

see questions/comments for first half of review :-)

return PluginConfig{}
return PluginConfig{
CniConfig: CniConfig{
NetworkPluginBinDir: "C:\\Program Files\\containerd\\cni\\bin",
Copy link
Member

Choose a reason for hiding this comment

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

should probably have an install directory variable somewhere to cover the /root path of the installed files. This so people can install containerd to a different drive/folder

Copy link
Member Author

Choose a reason for hiding this comment

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

Make sense.

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed to filepath.Join(os.Getenv("ProgramFiles"), "containerd", "cni", "bin").

Actually the CNI binaries and configs don't necessarily need to reside in the container install directory, the default seems reasonable enough to me. :)

Copy link
Member

Choose a reason for hiding this comment

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

ok .. just a typical courtesy for 3rd party to have an option... if it gets hosted by msft that would be different. Another question for @jterry75

Copy link
Member Author

Choose a reason for hiding this comment

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

@mikebrow The CNI directory is configurable. :) People always have an option.

Copy link
Member

Choose a reason for hiding this comment

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

I mean for windows... you don't have to use ProgramFiles..

Copy link
Member

Choose a reason for hiding this comment

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

we can address install options and root paths in some other PR after there is a decision on overall deploy of containerd.

Copy link
Member Author

Choose a reason for hiding this comment

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

@mikebrow containerd is using ProgramData (previously ProgramFiles) for storing all the data https://github.com/containerd/containerd/blob/master/defaults/defaults_windows.go#L29.

As my understanding, the binaries and configurations should be in ProgramFiles. :) @jterry75 may know more about the convention here.

pkg/config/config_windows.go Show resolved Hide resolved
pkg/containerd/opts/spec_windows.go Outdated Show resolved Hide resolved
pkg/containerd/opts/spec_windows.go Show resolved Hide resolved
pkg/containerd/opts/spec_windows.go Show resolved Hide resolved
OSVersion: "10.0.17762.1",
},
}
sort.SliceStable(platforms, func(i, j int) bool {
Copy link
Member

Choose a reason for hiding this comment

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

general question on the overall implementation... is there a statement about 32bit support? will users have to create 64bit containers with 32bit supporting 386 libraries?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is more a question for @jterry75 :)

pkg/server/container_create_test.go Show resolved Hide resolved
pkg/server/container_create_windows_test.go Show resolved Hide resolved
pkg/server/helpers_unix.go Show resolved Hide resolved
pkg/server/helpers_windows.go Show resolved Hide resolved
@Random-Liu
Copy link
Member Author

/test pull-cri-containerd-windows-cri

@Random-Liu
Copy link
Member Author

/test pull-cri-containerd-windows-cri

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Lantao Liu <lantaol@google.com>
Signed-off-by: Lantao Liu <lantaol@google.com>
Signed-off-by: Lantao Liu <lantaol@google.com>
Signed-off-by: Lantao Liu <lantaol@google.com>
@Random-Liu
Copy link
Member Author

Squashed the last commit.

Apply LGTM based on #1264 (review)

@Random-Liu
Copy link
Member Author

/test pull-cri-containerd-windows-cri

@Random-Liu Random-Liu merged commit 9d60f9c into containerd:master Sep 18, 2019
@Random-Liu Random-Liu deleted the windows-support-2 branch September 18, 2019 18:38
@jterry75
Copy link
Contributor

WAHOO!!!

@PatrickLang
Copy link

What's the proper process to build this? Can someone update the doc and clarify whether you're doing cross or native builds?

@Random-Liu
Copy link
Member Author

@PatrickLang Just GOOS=windows make on linux, or make on windows. Filed https://github.com/containerd/cri/issues/new to track that.

@daxmc99
Copy link

daxmc99 commented Oct 15, 2019

I think the doc issue mentioned should be #1285

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants