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

Conversation

@Random-Liu
Copy link
Member

@Random-Liu Random-Liu commented May 26, 2017

Add Version, UpdateRuntimeConfig and Status.

Based on #41, #46, #48 and #52. Only last 2 commits are new.

We could basically achieve our alpha goal after this PR is merged, and more tests are needed after code freeze. @yujuhong @dchen1107 @mikebrow
/cc @abgworrall @matchstick

With this PR, we could pass half CRI validation test now:

Ran 36 of 36 Specs in 93.276 seconds
FAIL! -- 18 Passed | 18 Failed | 0 Pending | 0 Skipped --- FAIL: TestE2ECRI (93.28s)
FAIL

Ginkgo ran 1 suite in 1m33.350842999s
Test Suite Failed
exit status 1

Failed tests are caused by:

  1. Container logging
  2. Exec
  3. Other unsupported features: HostPort, Schema 1 image support etc.

@Random-Liu Random-Liu force-pushed the add-other-small-functions branch from 2bbfe8e to 2259b61 Compare May 26, 2017 02:54
@Random-Liu Random-Liu assigned yujuhong and mikebrow and unassigned yujuhong May 26, 2017
@Random-Liu Random-Liu force-pushed the add-other-small-functions branch from 2259b61 to 18227aa Compare May 30, 2017 16:51
@Random-Liu Random-Liu added this to the v0.1.0-rc1 milestone May 30, 2017
}
networkReady := &runtime.RuntimeCondition{
Type: runtime.NetworkReady,
Status: true,
Copy link
Member

Choose a reason for hiding this comment

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

Add a TODO to check whether the plugins are ready or they exist? I didn't review the networking code, so this may not 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.

cri-containerd doesn't support cider allocation now (we are directly using cri-o cni plugin package now).

The networking team is also planing to deprecate kubenet. In the future, the cider should be handled by a daemonset outside of the container.

/cc @freehan

Copy link
Member

Choose a reason for hiding this comment

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

It doesn't have to be CIDR. Network could be not ready if cri-containerd cannot find any network plugins.

Copy link
Member Author

Choose a reason for hiding this comment

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

True, will update.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

// Status returns the status of the runtime.
func (c *criContainerdService) Status(ctx context.Context, r *runtime.StatusRequest) (*runtime.StatusResponse, error) {
return nil, errors.New("not implemented")
runtimeReady := &runtime.RuntimeCondition{
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to check whether containerd is alive? E.g., call containerd version().

Copy link
Member Author

Choose a reason for hiding this comment

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

Will do in this PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@Random-Liu Random-Liu force-pushed the add-other-small-functions branch 2 times, most recently from 026f5a1 to be565d8 Compare May 31, 2017 17:35
@Random-Liu
Copy link
Member Author

@yujuhong Addressed comments.

// Status returns the status of the runtime.
func (c *criContainerdService) Status(ctx context.Context, r *runtime.StatusRequest) (*runtime.StatusResponse, error) {
return nil, errors.New("not implemented")
runtimeCondition := &runtime.RuntimeCondition{
Copy link
Member

@mikebrow mikebrow May 31, 2017

Choose a reason for hiding this comment

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

maybe check the health of the meta stores? For example, ListPodSandbox()

Copy link
Member Author

@Random-Liu Random-Liu May 31, 2017

Choose a reason for hiding this comment

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

@mikebrow What do you mean by "meta store"?

Copy link
Member

Choose a reason for hiding this comment

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

that which implements a MetadataStore..

SandboxStore, ImageMetadataStore, ...

Copy link
Member Author

Choose a reason for hiding this comment

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

Here, it's checking whether containerd is working or not.

Copy link
Member

@mikebrow mikebrow May 31, 2017

Choose a reason for hiding this comment

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

kk

// UpdateRuntimeConfig updates the runtime config. Currently only handles podCIDR updates.
func (c *criContainerdService) UpdateRuntimeConfig(ctx context.Context, r *runtime.UpdateRuntimeConfigRequest) (*runtime.UpdateRuntimeConfigResponse, error) {
return nil, errors.New("not implemented")
return &runtime.UpdateRuntimeConfigResponse{}, nil
Copy link
Member

Choose a reason for hiding this comment

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

?

Copy link
Member Author

Choose a reason for hiding this comment

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

We don't need this function now. In current dockershim, this is used to update pod CIDR, which we don't support now and may not support in the future.
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/dockershim/docker_service.go#L304-L315

We may have a separate daemonset to update the CIDR in the future.

Copy link
Member

Choose a reason for hiding this comment

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

maybe a comment or todo to investigate if / when we need to update.. Returning no error here with no update if they passed in something to be updated could lead the user astray?

Copy link
Member Author

Choose a reason for hiding this comment

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

Will do.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

containerdAPIVersion = "0.0.0"
containerdVersion = "0.0.0"
// kubeAPIVersion is the api version of kubernetes.
kubeAPIVersion = "0.1.0"
Copy link
Member

Choose a reason for hiding this comment

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

Couple questions.. 1) Should / could this be set at build vs being hard coded? 2) Why kubeAPIVersion and not kubelet and / or kubelet/cri?

Copy link
Member Author

@Random-Liu Random-Liu May 31, 2017

Choose a reason for hiding this comment

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

Copied from dockershim.

This field doesn't make too much sense to me now, so just copied the code.

// Containerd doesn't return semver because of a bug.
// TODO(random-liu): Replace this with version from containerd.
RuntimeVersion: containerdVersion,
// Containerd doesn't have an api version now.
Copy link
Member

Choose a reason for hiding this comment

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

so containerd isn't going to follow the new docker/moby model for using the date to set the version and let the api version be the more traditional major change tag?

Copy link
Member Author

Choose a reason for hiding this comment

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

containerd won't use date to set version I think.

They should expose api version, but I think it's to early to them to talk about api version now, given that they are changing api everyday before GA.

@Random-Liu Random-Liu force-pushed the add-other-small-functions branch from be565d8 to 2df96e1 Compare May 31, 2017 19:12
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

@Random-Liu
Copy link
Member Author

Random-Liu commented May 31, 2017

@mikebrow Thanks for reiviewing!
@yujuhong Are you ok with the new commits?

@yujuhong
Copy link
Member

LGTM

@Random-Liu
Copy link
Member Author

@yujuhong Thanks for reviewing!

@Random-Liu
Copy link
Member Author

Apply LGTM based on #53 (review) and #53 (comment).

@Random-Liu Random-Liu merged commit a4e067c into containerd:master May 31, 2017
@Random-Liu Random-Liu deleted the add-other-small-functions branch May 31, 2017 21:54
lanchongyizu pushed a commit to lanchongyizu/cri-containerd that referenced this pull request Sep 3, 2017
jstarks pushed a commit to jstarks/cri that referenced this pull request Jan 30, 2020
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.

4 participants