Skip to content

Commit 98d0402

Browse files
committed
test(kubernetes): pin RetryOnFailure on the Proxmox csi release
The KubeVirt csi and cilium releases carry a helm-unittest pin on strategy.name: RetryOnFailure for both actions, and the e2e HelmRelease guard names those two tests as load-bearing. helmreleases/csi-proxmox.yaml sets the same strategy for the same reason and had no pin. Add the mirror test and update the guard comment that pointed at the gap. No template change. Closes #4731 Signed-off-by: Marian Koreniuk <[email protected]> Assisted-by: LLM
1 parent aed7fa8 commit 98d0402

2 files changed

Lines changed: 82 additions & 1 deletion

File tree

‎hack/e2e-chainsaw/_lib/run-kubernetes.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5334,7 +5334,7 @@ cozy_guard_helmrelease() {
53345334
# are load-bearing for this guard and not only for the chart. The csi they
53355335
# pin is helmreleases/csi.yaml, the KubeVirt driver this suite runs; on the
53365336
# Proxmox substrate the same release comes from csi-proxmox.yaml, which sets
5337-
# the strategy too and has no such pin.
5337+
# the strategy too and is pinned by csi_proxmox_install_retry_test.yaml.
53385338
if [ "${_strategy}" = "RetryOnFailure" ]; then
53395339
echo "HelmRelease ${_hr} carries a failed or uninstalled Snapshot, and its install strategy is RetryOnFailure, which retries a failed action in place instead of remediating it. An action on this release failed during the run; the release may have recovered on a retry since, and the failure is still the finding. On the tenant cilium the cause can sit outside the chart: its operator Deployment cannot schedule before a worker registers, so workers arriving more than two 10m install timeouts after the install started leave this Snapshot while still inside the node-join deadline. Compare the Snapshot times below with when the first node turned Ready before looking at the release." >&2
53405340
_cozy_guard_kubectl -n "$_ns" describe hr "${_hr}" >&2
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
suite: csi-proxmox.yaml install retry strategy
2+
3+
# The Proxmox counterpart of csi_install_retry_test.yaml. helmreleases/
4+
# csi-proxmox.yaml sets the same strategy as csi.yaml for the same reason, and
5+
# the e2e HelmRelease guard in hack/e2e-chainsaw/_lib/run-kubernetes.sh names
6+
# the pins on cilium and csi as load-bearing: take RetryOnFailure away and a
7+
# failed action on the release turns from a failed run into a note. This file
8+
# holds the Proxmox release to the same pin.
9+
10+
templates:
11+
- templates/helmreleases/csi-proxmox.yaml
12+
13+
values:
14+
- values/common.yaml
15+
16+
set:
17+
_namespace:
18+
etcd: etcd-test
19+
substrate: proxmox
20+
proxmox:
21+
dnsServers: ["192.0.2.53"]
22+
allowedNodes: [pve-1]
23+
ipv4Config:
24+
addresses: ["192.0.2.10-192.0.2.20"]
25+
gateway: "192.0.2.1"
26+
prefix: 24
27+
csi:
28+
enabled: true
29+
credentialsSecretName: proxmox-csi-creds
30+
storageClasses:
31+
- name: proxmox
32+
storage: local-lvm
33+
ccm:
34+
credentialsSecretName: proxmox-ccm-creds
35+
36+
tests:
37+
# Install remediation is an uninstall in every case Flux offers, so under the
38+
# default strategy an install that misses its budget takes the tenant's CSI
39+
# node plugin and storage classes away until a later attempt lands them
40+
# again. RetryOnFailure keeps the manifests applied and retries instead.
41+
- it: retries a failed install instead of uninstalling the tenant CSI
42+
release:
43+
name: kubernetes-test
44+
namespace: tenant-test
45+
asserts:
46+
- equal:
47+
path: spec.install.strategy.name
48+
value: RetryOnFailure
49+
- equal:
50+
path: spec.install.strategy.retryInterval
51+
value: 30s
52+
53+
# The controller performs the retry of a failed install as an upgrade, so
54+
# without a strategy here that retry's own failure falls through to upgrade
55+
# remediation instead of retrying again.
56+
- it: carries the strategy on the upgrade action the retry runs as
57+
release:
58+
name: kubernetes-test
59+
namespace: tenant-test
60+
asserts:
61+
- equal:
62+
path: spec.upgrade.strategy.name
63+
value: RetryOnFailure
64+
- equal:
65+
path: spec.upgrade.strategy.retryInterval
66+
value: 30s
67+
68+
# The strategy governs a failed release. An absent release and an out-of-sync
69+
# one take different branches, which consult the retry count instead and stop
70+
# acting once it is exhausted.
71+
- it: keeps unlimited retries for the branches the strategy does not reach
72+
release:
73+
name: kubernetes-test
74+
namespace: tenant-test
75+
asserts:
76+
- equal:
77+
path: spec.install.remediation.retries
78+
value: -1
79+
- equal:
80+
path: spec.upgrade.remediation.retries
81+
value: -1

0 commit comments

Comments
 (0)