You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pegasus.apache.org by yu...@apache.org on 2021/12/09 10:30:46 UTC

[incubator-pegasus] branch master updated: feat(scripts): update rolling_update and rebalance scripts (#852)

This is an automated email from the ASF dual-hosted git repository.

yuchenhe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git


The following commit(s) were added to refs/heads/master by this push:
     new e3685ed  feat(scripts): update rolling_update and rebalance scripts (#852)
e3685ed is described below

commit e3685ed0b7198983db45cddae7a611969495bac7
Author: happydongyaoyao <39...@users.noreply.github.com>
AuthorDate: Thu Dec 9 18:30:37 2021 +0800

    feat(scripts): update rolling_update and rebalance scripts (#852)
---
 scripts/pegasus_rebalance_cluster.sh | 2 +-
 scripts/pegasus_rolling_update.sh    | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/pegasus_rebalance_cluster.sh b/scripts/pegasus_rebalance_cluster.sh
index 3782bf4..084c4d3 100755
--- a/scripts/pegasus_rebalance_cluster.sh
+++ b/scripts/pegasus_rebalance_cluster.sh
@@ -115,7 +115,7 @@ echo "Wait for 3 minutes to do load balance..."
 sleep 180
 ## Number of check times for balanced state, in case that op_count is 0 but
 ## the cluster is in fact unbalanced. Each check waits for 30 secs.
-op_count_check_remain_times=1
+op_count_check_remain_times=3
 while true; do
     op_count=$(echo "cluster_info" | ./run.sh shell --cluster $meta_list | grep balance_operation_count | grep -o 'total=[0-9][0-9]*' | cut -d= -f2)
     if [ -z $op_count ]; then
diff --git a/scripts/pegasus_rolling_update.sh b/scripts/pegasus_rolling_update.sh
index b4e1e9b..463e3c6 100755
--- a/scripts/pegasus_rolling_update.sh
+++ b/scripts/pegasus_rolling_update.sh
@@ -124,7 +124,7 @@ if [ $set_ok -ne 1 ]; then
 fi
 
 echo "Set lb.assign_delay_ms to 30min..."
-echo "remote_command -l $pmeta meta.lb.assign_delay_ms 1800000" | ./run.sh shell --cluster $meta_list &>/tmp/$UID.$PID.pegasus.rolling_node.assign_delay_ms
+echo "remote_command -l $pmeta meta.lb.assign_delay_ms 180000000" | ./run.sh shell --cluster $meta_list &>/tmp/$UID.$PID.pegasus.rolling_node.assign_delay_ms
 set_ok=`grep OK /tmp/$UID.$PID.pegasus.rolling_node.assign_delay_ms | wc -l`
 if [ $set_ok -ne 1 ]; then
   echo "ERROR: set lb.assign_delay_ms to 30min failed"
@@ -190,7 +190,7 @@ do
   sleeped=0
   while true
   do
-    if [ $((sleeped%10)) -eq 0 ]; then
+    if [ $((sleeped%50)) -eq 0 ]; then
       ./run.sh downgrade_node -c $meta_list -n $node -t run &>/tmp/$UID.$PID.pegasus.rolling_update.downgrade_node
       echo "Send downgrade propose, refer to /tmp/$UID.$PID.pegasus.rolling_update.downgrade_node for details"
     fi
@@ -214,7 +214,7 @@ do
   sleeped=0
   while true
   do
-    if [ $((sleeped%10)) -eq 0 ]; then
+    if [ $((sleeped%50)) -eq 0 ]; then
       echo "Send kill_partition commands to node..."
       grep '^propose ' /tmp/$UID.$PID.pegasus.rolling_update.downgrade_node >/tmp/$UID.$PID.pegasus.rolling_update.downgrade_node.propose
       while read line2

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pegasus.apache.org
For additional commands, e-mail: commits-help@pegasus.apache.org