Skip to content

Commit fc9ac48

Browse files
Merge pull request #912 from ClickHouse/limit-log-tail-upload
cloud-init: upload only the last 1 MB of each log
2 parents eb186e7 + cda4e31 commit fc9ac48

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

cloud-init.sh.in

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,14 @@ echo "Total time: $SECONDS" | tee -a log
6868

6969
RESULTS_URL="https://play.clickhouse.com/?user=sink&query=INSERT+INTO+data+FORMAT+RawBLOB"
7070

71-
curl ${RESULTS_URL} --data-binary @log
72-
curl ${RESULTS_URL} --data-binary @/var/log/cloud-init-output.log
71+
# The sink enforces a per-row size cap. Cloud-init logs from systems that
72+
# build from source (e.g. compiling Hyrise/WarehousePG, pulling Spark
73+
# tarballs, apt-installing build-essential) can run to hundreds of MB,
74+
# and pushing the full file fails with a "Too large" reject — losing the
75+
# whole log including the diagnostic tail we actually care about. Send
76+
# only the last 1 MB of each file: that's enough to capture the bench
77+
# output, any tracebacks, and the final readiness/timing lines.
78+
tail -c 1000000 log | curl ${RESULTS_URL} --data-binary @-
79+
tail -c 1000000 /var/log/cloud-init-output.log | curl ${RESULTS_URL} --data-binary @-
7380

7481
shutdown now

0 commit comments

Comments
 (0)