-
Notifications
You must be signed in to change notification settings - Fork 8.3k
clickhouse-server docker initdb script sourcing ignores errors #10183
Copy link
Copy link
Closed
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasedocker
Description
Investigating some flaky builds we found that the initdb script doesn't check errors or issue retries for failed migrations:
ClickHouse/docker/server/entrypoint.sh
Lines 84 to 100 in 0ecfede
| for f in /docker-entrypoint-initdb.d/*; do | |
| case "$f" in | |
| *.sh) | |
| if [ -x "$f" ]; then | |
| echo "$0: running $f" | |
| "$f" | |
| else | |
| echo "$0: sourcing $f" | |
| . "$f" | |
| fi | |
| ;; | |
| *.sql) echo "$0: running $f"; cat "$f" | "${clickhouseclient[@]}" ; echo ;; | |
| *.sql.gz) echo "$0: running $f"; gunzip -c "$f" | "${clickhouseclient[@]}"; echo ;; | |
| *) echo "$0: ignoring $f" ;; | |
| esac | |
| echo | |
| done |
Occasionally on our CI, the clickhouse client connection to zookeeper unexpectedly closes, which in turn causes the initial migration script to fail silently.
Zookeeper issues aside, I believe that the script should at least be checking that the migrations applied successfully (return code from clickhouse-client is 0).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasedocker