Skip to content

cloud-init: upload only the last 1 MB of each log#912

Merged
alexey-milovidov merged 1 commit into
mainfrom
limit-log-tail-upload
May 16, 2026
Merged

cloud-init: upload only the last 1 MB of each log#912
alexey-milovidov merged 1 commit into
mainfrom
limit-log-tail-upload

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

Summary

  • Replace curl ... --data-binary @log / ... @/var/log/cloud-init-output.log with tail -c 1000000 | curl --data-binary @- so we send at most 1 MB per file.
  • Systems that build from source (Hyrise, WarehousePG, Spark variants) or that apt-install build-essential produce cloud-init logs of hundreds of MB. The sink enforces a per-row size cap; the unfiltered push failed, and we lost the entire log — including the diagnostic tail we actually use for triage.
  • 1 MB tail is enough to capture the bench output, any tracebacks, and the final readiness / timing lines.

Test plan

  • Trigger a benchmark on any system whose cloud-init log is known to be small (e.g. clickhouse) and confirm the row lands in sink.data and contains the expected tail.
  • Trigger a benchmark on a system known to produce a multi-100MB cloud-init log (e.g. warehousepg, which compiles from source) and confirm:
    • both rows are inserted (per-run log + cloud-init tail),
    • the cloud-init row is ≤ 1 MB,
    • the bottom of the cloud-init row contains the gpinitsystem completion / failure lines.

🤖 Generated with Claude Code

The sink enforces a per-row size cap. Cloud-init logs from systems
that build from source (Hyrise, WarehousePG, Spark variants) or
apt-install build-essential routinely run to hundreds of MB, and the
unfiltered \`curl --data-binary @file\` push then fails with a size
reject — losing the entire log including the diagnostic tail we
actually rely on for triage. Pipe \`tail -c 1000000\` into curl for
both files: enough to capture the bench output, any tracebacks, and
the final readiness/timing lines, without ever blowing the cap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@alexey-milovidov alexey-milovidov self-assigned this May 16, 2026
@alexey-milovidov alexey-milovidov merged commit fc9ac48 into main May 16, 2026
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