Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: retry starting zookeeper if it failed on onebox environment #453

Merged
merged 2 commits into from
Jan 3, 2020

Conversation

neverchanje
Copy link
Contributor

@neverchanje neverchanje commented Jan 3, 2020

What problem does this PR solve?

run.sh test doesn't check for availability of zookeeper when it fails to start, it will continue and fail eventually when some unit tests (function_test) detect that the onebox is not started.

~/build/XiaoMi/pegasus/src/builder/bin/pegasus_function_test ~/build/XiaoMi/pegasus
============
start global_env()
meta1 pid: 0
pegasus_function_test: /home/travis/build/XiaoMi/pegasus/src/test/function_test/global_env.cpp:39: void global_env::get_dirs(): Assertion `dsn::utils::pipe_execute(cmd2, ss2) == 0' failed.
./run.sh: line 35: 18247 Aborted                 (core dumped) GTEST_OUTPUT="xml:$REPORT_DIR/basic.xml" GTEST_FILTER="basic.*" ./$test_case $config_file $table_name
Decompressing zookeeper...
JMX enabled by default
Using config: /home/travis/build/XiaoMi/pegasus/.zk_install/zookeeper-3.4.6/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
ERROR: start zookeeper failed

Actually the zookeeper may not be failed at first, it just needs a little bit longer to wait until fully bootstrapped.

What is changed and how it works?

In this PR we check if zookeeper is started failed, if true, the script fails fast. If the onebox fails, the script fails fast. We wait 30 seconds for the bootstrap of zookeeper, long enough on any conditions.

Check List

Tests

  • Manual test

Related changes

  • Need to cherry-pick to the release branch

@hycdong hycdong merged commit 65d86cd into apache:master Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants