Skip to content

ci: dump rancher server logs alongside webhook logs on CI failure - #1777

Open
tomleb wants to merge 5 commits into
rancher:mainfrom
tomleb:fix-ci-log-dump
Open

ci: dump rancher server logs alongside webhook logs on CI failure#1777
tomleb wants to merge 5 commits into
rancher:mainfrom
tomleb:fix-ci-log-dump

Conversation

@tomleb

@tomleb tomleb commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

The CI failure-log dump step only captured rancher-webhook's own logs and its admission webhook configurations. When webhook never even gets deployed (e.g. rancher itself fails to start, or the systemcharts controller never installs the chart), that leaves nothing to diagnose the actual root cause.

This expands the failure-log dump to also capture:

  • Cluster-wide pod status (kubectl get pods -A -o wide)
  • Events in cattle-system (sorted by time)
  • Helm releases in cattle-system
  • apps.catalog.cattle.io status (shows systemcharts install/deploy state)
  • rancher pod describe + logs (current and --previous, in case it crashed/restarted)
  • Logs from any transient helm-operation-* job pods (the systemcharts chart-install jobs)
  • rancher-webhook pod describe + --previous logs
  • webhook configurations (unchanged from before)

Each section is wrapped in a ::group::/::endgroup:: for readability in the Actions log viewer.

Test Plan

  • Validated the workflow YAML parses correctly.
  • This only touches the if: failure() log-dump step; it doesn't change any other CI behavior. Will be exercised for real the next time CI fails, which given the current failing state of CI it should be very soon.

The current failure-log dump only captures rancher-webhook's own logs
and its webhook configurations. When webhook never gets deployed at
all (e.g. rancher itself fails to come up, or the systemcharts
controller never installs the chart), that gives us nothing to work
with.

Expand the log dump to also cover: cluster-wide pod status, events in
cattle-system, helm releases, apps.catalog.cattle.io status, the
rancher pod's describe+logs (current and previous), the transient
helm-operation install-job pods' logs, and rancher-webhook's describe
+ previous-container logs.

Signed-off-by: Tom Lebreux <tom.lebreux@suse.com>
@tomleb
tomleb requested a review from a team as a code owner August 14, 2026 16:48
tomleb added 4 commits August 14, 2026 17:31
Adds a probe-assets-image-regression job (matrix of 2, not gating the
PR) that stands up cert-manager + rancher alone (no webhook image
imported) from two pinned rancher/rancher commits in parallel:

- 3d7396a2b7 (immediate parent of PR #56253, the assets-image init
  container change)
- 5f868f27e4 (PR #56253 itself, 'Implement Rancher assets image')

This directly tests whether #56253 alone is sufficient to reproduce
the startup-probe/git-index-lock failure that's been blocking webhook
CI, or whether a later change (e.g. #56261, 'fix: checking out bundled
charts') is also required to trigger it.

Signed-off-by: Tom Lebreux <tom.lebreux@suse.com>
Repo was added as 'cert-manager' name pointing at jetstack's URL in the
original CI script this was adapted from, but I renamed it to
'jetstack' when adapting it for the probe job while leaving the
'cert-manager/cert-manager' chart reference unchanged, so the install
failed immediately with 'Error: repo cert-manager not found' before
rancher was ever touched -- both probe legs failed identically for
this reason, not because of the regression under test.

Signed-off-by: Tom Lebreux <tom.lebreux@suse.com>
Round 1 (parent commit vs #56253 alone) showed #56253 is not
sufficient by itself to fail the startupProbe in isolation, though it
more than doubles rancher's startup time (2m52s -> 6m36s). Round 2
adds:

- 1b96837a0a (#56261, 'fix: checking out bundled charts') in isolation,
  to see whether the added git reset --hard on bundled catalogs is
  what actually enables the restart-triggered index.lock corruption.
- f74f4fdb55 (Aug 13, includes both #56253 and #56261 plus later
  changes) as a closer proxy for what current main's real CI job is
  running against.

Signed-off-by: Tom Lebreux <tom.lebreux@suse.com>
5d1a1a2f12 (Aug 14, 'Remove annotation logic from GR and GRBs') is an
ancestor of cf457b053f -- the exact commit the real webhook CI job's
rancher/rancher checkout built from in the failing run -- and includes
both #56253 and #56261. This gets the probe as close as practical to
what the real CI job's rancher instance is actually running, short of
pinning to the literal cf457b053f commit itself.

Signed-off-by: Tom Lebreux <tom.lebreux@suse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant