未验证 提交 d0839b23 编写于 作者: J Jialun 提交者: GitHub

Fix gpexpand flaky case (#7232)

As a kill may be not taken effect at "the database is killed on hosts "
immediately, so we double check the cluster and stop database if it is
still running. But if kill takes effect after checking, stop_database
will raise an exception for gpstop will fail to stop an unstarted cluster.
To fix this flaky case, we stop database first and check the database
status later. It will raise an exception only when gpstop failed and
the cluster is still running.
上级 eb064718
......@@ -181,8 +181,13 @@ def start_database(context):
def stop_database_if_started(context):
if check_database_is_running(context):
try:
stop_database(context)
except Exception, err:
if check_database_is_running(context):
raise Exception(err)
else:
context.exception = None
def stop_database(context):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册