Skip to content

Commit efe3fd8

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 -- which matches the run, where CreateBucket and every metadata read succeeded and only the data path failed. Nothing guards the data daemon, though. 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. Adding the file backend to the deep check would let the product gate itself and make this change unnecessary, but that belongs in Arsenal. 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. Clears CLDSRV-992 row F1 (ten of its twelve failures) and is the leading candidate for rows F2 and F3, whose jobs share this boot path. Issue: CLDSRV-992
1 parent 65cb3c4 commit efe3fd8

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
@@ -532,6 +532,8 @@ jobs:
532532
- name: Run file ft tests
533533
run: |-
534534
set -o pipefail;
535+
# the data daemon binds after 8000 and nothing in startup waits for it
536+
bash wait_for_local_port.bash 9991 120
535537
bash wait_for_local_port.bash 8000 40
536538
yarn run ft_test | tee /tmp/artifacts/${{ matrix.job-name }}/tests.log
537539
- name: Cleanup and upload coverage
@@ -831,6 +833,8 @@ jobs:
831833
- name: Run file KMIP tests
832834
run: |-
833835
set -ex -o pipefail;
836+
# the data daemon binds after 8000 and nothing in startup waits for it
837+
bash wait_for_local_port.bash 9991 120
834838
bash wait_for_local_port.bash 8000 40
835839
bash wait_for_local_port.bash 5696 40
836840
yarn run ft_kmip | tee /tmp/artifacts/${{ github.job }}/tests.log
@@ -909,6 +913,8 @@ jobs:
909913
S3_END_TO_END: true # to use the default credentials profile and not vault profile
910914
run: |-
911915
set -ex -o pipefail;
916+
# the data daemon binds after 8000 and nothing in startup waits for it
917+
bash wait_for_local_port.bash 9991 120
912918
bash wait_for_local_port.bash 8000 40
913919
bash wait_for_local_port.bash 5696 40
914920
yarn run ft_kmip_cluster | tee /tmp/artifacts/${{ github.job }}/tests.log
@@ -1009,6 +1015,8 @@ jobs:
10091015
- name: Wait for services vault and s3
10101016
run: |-
10111017
bash wait_for_local_port.bash 8500 40
1018+
# the data daemon binds after 8000 and nothing in startup waits for it
1019+
bash wait_for_local_port.bash 9991 120
10121020
bash wait_for_local_port.bash 8000 40
10131021
- name: Ensure old version of cloudserver and vault is used
10141022
run: |-
@@ -1053,6 +1061,8 @@ jobs:
10531061
run: |-
10541062
bash wait_for_local_port.bash ${{ matrix.kms.port }} 40
10551063
bash wait_for_local_port.bash 8500 40
1064+
# the data daemon binds after 8000 and nothing in startup waits for it
1065+
bash wait_for_local_port.bash 9991 120
10561066
bash wait_for_local_port.bash 8000 40
10571067
- name: Ensure latest version of cloudserver and vault is used
10581068
run: |-

0 commit comments

Comments
 (0)