Skip to content

cri: fix container status#5117

Merged
mikebrow merged 1 commit intocontainerd:masterfrom
Iceber:fix-container-status
Mar 4, 2021
Merged

cri: fix container status#5117
mikebrow merged 1 commit intocontainerd:masterfrom
Iceber:fix-container-status

Conversation

@Iceber
Copy link
Copy Markdown
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
Copy Markdown

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.

Details

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
Copy Markdown

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
@Iceber Iceber force-pushed the fix-container-status branch from 244fa35 to 75054a0 Compare March 3, 2021 10:00
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Mar 3, 2021

Build succeeded.

@Iceber Iceber force-pushed the fix-container-status branch from 75054a0 to 41ba733 Compare March 3, 2021 10:25
@Iceber Iceber changed the title [WIP] cri: fix container status cri: fix container status Mar 3, 2021
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Mar 3, 2021

Build succeeded.

@Iceber Iceber force-pushed the fix-container-status branch from 41ba733 to 17dbca9 Compare March 4, 2021 11:05
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Mar 4, 2021

Build succeeded.

Copy link
Copy Markdown
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

Comment thread pkg/cri/server/container_status.go Outdated
Signed-off-by: Iceber Gu <[email protected]>
@Iceber Iceber force-pushed the fix-container-status branch from 17dbca9 to 92ab1a6 Compare March 4, 2021 16:00
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Mar 4, 2021

Build succeeded.

@mikebrow
Copy link
Copy Markdown
Member

mikebrow commented Mar 4, 2021

/ok-to-test

Copy link
Copy Markdown
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.

3 participants