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

Report event for the cases when probe returned Unknown result #116026

Open
SergeyKanzhelev opened this issue Feb 24, 2023 · 18 comments
Open

Report event for the cases when probe returned Unknown result #116026

SergeyKanzhelev opened this issue Feb 24, 2023 · 18 comments
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/node Categorizes an issue or PR as relevant to SIG Node.

Comments

@SergeyKanzhelev
Copy link
Member

There are a few cases when the Unknown result can be returned by the probe. For example see: #106682.

It will be useful to expose those in logs and as an event similar to what we do for Warning:

pb.recordContainerEvent(pod, &container, v1.EventTypeWarning, events.ContainerProbeWarning, "%s probe warning: %s", probeType, output)

What needs to be done:

  1. Implement logging and exposing event in case of Unknown probe result somewhere around
    pb.recordContainerEvent(pod, &container, v1.EventTypeWarning, events.ContainerProbeWarning, "%s probe warning: %s", probeType, output)
  2. For each instance of probes potentially returning the Unknown result have a test that validates this test case. It may be either e2e test or unit test. You may find an example of e2e test that results in Unknown result from exec probe in one of the links from Liveness Probe with an invalid command doesn't trigger container restarts and ContainersReady remains True  #106682

/sig node
/help wanted
/good-first-issue
/priority backlog

This issue is marked as "good first issue". Before assigning issue to yourself, please make sure you understand the assignment and list cases you will need to cover with tests.

cc @aojea

@k8s-ci-robot
Copy link
Contributor

@SergeyKanzhelev:
This request has been marked as suitable for new contributors.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

There are a few cases when the Unknown result can be returned by the probe. For example see: #106682.

It will be useful to expose those in logs and as an event similar to what we do for Warning:

pb.recordContainerEvent(pod, &container, v1.EventTypeWarning, events.ContainerProbeWarning, "%s probe warning: %s", probeType, output)

What needs to be done:

  1. Implement logging and exposing event in case of Unknown probe result somewhere around
    pb.recordContainerEvent(pod, &container, v1.EventTypeWarning, events.ContainerProbeWarning, "%s probe warning: %s", probeType, output)
  2. For each instance of probes potentially returning the Unknown result have a test that validates this test case. It may be either e2e test or unit test. You may find an example of e2e test that results in Unknown result from exec probe in one of the links from Liveness Probe with an invalid command doesn't trigger container restarts and ContainersReady remains True  #106682

/sig node
/help wanted
/good-first-issue
/priority backlog

This issue is marked as "good first issue". Before assigning issue to yourself, please make sure you understand the assignment and list cases you will need to cover with tests.

cc @aojea

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.

@k8s-ci-robot k8s-ci-robot added sig/node Categorizes an issue or PR as relevant to SIG Node. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. priority/backlog Higher priority than priority/awaiting-more-evidence. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 24, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@VishalPraneeth
Copy link

/assign

@apimpalgaonkar
Copy link

/assign

@nerdynikhil
Copy link

/assign

@apimpalgaonkar
Copy link

/assign

@liangyuanpeng
Copy link
Contributor

@apimpalgaonkar @nerdynikhil Hi, seems like @VishalPraneeth is really working for it and created a PR,

@abhilasha2418
Copy link

/assign

@ashutosh887
Copy link

let me work on this issue now please
/assign

@ashutosh887 ashutosh887 removed their assignment Mar 17, 2023
chetanguptaa added a commit to chetanguptaa/kubernetes that referenced this issue Mar 22, 2023
@Harsh22222
Copy link

/assign

@bishopmate
Copy link

/assign

chetanguptaa added a commit to chetanguptaa/kubernetes that referenced this issue Mar 31, 2023
@RANJEETJ06
Copy link

let me sove a issue, i am beginner to git please suggest me a easy issue to resolve

@samyakjain10
Copy link

Hey everyone. Just saw this issue assigned to multiple people and multiple PRs raised already. Was curious to know if the issue is resolved or is it up for grabs?

@Ashishraj99
Copy link

Implement logging and event exposing in the case of an "Unknown" probe result in the kubernetes/pkg/kubelet/prober/prober.go file. This can be done by adding a new line of code similar to the existing line 113:
go
Type This code
(pb.recordContainerEvent(pod, &container, v1.EventTypeUnkown, events.ContainerProbeWarning, "%s probe warning: %s", probeType, output)
However, instead of using the v1.EventTypeWarning constant, you should use a new constant for the "Unknown" event type, such as v1.EventTypeUnknown.

For each instance where probes potentially return an "Unknown" result, you should have a corresponding test case to validate this scenario. These tests can be either end-to-end (e2e) tests or unit tests. Refer to the example of an e2e test that results in an "Unknown" result from an exec probe in the link you provided (Liveness Probe with an invalid command doesn't trigger container restarts and ContainersReady remains True #106682).

@SoorajBharadwaj07
Copy link

SoorajBharadwaj07 commented Jun 9, 2023

Hi,I was looking for an Open issue with "Good first use" label. I would like to work on this issue if this is still not fixed

@SoorajBharadwaj07
Copy link

/assign

@SahilTiwaricontact9
Copy link

ok

@j0shgrant
Copy link

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/node Categorizes an issue or PR as relevant to SIG Node.
Projects
None yet