DaanHoogland commented on code in PR #12355:
URL: https://github.com/apache/cloudstack/pull/12355#discussion_r2660534455


##########
setup/bindir/cloud-sysvmadm.in:
##########
@@ -184,59 +184,38 @@ stop_start_system() {
 stop_start_router() {
     prepare_ids_clause
     router=(`mysql -h $db --user=$user --password=$password 
--skip-column-names -U cloud -e "select uuid from vm_instance where 
state=\"Running\" and type=\"DomainRouter\"$zone$vmidsclause"`)
-    length_router=(${#router[@]})
+    length_router=${#router[@]}
 
     echo -e "\nStopping and starting $length_router running routing 
vm(s)$inzone$withids... "
     echo -e "[$(date "+%Y.%m.%d-%H.%M.%S")] Stopping and starting 
$length_router running routing vm(s)$inzone$withids... " >>$LOGFILE
 
     #Spawn reboot router in parallel - run commands in <n> chunks - number of 
threads is configurable
 
+    if [ $maxthreads -gt $length_router ]; then
+        maxthreads=$length_router
+    fi

Review Comment:
   @abh1sar , I realise this is not new code in this script, but it just cought 
my attention; we are adjusting the number of running updates even though the 
user explicitely asked for a maximum. Can we somehow adjust the logic to adhere 
to the user’s wishes?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to