From d349ac57e474978dbf1ca40c09e648bef6bf3976 Mon Sep 17 00:00:00 2001 From: Natasha Sarkar Date: Thu, 27 Mar 2025 20:15:15 +0000 Subject: [PATCH] wait for containers to have started before doing cgroup check --- test/e2e/framework/pod/resize.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/e2e/framework/pod/resize.go b/test/e2e/framework/pod/resize.go index 5a7afbded02..ebc3104d5a0 100644 --- a/test/e2e/framework/pod/resize.go +++ b/test/e2e/framework/pod/resize.go @@ -29,6 +29,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" helpers "k8s.io/component-helpers/resource" + "k8s.io/kubectl/pkg/util/podutils" kubecm "k8s.io/kubernetes/pkg/kubelet/cm" kubeqos "k8s.io/kubernetes/pkg/kubelet/qos" "k8s.io/kubernetes/test/e2e/framework" @@ -444,6 +445,10 @@ func WaitForPodResizeActuation(ctx context.Context, f *framework.Framework, podC }, nil } } + // Wait for the pod to be ready. + if !podutils.IsPodReady(pod) { + return func() string { return "pod is not ready" }, nil + } return nil, nil })), )