Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@openshift-cherrypick-robot

This is an automated cherry-pick of #4149

/assign haircommander

none

When a container has been stopped, but the rest of its pod is still stopping, the kubelet still runs exec probes
IsAlive() correctly identifies the container has been stopped, and logs an error, but in reality, this is expected.

Instead of logging the error, return it in IsAlive (and also ExecSync), and let the kubelet report it if it thinks it'll be problematic

This fixes superluous errors like this:
"Checking if PID of 4a81020e858fbdd1ee6a271190ab36aec1940489386e177f33c2e62afa309580 is running failed: PID running but not the original container. PID wrap may have occurred"

Signed-off-by: Peter Hunt <[email protected]>
@openshift-ci-robot openshift-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Sep 3, 2020
@openshift-ci-robot
Copy link

openshift-ci-robot commented Sep 3, 2020

@openshift-cherrypick-robot: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/openshift-jenkins/e2e_crun_cgroupv2 3928f80 link /test e2e_cgroupv2

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@codecov
Copy link

codecov bot commented Sep 3, 2020

Codecov Report

Merging #4157 into release-1.19 will decrease coverage by 0.01%.
The diff coverage is 40.00%.

@@               Coverage Diff                @@
##           release-1.19    #4157      +/-   ##
================================================
- Coverage         41.58%   41.56%   -0.02%     
================================================
  Files               110      110              
  Lines              9046     9043       -3     
================================================
- Hits               3762     3759       -3     
  Misses             4944     4944              
  Partials            340      340              

// IsAlive is a function that checks if a container's init PID exists.
// It is used to check a container state when we don't want a `$runtime state` call
func (c *Container) IsAlive() bool {
func (c *Container) IsAlive() error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it's me and my mis-spent youth doing Java, but I don't think any function that starts with "is" should return anything other than a boolean. I'd rename the function.

Copy link
Member

Choose a reason for hiding this comment

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

I will look into this as a follow up in the master version :)

@haircommander
Copy link
Member

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 11, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haircommander, mrunalp, openshift-cherrypick-robot

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [haircommander,mrunalp]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fidencio
Copy link
Contributor

/retest

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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-1.19 release-note-none Denotes a PR that doesn't merit a release note.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants