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

kuberuntime: report StartedAt regardless of container states #45977

Merged
merged 2 commits into from
May 17, 2017

Conversation

yujuhong
Copy link
Contributor

@yujuhong yujuhong commented May 17, 2017

This fixes #45943

Release note:

Fix the bug where StartedAt time is not reported for exited containers.

@yujuhong yujuhong added release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/node Categorizes an issue or PR as relevant to SIG Node. labels May 17, 2017
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 17, 2017
@k8s-github-robot k8s-github-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 17, 2017
if c.State == runtimeapi.ContainerState_CONTAINER_RUNNING {
cStatus.StartedAt = time.Unix(0, status.StartedAt)
} else {
if c.State == runtimeapi.ContainerState_CONTAINER_EXITED {
Copy link
Contributor Author

@yujuhong yujuhong May 17, 2017

Choose a reason for hiding this comment

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

FYI, I attempted to write a simple unit test, but that'd require quite a bit of refactoring. Unit test coverage should be added to this package in general.

@mrunalp
Copy link
Contributor

mrunalp commented May 17, 2017

👍

@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 17, 2017
@yujuhong
Copy link
Contributor Author

Added the second commit to refactor and add a unit test.

@yujuhong
Copy link
Contributor Author

@k8s-bot kops aws e2e test this

@Random-Liu
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 17, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Random-Liu, yujuhong

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 45977, 45890)

@k8s-github-robot k8s-github-robot merged commit ed8ce90 into kubernetes:master May 17, 2017
@k8s-github-robot
Copy link

Automatic merge from submit-queue

k8s-github-robot pushed a commit that referenced this pull request May 19, 2017
…77-upstream-release-1.6

Automatic merge from submit-queue

Automated cherry pick of #45977

Cherry pick of #45977 on release-1.6.

#45977: kuberuntime: report StartedAt for exited containers
@k8s-cherrypick-bot
Copy link

Commit found in the "release-1.6" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/node Categorizes an issue or PR as relevant to SIG Node. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pod's container status' "Started" is null after container termination
7 participants