-
Notifications
You must be signed in to change notification settings - Fork 286
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
dm: fix integration test in rocky8.9 #11751
Open
River2000i
wants to merge
29
commits into
pingcap:master
Choose a base branch
from
River2000i:fix-openssl-ci-test
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+37
−6
Open
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
f0ec446
add log
River2000i 204b8c1
add dependency for validate IP addresses with SANs
River2000i 81dfe81
retry when curl command get not zero
River2000i 6c45472
add log
River2000i 69b422c
add log
River2000i d40822f
debug
River2000i 3f27bce
Fix TLS generation script to use RSA keys instead of EC keys
River2000i 768db29
revet debug
River2000i 6d18136
fix
River2000i df4ec61
revert
River2000i 3966225
Revert "Fix TLS generation script to use RSA keys instead of EC keys"
River2000i 8f360ed
fix
River2000i edec99b
check curl get 200
River2000i 24a3b14
fmt
River2000i aae5267
use env_var set mysql cli password
River2000i 060bdf4
debug
River2000i 2b5be5e
debug
River2000i 907d518
debug
River2000i 8f0cfe0
debug
River2000i 30e3bfe
debug
River2000i 19b2ade
fix
River2000i e5ac23e
fix
River2000i efcb1f1
fmt
River2000i 59e6309
add log
River2000i 2ed926b
fix
River2000i ef7b1cb
debug
River2000i ce65c18
Merge remote-tracking branch 'upstream/master' into fix-openssl-ci-test
River2000i 3efe23f
ignore check running dump task in running stage
River2000i 1c60df9
fix
River2000i File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/bin/bash | ||
# tools to run a TiDB cluster | ||
# parameter 1: work directory | ||
set -eu | ||
set -ux | ||
WORK_DIR=$1 | ||
|
||
export PD_PEER_ADDR="127.0.0.1:2380" | ||
|
@@ -32,55 +32,78 @@ EOF | |
--log-file "$WORK_DIR/pd.log" \ | ||
--config "$WORK_DIR/pd.toml" \ | ||
--data-dir "$WORK_DIR/pd" & | ||
sleep 10 | ||
# wait until PD is online... | ||
echo "after start PD...." | ||
i=0 | ||
while ! curl "http://$PD_ADDR/pd/api/v1/version"; do | ||
while true; do | ||
response=$(curl -s -o /dev/null -w "%{http_code}" "http://$PD_ADDR/pd/api/v1/version") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
echo "curl response: $response" | ||
if [ "$response" -eq 200 ]; then | ||
echo 'Start PD success' | ||
break | ||
fi | ||
i=$((i + 1)) | ||
if [ "$i" -gt 20 ]; then | ||
echo 'Failed to start PD' | ||
return 1 | ||
fi | ||
echo 'Waiting for PD ready...' | ||
sleep 3 | ||
done | ||
} | ||
|
||
start_tikv() { | ||
echo "Starting TiKV..." | ||
mkdir -p "$WORK_DIR/tikv" | ||
bin/tikv-server --version | ||
bin/tikv-server \ | ||
--pd "$PD_ADDR" \ | ||
-A "$TIKV_ADDR" \ | ||
--status-addr "$TIKV_STATUS_ADDR" \ | ||
--log-file "$WORK_DIR/tikv.log" \ | ||
--log-level info \ | ||
-s "$WORK_DIR/tikv" & | ||
sleep 10 | ||
# wait until TiKV is online... | ||
i=0 | ||
while ! curl "http://$PD_ADDR/pd/api/v1/cluster/status" | tee /dev/stderr | grep '"is_initialized": true'; do | ||
i=$((i + 1)) | ||
if [ "$i" -gt 20 ]; then | ||
echo 'Failed to initialize TiKV cluster' | ||
return 1 | ||
fi | ||
echo 'Waiting for TiKV ready...' | ||
sleep 5 | ||
done | ||
} | ||
|
||
start_tidb() { | ||
echo "Starting TiDB..." | ||
bin/tidb-server --version | ||
bin/tidb-server \ | ||
-P 4000 \ | ||
--status 10080 \ | ||
--advertise-address="127.0.0.1" \ | ||
--store tikv \ | ||
--path "$PD_ADDR" \ | ||
--log-file "$WORK_DIR/tidb.log" & | ||
|
||
sleep 10 | ||
# wait until TiDB is online... | ||
i=0 | ||
while ! curl "http://$TIDB_IP:10080/status"; do | ||
while true; do | ||
response=$(curl -s -o /dev/null -w "%{http_code}" "http://$TIDB_IP:10080/status") | ||
echo "curl response: $response" | ||
if [ "$response" -eq 200 ]; then | ||
echo 'Start TiDB success' | ||
break | ||
fi | ||
i=$((i + 1)) | ||
if [ "$i" -gt 50 ]; then | ||
echo 'Failed to start TiDB' | ||
return 1 | ||
fi | ||
echo 'Waiting for TiDB ready...' | ||
sleep 3 | ||
done | ||
} | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
requests | ||
ipaddress |
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skip check error for start tikv fail for unknow reason like below, but tikv log didn't show any error.
Also all command have checked error.