[fix](docker) Propagate BE registration failures - #66927
Open
Al-assad wants to merge 1 commit into
Open
Conversation
### What problem does this PR solve?
Issue Number: N/A
Related PR: N/A
Problem Summary: The Kubernetes BE entrypoint scripts stored the literal string false in REGISTERED and tested it as a shell condition. Because any non-empty string is true in Bash, a failed FE registration was treated as successful and the BE process could start without being registered. Use the registration function exit status directly, try each configured FE address, and terminate the container before starting BE when every registration attempt fails.
### Release note
Fix Kubernetes BE containers to restart instead of starting unregistered when FE registration fails.
### Check List (For Author)
- Test: Manual test
- bash -n for both BE entrypoint scripts
- Mocked success, failover, and all-addresses-failed return paths
- build-support/shell-check.sh
- Behavior changed: Yes. BE containers now exit when all FE registration attempts fail.
- Does this need documentation: No
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Member
Author
|
/review |
16 tasks
Contributor
|
Codex automated review failed and did not complete. Error: All Codex review accounts are usage-limited; earliest retry is 2026-08-20T03:35:00Z. Please trigger /review again after that time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: N/A
Related PR: N/A
Problem Summary:
The Kubernetes BE entrypoint scripts initialized
REGISTEREDto the literal stringfalseand 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_startdirectly. Each configured FE address is tried in order. If all registration attempts fail, the entrypoint exits beforestart_be.sh, allowing Kubernetes to restart the container and retry after FE becomes available.Supersedes #66922, which GitHub automatically closed after its cross-fork head branch was renamed.
Release note
Fix Kubernetes BE containers to restart instead of starting unregistered when FE registration fails.
Check List (For Author)
Test
bash -n docker/runtime/be/resource/be_entrypoint.shbash -n docker/runtime/be/resource/be_disaggregated_entrypoint.shbuild-support/shell-check.shBehavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)