Al-assad opened a new pull request, #66922:
URL: https://github.com/apache/doris/pull/66922
### What problem does this PR solve?
Issue Number: N/A
Related PR: N/A
Problem Summary:
The Kubernetes BE entrypoint scripts initialized `REGISTERED` to the literal
string `false` and later evaluated it with `[[ $REGISTERED ]]`. In Bash, every
non-empty string is true, so an FE registration failure could be treated as
success and the script would continue to start BE without registering it with
FE.
This PR removes the unused string flag and uses the exit status from
`add_self` / `first_deploy_start` directly. Each configured FE address is tried
in order. If all registration attempts fail, the entrypoint exits before
`start_be.sh`, allowing Kubernetes to restart the container and retry after FE
becomes available.
### Release note
Fix Kubernetes BE containers to restart instead of starting unregistered
when FE registration fails.
### Check List (For Author)
- Test
- [ ] Regression test
- [ ] Unit Test
- [x] Manual test (add detailed scripts or steps below)
- `bash -n docker/runtime/be/resource/be_entrypoint.sh`
- `bash -n docker/runtime/be/resource/be_disaggregated_entrypoint.sh`
- `build-support/shell-check.sh`
- Mocked registration success, first-address failover, and
all-addresses-failed return paths for both scripts
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason
- Behavior changed:
- [ ] No.
- [x] Yes. BE containers now exit when all FE registration attempts fail
instead of starting unregistered.
- Does this need documentation?
- [x] No.
- [ ] Yes.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]