|
2 | 2 | # Sourced by the chainsaw kubernetes-latest/previous Tests after cd to repo root. |
3 | 3 | . hack/e2e-chainsaw/_lib/remediation-guard.sh |
4 | 4 | . hack/e2e-chainsaw/_lib/talos-image-cache.sh |
5 | | -. hack/e2e-chainsaw/_lib/ghcr-mirror.sh |
6 | 5 |
|
7 | | -# talos_spec_block: emit the tenant Kubernetes CR `spec.talos` block combining the |
8 | | -# Talos OS image cache (imageFactoryURL) and the ghcr.io worker image-pull mirror |
9 | | -# (registryMirrors), each included only when its in-sandbox mirror is up. Prints |
10 | | -# nothing when both fall back to the public defaults, so the chart defaults apply. |
| 6 | +# talos_spec_block: emit the tenant Kubernetes CR `spec.talos` block with the Talos |
| 7 | +# OS image cache (imageFactoryURL) when the in-sandbox cache is up. Prints nothing |
| 8 | +# when it falls back to the public default, so the chart default applies. |
11 | 9 | # Indented for insertion directly under `spec:` in the heredoc below. |
12 | 10 | # |
13 | 11 | # No trailing newline, unlike the single-key helper this replaced: the caller reads |
14 | 12 | # it through `$(...)`, which strips one anyway, and `${talos_block}` sits on a line |
15 | 13 | # of its own in the heredoc, which supplies the break before the next `spec` key. |
16 | 14 | # An empty result therefore leaves a blank line, which is valid YAML. |
17 | 15 | talos_spec_block() { |
18 | | - local url ghcr mirrors |
| 16 | + local url |
19 | 17 | url=$(resolve_talos_image_factory_url) |
20 | | - ghcr=$(resolve_ghcr_mirror_endpoint) |
21 | | - mirrors=$(ghcr_registry_mirrors_block "$ghcr") |
22 | | - [ -n "$url" ] || [ -n "$mirrors" ] || return 0 |
| 18 | + [ -n "$url" ] || return 0 |
23 | 19 | printf ' talos:\n' |
24 | | - [ -n "$url" ] && printf ' imageFactoryURL: %s\n' "$url" |
25 | | - [ -n "$mirrors" ] && printf '%s' "$mirrors" |
| 20 | + printf ' imageFactoryURL: %s\n' "$url" |
26 | 21 | return 0 |
27 | 22 | } |
28 | 23 |
|
@@ -3745,11 +3740,8 @@ COZY_DIAG_RATE_INTERVAL_DEFAULT=12 |
3745 | 3740 | # snapshot past the end of the window. |
3746 | 3741 | # |
3747 | 3742 | # What a budget of this size gives up first is what is gated last -- |
3748 | | -# ghcr_mirror_diagnose and talos_image_cache_diagnose. Neither loses its subject |
3749 | | -# entirely: the mirror's state is partly recoverable from the request counts and |
3750 | | -# response durations the mirror capture records against its own log, and from |
3751 | | -# the kube-system snapshot the host report takes. The image cache's re-probe has |
3752 | | -# no substitute, and it is the collector this budget gives up first. |
| 3743 | +# talos_image_cache_diagnose. Its re-probe has no substitute, so it is the |
| 3744 | +# collector this budget gives up first. |
3753 | 3745 | # |
3754 | 3746 | # Only part of what runs ahead of the console is held mechanically, and the |
3755 | 3747 | # boundary is worth naming rather than leaving a reader to trust the whole of |
@@ -3905,7 +3897,7 @@ cozy_diag_phase_start() { |
3905 | 3897 | # an unchecked list sitting beside a checked one, drifting from it at whatever |
3906 | 3898 | # rate collectors are added. |
3907 | 3899 | command -v timeout >/dev/null 2>&1 || \ |
3908 | | - echo "» WARNING: timeout is not on PATH; the bounded reads below run UNBOUNDED, so one that hangs can still take the op and the tenant snapshot with it, and the collectors that call timeout directly (wedge check, serial console, guest Talos) exit 127 and collect nothing; the ones that guard the call with command -v -- the worker CPU throttling, worker network counter, worker block IO counter, sandbox node CPU time, sandbox kernel KVM counters, runner kernel CPU time, sandbox QEMU per-thread CPU time, runner fixed-work canary, worker per-thread CPU time, ghcr-mirror and talos-image-cache captures -- keep collecting instead, unbounded" >&2 |
| 3900 | + echo "» WARNING: timeout is not on PATH; the bounded reads below run UNBOUNDED, so one that hangs can still take the op and the tenant snapshot with it, and the collectors that call timeout directly (wedge check, serial console, guest Talos) exit 127 and collect nothing; the ones that guard the call with command -v -- the worker CPU throttling, worker network counter, worker block IO counter, sandbox node CPU time, sandbox kernel KVM counters, runner kernel CPU time, sandbox QEMU per-thread CPU time, runner fixed-work canary, worker per-thread CPU time and the talos-image-cache capture -- keep collecting instead, unbounded" >&2 |
3909 | 3901 | # Re-checked here, not only at assignment: a value set after this file is sourced |
3910 | 3902 | # -- which is how a test sets it -- would otherwise reach the arithmetic below |
3911 | 3903 | # unvalidated, and that is the one failure that costs the whole block. |
@@ -4473,27 +4465,6 @@ cozy_report_node_join_failure() { |
4473 | 4465 | cozy_capture_tenant_talos "${test_name}" || true |
4474 | 4466 | fi |
4475 | 4467 |
|
4476 | | - # The OS-image cache and the ghcr.io mirror fail independently and produce the |
4477 | | - # same symptom from outside the guest, so both get dumped: this one answers |
4478 | | - # whether the worker's kubelet-image pull reached the mirror or fell back to |
4479 | | - # public ghcr.io, which the node-join failure alone cannot distinguish. Gated |
4480 | | - # like its neighbours, and after the guest captures. Bounded read by read |
4481 | | - # like the collector at (d2), but five of them at COZY_DIAG_READ_TIMEOUT plus |
4482 | | - # grace, so it can spend a quarter of the phase budget -- and time is the |
4483 | | - # only thing the gate rations, so a quarter spent here is a quarter the |
4484 | | - # guest captures do not get. Cost is not what settles the order, though, or |
4485 | | - # (d2) would sit here too: what settles it is whether the answer survives |
4486 | | - # being declined. The console evidence this would starve is irreplaceable |
4487 | | - # and (d2)'s question has no other answer in the tree, while the mirror's |
4488 | | - # state is partly recoverable from the reads above -- so those two go first |
4489 | | - # and this one waits, whichever of them is cheaper. Cheaper than the |
4490 | | - # talos-image-cache re-probe below, which creates a Pod and waits on curl |
4491 | | - # retries, so it goes ahead of it. |
4492 | | - if cozy_diag_phase_has_time 'ghcr-mirror state, access log and warm-up Job'; then |
4493 | | - echo "--- ghcr-mirror state, access log and warm-up Job ---" |
4494 | | - ghcr_mirror_diagnose || true |
4495 | | - fi |
4496 | | - |
4497 | 4468 | # Last, and gated on the phase as well as bounded per read, because it is the |
4498 | 4469 | # collector that most needs both: its reachability re-probe creates a Pod, waits |
4499 | 4470 | # on curl retries, and makes seven unbounded management-cluster calls of its own, |
@@ -4669,11 +4640,9 @@ YAML |
4669 | 4640 | ) |
4670 | 4641 | fi |
4671 | 4642 |
|
4672 | | - # Point worker DataVolume imports at the in-sandbox Talos OS image cache and |
4673 | | - # worker image pulls at the in-sandbox ghcr.io mirror when each is up (falls back |
4674 | | - # to the public defaults otherwise). Emitted right under spec: as |
4675 | | - # `talos: { imageFactoryURL: ..., registryMirrors: {...} }`, or nothing when both |
4676 | | - # defaults apply. |
| 4643 | + # Point worker DataVolume imports at the in-sandbox Talos OS image cache when it |
| 4644 | + # is up (falls back to the public default otherwise). Emitted right under spec: |
| 4645 | + # as `talos: { imageFactoryURL: ... }`, or nothing when the default applies. |
4677 | 4646 | local talos_block |
4678 | 4647 | talos_block=$(talos_spec_block) |
4679 | 4648 |
|
|
0 commit comments