CLDSRV-992: Wait for the file data daemon before the S3 API - #6277
Conversation
Hello anurag4dsb,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
@@ Coverage Diff @@
## development/9.3 #6277 +/- ##
===================================================
+ Coverage 85.28% 85.32% +0.03%
===================================================
Files 206 206
Lines 13435 13435
===================================================
+ Hits 11458 11463 +5
+ Misses 1977 1972 -5
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
c853cdb to
7d31356
Compare
9572552 to
cec915a
Compare
cec915a to
b8e6df3
Compare
a4c6f76 to
5036d12
Compare
b8e6df3 to
365405b
Compare
5036d12 to
65cb3c4
Compare
365405b to
86af73d
Compare
efe3fd8 to
11b1f52
Compare
278feb5 to
c79db25
Compare
11b1f52 to
d979972
Compare
c79db25 to
d000474
Compare
`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.
Context on why cloudserver does not catch this itself. metadata.setup() opens
the metadata client and throws if 9990 is unreachable, so the API cannot bind
without working metadata, which matches the run: CreateBucket and every metadata
read succeeded and only the data path failed. Nothing guards the data daemon,
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. 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
d979972 to
7904b09
Compare
`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
`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
`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
Request integration branchesWaiting for integration branch creation to be requested by the user. To request integration branches, please comment on this pull request with the following command: Alternatively, the |
|
/create_integration_branches |
|
/approve |
Integration data createdI have created the integration data for the additional destination branches.
The following branches will NOT be impacted:
You can set option The following options are set: create_integration_branches |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
The following options are set: create_integration_branches |
|
/approve |
In the queueThe changeset has received all authorizations and has been added to the The changeset will be merged in:
The following branches will NOT be impacted:
This pull request does not target the following hotfix branch(es) so they
There is no action required on your side. You will be notified here once IMPORTANT Please do not attempt to modify this pull request.
If you need this pull request to be removed from the queue, please contact a The following options are set: approve, create_integration_branches |
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue CLDSRV-992. Goodbye anurag4dsb. |
yarn startlaunches the S3 API and the file daemons as separate parallel processes, so they race. On various CI runs, the API bound:8000at t+10s and served writes from t+15s while the dataserver only bound:9991at t+84s, and the ten HTTP 500s in between are allECONNREFUSED 0.0.0.0:9991; the same subdir pre-creation step took 2.7s on a healthy runner, which is why it is intermittent.Context on why cloudserver does not catch this itself:
metadata.setup()opens the metadata client and throws if9990is 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, becauseclientCheckreturns a hardcoded{ code: 200, message: 'OK' }for clients that implement no probe andDataFileInterfaceimplements none. So the deep healthcheck only really checks metadata, and only for the mongo and bucketd clients. We could add the file backend to the deep check and let the product gate itself, which would make this change unnecessary, but that is an Arsenal change.So the four jobs on the file data backend now wait on :9991 before :8000, including the second startup phase of sse-kms-migration-tests where a fresh cloudserver container is started. 120s because 84s was observed; a healthy run pays nothing since the wait returns as soon as the port answers.