Repository: kubernetes/kubernetes (language: go)

Issue:
[Failing Test] Container Runtime blackbox test on terminated container should report termination message if TerminationMessagePath is set as non-root user and at a non-default path [NodeConformance] [Conformance]
### Which jobs are failing?

* sig-release-master-informing
* capz-windows-master

### Which tests are failing?

* [Container Runtime blackbox test on terminated container should report termination message if TerminationMessagePath is set as non-root user and at a non-default path [NodeConformance] [Conformance]](https://prow.k8s.io/view/gs/kubernetes-ci-logs/logs/ci-kubernetes-e2e-capz-master-windows/1856688711584976896)

### Since when has it been failing?

* First failure: Tue, 29 Oct 2024 11:31:02 -03
* Latest failure: Wed, 13 Nov 2024 10:21:11 -03

### Testgrid link

* [https://testgrid.k8s.io/sig-release-master-informing#capz-windows-master&exclude-non-failed-tests=](https://testgrid.k8s.io/sig-release-master-informing#capz-windows-master&exclude-non-failed-tests=)
* [https://storage.googleapis.com/k8s-triage/index.html?test=Container%20Runtime%20blackbox%20test%20on%20terminated%20container%20should%20report%20termination%20message%20if%20TerminationMessagePath%20is%20set%20as%20non-root%20user%20and%20at%20a%20non-default%20path%20[NodeConformance]%20[Conformance]](https://storage.googleapis.com/k8s-triage/index.html?test=Container%20Runtime%20blackbox%20test%20on%20terminated%20container%20should%20report%20termination%20message%20if%20TerminationMessagePath%20is%20set%20as%20non-root%20user%20and%20at%20a%20non-default%20path%20[NodeConformance]%20[Conformance])

### Reason for failure (if possible)

```
	F 2024-11-13 10:21:11 -0300 -03 [FAILED] Timed out after 300.001s.
Expected
    <v1.PodPhase>: Failed
...detected after the initial failure. These are visible in the timeline

	F 2024-11-13 07:20:11 -0300 -03 [FAILED] Timed out after 300.001s.
Expected
    <v1.PodPhase>: Failed
...detected after the initial failure. These are visible in the timeline

	F 2024-11-13 04:20:11 -0300 -03 [FAILED] Timed out after 300.001s.
Expected
    <v1.PodPhase>: Failed
...detected after the initial failure. These are visible in the timeline
```

### Anything else we need to know?

Multiple tests failing at the same time in the dash

```
Kubernetes e2e suite.[It] [sig-storage] ConfigMap should be consumable from pods in volume [NodeConformance] [Conformance]
Kubernetes e2e suite.[It] [sig-storage] ConfigMap should be consumable from pods in volume as non-root [NodeConformance] [Conformance]
..
Kubernetes e2e suite.[It] [sig-storage] ConfigMap should be consumable from pods in volume as non-root [NodeConformance] [Conformance]
```
### Relevant SIG(s)

/sig windows
cc @kubernetes/release-team-release-signal


Discussion / hints:
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.


<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
</details>
Finding these errors logs on kubelet

```
E1113 13:45:09.671969    2704 kubelet_pods.go:555] "Hostname for pod was too long, truncated it" podName="termination-message-containerbf4955de-376b-48e6-a330-ae0979199e46" hostnameMaxLen=63 truncatedHostname="termination-message-containerbf4955de-376b-48e6-a330-ae0979199e"
I1113 13:45:19.327928    2704 util.go:48] "No ready sandbox for pod can be found. Need to start a new one" pod="container-runtime-1716/termination-message-containerbf4955de-376b-48e6-a330-ae0979199e46"
I1113 13:45:19.412126    2704 kubelet.go:2506] "SyncLoop (PLEG): event for pod" pod="container-runtime-1716/termination-message-containerbf4955de-376b-48e6-a330-ae0979199e46" event={"ID":"243558cf-25d9-4bfc-a858-3c8ccc309f14","Type":"ContainerDied","Data":"faac2d7727b9cfe5067d409c97ac173ebdba4a11a80c2c51856086d7b2c91305"}
```

https://storage.googleapis.com/kubernetes-ci-logs/logs/ci-kubernetes-e2e-capz-master-windows/1856688711584976896/artifacts/clusters/capz-conf-2eo21x/machines/capz-conf-2eo21x-md-win-rj42v-4glr7/kubelet.log
/sig node

Thanks @tallclair for offering to take a look!
/kind failing-test
/cc @kubernetes/sig-windows-leads @SergeyKanzhelev 
/priority critical-urgent 
since the failing test are conformance tests

/milestone v1.32

Fix patch:
diff --git a/pkg/apis/core/fuzzer/fuzzer.go b/pkg/apis/core/fuzzer/fuzzer.go
index f50493c8ed8f3..a02f4151d7855 100644
--- a/pkg/apis/core/fuzzer/fuzzer.go
+++ b/pkg/apis/core/fuzzer/fuzzer.go
@@ -309,23 +309,6 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
 			c.FuzzNoCustom(ct)                                          // fuzz self without calling this function again
 			ct.TerminationMessagePath = "/" + ct.TerminationMessagePath // Must be non-empty
 			ct.TerminationMessagePolicy = "File"
-			// Match defaulting in pkg/apis/core/v1/defaults.go.
-			_, hasCPUReq := ct.Resources.Requests[core.ResourceCPU]
-			_, hasCPULim := ct.Resources.Limits[core.ResourceCPU]
-			_, hasMemReq := ct.Resources.Requests[core.ResourceMemory]
-			_, hasMemLim := ct.Resources.Limits[core.ResourceMemory]
-			if hasCPUReq || hasCPULim {
-				ct.ResizePolicy = append(ct.ResizePolicy, core.ContainerResizePolicy{
-					ResourceName:  core.ResourceCPU,
-					RestartPolicy: core.NotRequired,
-				})
-			}
-			if hasMemReq || hasMemLim {
-				ct.ResizePolicy = append(ct.ResizePolicy, core.ContainerResizePolicy{
-					ResourceName:  core.ResourceMemory,
-					RestartPolicy: core.NotRequired,
-				})
-			}
 		},
 		func(ep *core.EphemeralContainer, c fuzz.Continue) {
 			c.FuzzNoCustom(ep)                                                                   // fuzz self without calling this function again
diff --git a/pkg/features/versioned_kube_features.go b/pkg/features/versioned_kube_features.go
index 585a77d9fc7d3..9b8bbc6958f5c 100644
--- a/pkg/features/versioned_kube_features.go
+++ b/pkg/features/versioned_kube_features.go
@@ -404,7 +404,6 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate
 
 	InPlacePodVerticalScaling: {
 		{Version: version.MustParse("1.27"), Default: false, PreRelease: featuregate.Alpha},
-		{Version: version.MustParse("1.32"), Default: true, PreRelease: featuregate.Beta},
 	},
 
 	InPlacePodVerticalScalingAllocatedStatus: {
diff --git a/pkg/kubelet/status/status_manager.go b/pkg/kubelet/status/status_manager.go
index 60e4c0115b6f7..3da131d539279 100644
--- a/pkg/kubelet/status/status_manager.go
+++ b/pkg/kubelet/status/status_manager.go
@@ -179,7 +179,6 @@ func NewManager(kubeClient clientset.Interface, podManager PodManager, podDeleti
 		podDeletionSafety:       podDeletionSafety,
 		podStartupLatencyHelper: podStartupLatencyHelper,
 		stateFileDirectory:      stateFileDirectory,
-		state:                   state.NewNoopStateCheckpoint(),
 	}
 }
 
@@ -203,6 +202,9 @@ func isPodStatusByKubeletEqual(oldStatus, status *v1.PodStatus) bool {
 }
 
 func (m *manager) Start() {
+	// Initialize m.state to no-op state checkpoint manager
+	m.state = state.NewNoopStateCheckpoint()
+
 	// Create pod allocation checkpoint manager even if client is nil so as to allow local get/set of AllocatedResources & Resize
 	if utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScaling) {
 		stateImpl, err := state.NewStateCheckpoint(m.stateFileDirectory, podStatusManagerStateFile)


Test patch:
diff --git a/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go b/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go
index 97dbcaeaa0f77..17cf6806d9d56 100644
--- a/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go
+++ b/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go
@@ -1264,11 +1264,6 @@ func verifyActions(t *testing.T, expected, actual *podActions, desc string) {
 			actual.ContainersToKill[k] = info
 		}
 	}
-
-	if expected.ContainersToUpdate == nil && actual.ContainersToUpdate != nil {
-		// No need to distinguish empty and nil maps for the test.
-		expected.ContainersToUpdate = map[v1.ResourceName][]containerToUpdateInfo{}
-	}
 	assert.Equal(t, expected, actual, desc)
 }
 
diff --git a/test/e2e/common/node/pod_resize.go b/test/e2e/common/node/pod_resize.go
index ec8d8e923e747..7d773badf1e88 100644
--- a/test/e2e/common/node/pod_resize.go
+++ b/test/e2e/common/node/pod_resize.go
@@ -25,6 +25,7 @@ import (
 	"k8s.io/apimachinery/pkg/api/resource"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/types"
+	"k8s.io/kubernetes/test/e2e/feature"
 	"k8s.io/kubernetes/test/e2e/framework"
 	e2enode "k8s.io/kubernetes/test/e2e/framework/node"
 	e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
@@ -1173,7 +1174,7 @@ func doPodResizeErrorTests(f *framework.Framework) {
 //       Above tests are performed by doSheduletTests() and doPodResizeResourceQuotaTests()
 //       in test/e2e/node/pod_resize.go
 
-var _ = SIGDescribe("Pod InPlace Resize Container", framework.WithSerial(), func() {
+var _ = SIGDescribe("Pod InPlace Resize Container", framework.WithSerial(), feature.InPlacePodVerticalScaling, "[NodeAlphaFeature:InPlacePodVerticalScaling]", func() {
 	f := framework.NewDefaultFramework("pod-resize-tests")
 
 	ginkgo.BeforeEach(func(ctx context.Context) {
diff --git a/test/e2e/feature/feature.go b/test/e2e/feature/feature.go
index 9448f6590a6d8..77a77ad7b9167 100644
--- a/test/e2e/feature/feature.go
+++ b/test/e2e/feature/feature.go
@@ -186,6 +186,9 @@ var (
 	// Ingress.networking.k8s.io to be present.
 	Ingress = framework.WithFeature(framework.ValidFeatures.Add("Ingress"))
 
+	// TODO: document the feature (owning SIG, when to use this feature for a test)
+	InPlacePodVerticalScaling = framework.WithFeature(framework.ValidFeatures.Add("InPlacePodVerticalScaling"))
+
 	// Owner: sig-network
 	// Marks tests that require a cluster with dual-stack pod and service networks.
 	IPv6DualStack = framework.WithFeature(framework.ValidFeatures.Add("IPv6DualStack"))
diff --git a/test/e2e/node/pod_resize.go b/test/e2e/node/pod_resize.go
index ff932885636fd..bd70ba509552d 100644
--- a/test/e2e/node/pod_resize.go
+++ b/test/e2e/node/pod_resize.go
@@ -27,6 +27,7 @@ import (
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/types"
 	resourceapi "k8s.io/kubernetes/pkg/api/v1/resource"
+	"k8s.io/kubernetes/test/e2e/feature"
 	"k8s.io/kubernetes/test/e2e/framework"
 	e2enode "k8s.io/kubernetes/test/e2e/framework/node"
 	e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
@@ -355,7 +356,7 @@ func doPodResizeSchedulerTests(f *framework.Framework) {
 	})
 }
 
-var _ = SIGDescribe(framework.WithSerial(), "Pod InPlace Resize Container (scheduler-focused)", func() {
+var _ = SIGDescribe(framework.WithSerial(), "Pod InPlace Resize Container (scheduler-focused)", feature.InPlacePodVerticalScaling, func() {
 	f := framework.NewDefaultFramework("pod-resize-scheduler-tests")
 	ginkgo.BeforeEach(func(ctx context.Context) {
 		node, err := e2enode.GetRandomReadySchedulableNode(ctx, f.ClientSet)
@@ -367,7 +368,7 @@ var _ = SIGDescribe(framework.WithSerial(), "Pod InPlace Resize Container (sched
 	doPodResizeSchedulerTests(f)
 })
 
-var _ = SIGDescribe("Pod InPlace Resize Container", func() {
+var _ = SIGDescribe("Pod InPlace Resize Container", feature.InPlacePodVerticalScaling, func() {
 	f := framework.NewDefaultFramework("pod-resize-tests")
 
 	ginkgo.BeforeEach(func(ctx context.Context) {
diff --git a/test/featuregates_linter/test_data/versioned_feature_list.yaml b/test/featuregates_linter/test_data/versioned_feature_list.yaml
index eaa73a9a73af9..3e355898dd771 100644
--- a/test/featuregates_linter/test_data/versioned_feature_list.yaml
+++ b/test/featuregates_linter/test_data/versioned_feature_list.yaml
@@ -540,10 +540,6 @@
     lockToDefault: false
     preRelease: Alpha
     version: "1.27"
-  - default: true
-    lockToDefault: false
-    preRelease: Beta
-    version: "1.32"
 - name: InPlacePodVerticalScalingAllocatedStatus
   versionedSpecs:
   - default: false