ctubbsii commented on code in PR #5730:
URL: https://github.com/apache/accumulo/pull/5730#discussion_r2198800113
##########
assemble/bin/accumulo-cluster:
##########
@@ -659,6 +661,19 @@ function control_services() {
fi
fi
+ ssh_wait
+
+}
+
+function ssh_wait() {
+ #shellcheck disable=SC2009
+ count=$(ps -ef | grep ssh | grep -c "accumulo-service")
+ while ((count > 0)); do
+ echo "waiting on $count ssh commands to complete"
+ sleep 2
+ #shellcheck disable=SC2009
+ count=$(ps -ef | grep ssh | grep -c "accumulo-service")
+ done
Review Comment:
This isn't a very good grep pattern. It would not only block on other
executions of this script by other users on the same system, but also on
processes like `vim ~/ssh-accumulo-service.txt`.
--
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]