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

cri: fix container status #5117

Merged
merged 1 commit into from
Mar 4, 2021
Merged

Conversation

Iceber
Copy link
Member

@Iceber Iceber commented Mar 3, 2021

fix crictl: kubernetes-sigs/cri-tools#724
fix dockershim: kubernetes/kubernetes#99585

In some container states, the startedAt and finishedAt should not be specified

type ContainerStatus struct {
// ID of the container.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Metadata of the container.
Metadata *ContainerMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
// Status of the container.
State ContainerState `protobuf:"varint,3,opt,name=state,proto3,enum=runtime.v1alpha2.ContainerState" json:"state,omitempty"`
// Creation time of the container in nanoseconds.
CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
// Start time of the container in nanoseconds. Default: 0 (not specified).
StartedAt int64 `protobuf:"varint,5,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"`
// Finish time of the container in nanoseconds. Default: 0 (not specified).
FinishedAt int64 `protobuf:"varint,6,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"`

@k8s-ci-robot
Copy link

Hi @Iceber. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 3, 2021

Build succeeded.

@Iceber Iceber changed the title cri: fix container status [WIP] cri: fix container status Mar 3, 2021
@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 3, 2021

Build succeeded.

@Iceber Iceber changed the title [WIP] cri: fix container status cri: fix container status Mar 3, 2021
@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 3, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 4, 2021

Build succeeded.

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

pkg/cri/server/container_status.go Outdated Show resolved Hide resolved
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 4, 2021

Build succeeded.

@mikebrow
Copy link
Member

mikebrow commented Mar 4, 2021

/ok-to-test

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
Thanks!

@mikebrow mikebrow merged commit fa66f93 into containerd:master Mar 4, 2021
@Iceber Iceber deleted the fix-container-status branch March 5, 2021 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants