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

[CELEBORN-1492] Introduce Celeborn Chaos Testing Framework #3091

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

SteNicholas
Copy link
Member

What changes were proposed in this pull request?

Introduce Celeborn Chaos Testing Framework.

Why are the changes needed?

A chaos testing framework is designed to simulate unpredictable and adverse conditions in distributed systems to validate their robustness and resilience. CIP-10 Introduce Celeborn Chaos Testing Framework aims to simulate various anomalies and test the stability of Celeborn in distributed environments via chaos testing.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

GA.

Copy link
Contributor

@zaynt4606 zaynt4606 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And we need to change celeborn-class and make-distribution files for Compiling and packaging.
And for using this framework we need to add some shell files in sbin.

I added a few changes to your local branch, plz help review~
pr

@SteNicholas
Copy link
Member Author

Ping @zaynt4606.

@zaynt4606
Copy link
Contributor

Ping @zaynt4606.

look at here
code for your local branch

@SteNicholas
Copy link
Member Author

@zaynt4606, PTAL.

Copy link
Contributor

@zaynt4606 zaynt4606 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
There is a nit that when cli thread finished the log is always "failed to launch..." in execute_command() of celeborn-daemon.sh.
The execute_command() can be

execute_command() {
if [ -z ${CELEBORN_NO_DAEMONIZE+set} ]; then
exec nohup -- "$@" >> "$log" 2>&1 < /dev/null &
newpid="$!"
echo "$newpid" > "$pid"
# Poll for up to 5 seconds for the java process to start
for i in {1..10}; do
if [[ $(ps -p "$newpid" -o comm=) =~ "java" ]] || [[ $(ps -p "$newpid" -o comm=) =~ "jboot" ]]; then
break
fi
sleep 0.5
done
sleep 2
# Check if the process has died; in that case we'll tail the log so the user can see
if ! ps -p "$newpid" > /dev/null; then
# Process is no longer running, check its exit status
wait "$newpid"
exit_code=$?
if [[ $exit_code -ne 0 ]]; then
echo "failed to launch: $@"
tail -10 "$log" | sed 's/^/ /'
echo "full log in $log"
else
echo "process completed successfully with exit code 0"
fi
else
# Process is still running, assume it started successfully
if [[ ! $(ps -p "$newpid" -o comm=) =~ "java" ]] && [[ ! $(ps -p "$newpid" -o comm=) =~ "jboot" ]]; then
echo "failed to launch: $@"
tail -10 "$log" | sed 's/^/ /'
echo "full log in $log"
fi
fi
else
exec "$@"
fi
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants