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

[Flaky] Garbage collector should not delete dependents that have both valid owner and owner that's waiting for dependents to be deleted #124369

Open
aojea opened this issue Apr 18, 2024 · 4 comments
Labels
kind/flake Categorizes issue or PR as related to a flaky test. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.

Comments

@aojea
Copy link
Member

aojea commented Apr 18, 2024

         there was a flake of this test today:

https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/124361/pull-kubernetes-conformance-kind-ga-only-parallel/1780870571198779392

Originally posted by @neolit123 in > #120570 (comment)

it failed with

STEP: Found 1 events. - k8s.io/kubernetes/test/e2e/framework/debug/dump.go:46 @ 04/18/24 08:23:42.251
I0418 08:23:42.251282 68958 dump.go:53] At 2024-04-18 08:23:40 +0000 UTC - event for pod1: {kubelet kind-worker2} OutOfpods: Node didn't have enough resource: pods, requested: 1, used: 110, capacity: 110
I0418 08:23:42.259586 68958 resource.go:168] POD   NODE          PHASE   GRACE  CONDITIONS
I0418 08:23:42.259641 68958 resource.go:175] pod1  kind-worker2  Failed         []
IIRC there was one test that created a lot of pods

simpletest-rc-to-be-deleted-8r928

That is the test we need to fail the bug, as it is impacting the other tests

framework.ConformanceIt("should not delete dependents that have both valid owner and owner that's waiting for dependents to be deleted", func(ctx context.Context) {
clientSet := f.ClientSet
rcClient := clientSet.CoreV1().ReplicationControllers(f.Namespace.Name)
podClient := clientSet.CoreV1().Pods(f.Namespace.Name)
rc1Name := "simpletest-rc-to-be-deleted"
replicas := estimateMaximumPods(ctx, clientSet, 10, 100)

The test run a large number of Pods that may exhaust the capacity of the nodes and make other test to fail because are not able to schedule Pods

/sig api-machinery

@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 18, 2024
@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.

@aojea
Copy link
Member Author

aojea commented Apr 18, 2024

/kind flake

@alculquicondor
Copy link
Member

Are we creating the default 12500 pods that would trigger the gc?

@aojea
Copy link
Member Author

aojea commented Apr 18, 2024

Are we creating the default 12500 pods that would trigger the gc?

// estimateMaximumPods estimates how many pods the cluster can handle
// with some wiggle room, to prevent pods being unable to schedule due
// to max pod constraints.
func estimateMaximumPods(ctx context.Context, c clientset.Interface, min, max int32) int32 {
nodes, err := e2enode.GetReadySchedulableNodes(ctx, c)
framework.ExpectNoError(err)
availablePods := int32(0)
for _, node := range nodes.Items {
if q, ok := node.Status.Allocatable["pods"]; ok {
if num, ok := q.AsInt64(); ok {
availablePods += int32(num)
continue
}
}
// best guess per node, since default maxPerCore is 10 and most nodes have at least
// one core.
availablePods += 10
}
//avoid creating exactly max pods
availablePods = int32(float32(availablePods) * 0.5)
// bound the top and bottom
if availablePods > max {
availablePods = max
}
if availablePods < min {
availablePods = min
}
return availablePods
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/flake Categorizes issue or PR as related to a flaky test. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.
Projects
None yet
Development

No branches or pull requests

3 participants