Commit bcdb41c
committed
CLDSRV-992: Wait for the file data daemon before the S3 API
`yarn start` launches the S3 API and the file daemons as separate parallel
processes (npm-run-all --parallel start_dmd start_s3server), so they race. On
run 33734792029 the API bound :8000 at t+10s and served writes from t+15s while
the dataserver only bound :9991 at t+84s, and the ten HTTP 500s in between are
all ECONNREFUSED 0.0.0.0:9991. The same subdir pre-creation step took 2.7s on a
healthy runner, which is why this is intermittent.
Cloudserver's own startup partly guards this already: metadata.setup() opens the
metadata client and throws if 9990 is unreachable, so the API cannot bind
without working metadata. This branch's Arsenal pin was checked and behaves the
same way, so only the data daemon needs a gate. Nothing guards that, because
clientCheck returns a hardcoded { code: 200, message: 'OK' } for clients that
implement no probe and DataFileInterface implements none, so the deep
healthcheck only really checks metadata and only for the mongo and bucketd
clients.
Gate on 9991 in the four jobs that use the file data backend: file-ft-tests,
kmip-ft-tests, kmip-cluster-ft-tests and sse-kms-migration-tests, the last of
which starts a fresh cloudserver container in a second phase and needs the gate
there too. 120s because 84s was observed; a healthy run pays nothing since the
wait returns as soon as the port answers.
Backport of #6277
Issue: CLDSRV-9921 parent 5371bb1 commit bcdb41c
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
| 512 | + | |
| 513 | + | |
512 | 514 | | |
513 | 515 | | |
514 | 516 | | |
| |||
808 | 810 | | |
809 | 811 | | |
810 | 812 | | |
| 813 | + | |
| 814 | + | |
811 | 815 | | |
812 | 816 | | |
813 | 817 | | |
| |||
883 | 887 | | |
884 | 888 | | |
885 | 889 | | |
| 890 | + | |
| 891 | + | |
886 | 892 | | |
887 | 893 | | |
888 | 894 | | |
| |||
983 | 989 | | |
984 | 990 | | |
985 | 991 | | |
| 992 | + | |
| 993 | + | |
986 | 994 | | |
987 | 995 | | |
988 | 996 | | |
| |||
1027 | 1035 | | |
1028 | 1036 | | |
1029 | 1037 | | |
| 1038 | + | |
| 1039 | + | |
1030 | 1040 | | |
1031 | 1041 | | |
1032 | 1042 | | |
| |||
0 commit comments