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

conformance: promote container exec probe timeout tests #97619

Merged
merged 2 commits into from Feb 24, 2021

Conversation

andrewsykim
Copy link
Member

What type of PR is this?
/kind feature

What this PR does / why we need it:
In v1.20 we fixed exec probe timeouts (#94115). Along with that PR, we also un-skipped a test exercising this behavior with liveness probes and added a new test for readiness probes. In past discussions in SIG Node, there was general agreement that exec probe timeout tests should probably be included in conformance. #96694 added those tests to NodeConformance, this PR adds them to actual conformance.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Dec 30, 2020
@k8s-ci-robot k8s-ci-robot added area/conformance Issues or PRs related to kubernetes conformance tests area/test sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Dec 30, 2020
…manec

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
@andrewsykim
Copy link
Member Author

@andrewsykim
Copy link
Member Author

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 4, 2021
@@ -210,10 +210,10 @@ var _ = framework.KubeDescribe("Probing container", func() {

/*
Release: v1.9
Copy link
Member

Choose a reason for hiding this comment

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

I'd suggest to change it to 1.20 since it is only fixed than. Keeping 1.9 is misleading

Copy link
Member

Choose a reason for hiding this comment

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

you can list both, to indicate the change in behavior in 1.20: v1.9, v1.20

Copy link
Member

Choose a reason for hiding this comment

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

once that change is in, I can approve

@SergeyKanzhelev
Copy link
Member

/lgtm

I wonder if any positive test would be useful here. Like pod will stay alive if exec prob successful. It may be a slow test though, just thinking out loud.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 4, 2021
@andrewsykim
Copy link
Member Author

@SergeyKanzhelev I think we do have positive test cases, see this one for example

/*
Release: v1.9
Testname: Pod liveness probe, using local file, no restart
Description: Pod is created with liveness probe that uses 'exec' command to cat /temp/health file. Liveness probe MUST not fail to check health and the restart count should remain 0.
*/
framework.ConformanceIt("should *not* be restarted with a exec \"cat /tmp/health\" liveness probe [NodeConformance]", func() {
cmd := []string{"/bin/sh", "-c", "echo ok >/tmp/health; sleep 600"}
livenessProbe := &v1.Probe{
Handler: execHandler([]string{"cat", "/tmp/health"}),
InitialDelaySeconds: 15,
TimeoutSeconds: 5, // default 1s can be pretty aggressive in CI environments with low resources
FailureThreshold: 1,
}
pod := busyBoxPodSpec(nil, livenessProbe, cmd)
RunLivenessTest(f, pod, 0, defaultObservationTimeout)
})

@SergeyKanzhelev
Copy link
Member

@johnbelamaric can you please approve?

@dims
Copy link
Member

dims commented Feb 13, 2021

I was part of the discussion in #94115, there was a change to add this to NodeConformance as well #96694 I think this is now ready for Conformance as we need to enforce this across all the CRI implementations (which we already confirmed with various impls)

So @johnbelamaric and @spiffxp please approve the changes to testdata @SergeyKanzhelev from sig-node has verified this as well.

Copy link
Member

@spiffxp spiffxp left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewsykim, spiffxp

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

The pull request process is described here

Needs approval from an approver in each of these files:

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 23, 2021
@spiffxp
Copy link
Member

spiffxp commented Feb 23, 2021

/test pull-kubernetes-integration
flake #98606

@SergeyKanzhelev
Copy link
Member

/test pull-kubernetes-e2e-kind

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@SergeyKanzhelev
Copy link
Member

/test pull-kubernetes-e2e-kind

@derekwaynecarr
Copy link
Member

This test should not have been elevated into conformance as long as the feature gate to disable (and preserve the old buggy behavior) remained.

@derekwaynecarr
Copy link
Member

We need to revert this PR prior to shipping 1.21.

@spiffxp
Copy link
Member

spiffxp commented Mar 9, 2021

Does the feature gate default to the old buggy behavior today (in v1.21)?

@SergeyKanzhelev
Copy link
Member

Does the feature gate default to the old buggy behavior today (in v1.21)?

Feature gate defaults to a "fixed" state starting 1.20.

@derekwaynecarr
Copy link
Member

To be more precise:

the test should be taken out of conformance
the tests should be updated so it skips if the feature gate is disabled
the test will not be allowed to move into conformance until the feature gate is removed

@spiffxp the present behavior defaults the feature gate to "on"

@SergeyKanzhelev
Copy link
Member

#100035

@SergeyKanzhelev
Copy link
Member

Also from @dims: #100036 =)

@spiffxp
Copy link
Member

spiffxp commented Mar 9, 2021

#99909 (comment) WDYT about this approach

@SergeyKanzhelev
Copy link
Member

SergeyKanzhelev commented Mar 9, 2021

#99909 (comment) WDYT about this approach

the problem is not version skew, it is that AKS wants to run conformance tests while this flag is off. And they want the flag off for the same reason as we extended the removal of a feature flag - some customers may not be ready

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. area/conformance Issues or PRs related to kubernetes conformance tests area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants