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

chore(script): Script migrate_node.sh supports using specified config file when using shell config #1370

Merged
merged 4 commits into from
Mar 14, 2023

Conversation

WHBANG
Copy link
Contributor

@WHBANG WHBANG commented Feb 27, 2023

What problem does this PR solve?

#1368

  • Manual test
    image

run.sh Outdated
@@ -1660,6 +1663,11 @@ function run_migrate_node()
CLUSTER="$2"
shift
;;
-p|--config)
CONFIG="$2"
CONFIG_SPECIFIED=1
Copy link
Member

Choose a reason for hiding this comment

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

CONFIG_SPECIFIED can be removed, just judge whether CONFIG is empty or not?

run.sh Outdated Show resolved Hide resolved
run.sh Outdated Show resolved Hide resolved
scripts/migrate_node.sh Outdated Show resolved Hide resolved
@empiredan
Copy link
Contributor

If it's necessary to be compatible with the previous format of arguments for migrate_node.sh, we could add an option -t for migrate_node.sh:

  • migrate_node.sh -t config <arguments ...> means the first argument is config, or
  • migrate_node.sh -t cluster <arguments ...> or just migrate_node.sh <arguments ...> (-t is omitted) means the first argument is cluster.

@WHBANG WHBANG force-pushed the migrate_node_tool branch from 0b0ac9d to 73a8aef Compare March 10, 2023 09:04
if [ $# -eq 4 ]; then
cluster=$1
else
CONFIG_SPECIFIED=1
Copy link
Contributor

Choose a reason for hiding this comment

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

If it is necessary to check whether option is -f ?

empiredan
empiredan previously approved these changes Mar 13, 2023
scripts/migrate_node.sh Outdated Show resolved Hide resolved
@empiredan empiredan merged commit c27590b into apache:master Mar 14, 2023
@empiredan empiredan mentioned this pull request Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants