Skip to content

Commit bcdb41c

Browse files
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-992
1 parent 5371bb1 commit bcdb41c

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/tests.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,8 @@ jobs:
509509
- name: Run file ft tests
510510
run: |-
511511
set -o pipefail;
512+
# the data daemon binds after 8000 and nothing in startup waits for it
513+
bash wait_for_local_port.bash 9991 120
512514
bash wait_for_local_port.bash 8000 40
513515
yarn run ft_test | tee /tmp/artifacts/${{ matrix.job-name }}/tests.log
514516
- name: Cleanup and upload coverage
@@ -808,6 +810,8 @@ jobs:
808810
- name: Run file KMIP tests
809811
run: |-
810812
set -ex -o pipefail;
813+
# the data daemon binds after 8000 and nothing in startup waits for it
814+
bash wait_for_local_port.bash 9991 120
811815
bash wait_for_local_port.bash 8000 40
812816
bash wait_for_local_port.bash 5696 40
813817
yarn run ft_kmip | tee /tmp/artifacts/${{ github.job }}/tests.log
@@ -883,6 +887,8 @@ jobs:
883887
S3_END_TO_END: true # to use the default credentials profile and not vault profile
884888
run: |-
885889
set -ex -o pipefail;
890+
# the data daemon binds after 8000 and nothing in startup waits for it
891+
bash wait_for_local_port.bash 9991 120
886892
bash wait_for_local_port.bash 8000 40
887893
bash wait_for_local_port.bash 5696 40
888894
yarn run ft_kmip_cluster | tee /tmp/artifacts/${{ github.job }}/tests.log
@@ -983,6 +989,8 @@ jobs:
983989
- name: Wait for services vault and s3
984990
run: |-
985991
bash wait_for_local_port.bash 8500 40
992+
# the data daemon binds after 8000 and nothing in startup waits for it
993+
bash wait_for_local_port.bash 9991 120
986994
bash wait_for_local_port.bash 8000 40
987995
- name: Ensure old version of cloudserver and vault is used
988996
run: |-
@@ -1027,6 +1035,8 @@ jobs:
10271035
run: |-
10281036
bash wait_for_local_port.bash ${{ matrix.kms.port }} 40
10291037
bash wait_for_local_port.bash 8500 40
1038+
# the data daemon binds after 8000 and nothing in startup waits for it
1039+
bash wait_for_local_port.bash 9991 120
10301040
bash wait_for_local_port.bash 8000 40
10311041
- name: Ensure latest version of cloudserver and vault is used
10321042
run: |-

0 commit comments

Comments
 (0)