Skip to content

Conversation

@UJESH2K
Copy link
Contributor

@UJESH2K UJESH2K commented Oct 23, 2025

Fixes: #5208

What happened

K6 experiments in LitmusChaos store their actual logs in a helper pod (*-helper).
Previously, ChaosCenter only fetched logs from the main or runner pod, so users would see
"Failed to get argo pod logs" even though the helper pod had logs.

What this PR does

  • Updates CreatePodLog in subscriber/pkg/k8s/log.go to check the helper pod if main container logs are missing.
  • Preserves existing functionality for normal pods and other experiment pods.
  • Ensures K6 load test results are correctly returned in ChaosCenter UI.
  • Fallback mechanism added: if main logs are unavailable, helper pod logs are retrieved automatically.

Note

  • Frontend may still not unwrap nested JSON correctly, so logs might not display properly in the UI until a separate frontend fix is applied.
  • This PR only fixes backend log retrieval for K6 experiments.

How to test

  1. Deploy ChaosCenter with this backend update to a Kubernetes cluster.
  2. Run a K6 load test experiment workflow.
  3. Check that the logs in ChaosCenter now include the helper pod output along with main/runner pod logs.

@UJESH2K UJESH2K force-pushed the fix/k6-helper-pod-logs branch 2 times, most recently from 0130386 to a00d839 Compare October 23, 2025 16:38
UJESH2K and others added 3 commits October 23, 2025 20:22
- CreatePodLog updated to fetch logs from helper pods if main container logs are missing
- Ensures K6 load test results are correctly returned in ChaosCenter UI
- Logs fallback to helper container if main container fails

Signed-off-by: UJESH2K <ujeshyadav20k5@gmail.com>
Signed-off-by: UJESH KUMAR YADAV <154934631+UJESH2K@users.noreply.github.com>
Signed-off-by: UJESH KUMAR YADAV <154934631+UJESH2K@users.noreply.github.com>
Signed-off-by: UJESH KUMAR YADAV <154934631+UJESH2K@users.noreply.github.com>
@UJESH2K UJESH2K force-pushed the fix/k6-helper-pod-logs branch from bc19c5e to 801793f Compare October 23, 2025 20:22
Signed-off-by: UJESH KUMAR YADAV <154934631+UJESH2K@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Hacktoberfest hacktoberfest-accepted Accepted for HacktoberFest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issues With Logging When Running K6 Load Test on Litmus

2 participants