The assume cache logs adding assumed claims at V(4) but there wasn't anything
about in-flight claims in the log for a scheduling failure where the same
device was allocated twice (https://github.com/kubernetes/kubernetes/issues/133602).
Debugging that issue depends on seeing all changes related to assume cache
changes (not just the single "Assumed object") and in-flight claims. We could
make them all V(4) (= "debug level") but they seem more appropriate for V(5) (=
"trace level"), so the assume cache verbosity gets toned down to that.
The tests were accidentally shadowing the nodeIPs variable, resulting
in them being no-ops.
Noticed while trying to fix them to only act on a single node IP
anyway, because there's no guarantee that kubelet is listening on
every reported node IP.
The RS scale down closure was registered inside the per-pod loop,
causing it to run several times during cleanup. On the second+
iteration the RS Get/Update could fail with a conflict error if the
resourceVersion changed, failing the test during teardown even
though the test itself passed. Move it out of the loop so it runs once.
This commit fixes a failure in TestEtcdStoragePath when emulating version 1.34. The test failure was caused by the removal of alpha versions from the test data during emulation, which prevented 'storageVersionAtEmulationVersion' from correctly resolving the storage version for MutatingAdmissionPolicy (which relies on v1alpha1 in this compatibility mode).
Changes:
- Updated GetEtcdStorageDataServedAt in test/integration/etcd/data.go to pass a full copy of etcdStorageData (including alpha versions) to storageVersionAtEmulationVersion.
- Added ExpectedGVK to MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding in test/integration/etcd/data.go to ensure correct version resolution during tests.
- Removed explicit storage version overrides for MutatingAdmissionPolicy in pkg/kubeapiserver/default_storage_factory_builder.go as part of the graduation process.
- Register v1 MutatingAdmissionPolicy and Binding in apiserver storage.
- Add defaults and validation for v1 types.
- Update storage version hash data.
- Add API testdata.
This change allows the preemption to preempt a pod that is not yet
bound, but is already in prebind phase) without issuing a delete call to the
apiserver.
Pods are added to a special map of pods currently in prebind phaseand
preemption can cancel the context that is used for given pod prebind phase ,
allowing it to gracefully handle error in the same manner as errors
coming out from prebind plugins. This results in pods being pushed to
backoff queue, allowing them to be rescheduled in upcoming scheduling
cycles.