baidu / baidu/bfs

shell script mistakes in sandbox

Open
#897 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.8k
Forks
551
PR merge metrics
No merged PRs in 30d

Description

## I found some minor mistakes of shell scripts in sandbox directory.
1. "$1"x == "master_slave" extra x is missed in master_slave
2. when adopting raft mode, sleep 5 seconds is not enough for the system to run. I encounted bfs_client put error when deploying raft mode by sleep 5-10 seconds.
3. I think it is not good to show process not found when running clear.sh. Killing the process should work without any error message. For the new guy like me to run deploy.sh and get the message ``process not found``, I think there is something wrong with the deploy.sh. However, it works OK.
4. ``cd -`` will print current work directory when using ``start_bfs.sh``. I also think this log is unnecessary. It doesn't give any useful information about the system. But the logs like ``nameserver 0 started ok at port xxx, chunkserver 0 started ok at port xxx`` should be added into the script, to make it more clear.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting the shell scripts in the sandbox directory, especially deploy.sh, clear.sh, and start_bfs.sh, then reproduce the reported deployment and cleanup behavior. Check the master_slave argument, raft startup delay, process-killing output, and cd - logging; done means the scripts run without misleading errors and provide the requested startup status messages.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.