ddanielr commented on code in PR #5094:
URL: https://github.com/apache/accumulo/pull/5094#discussion_r1854285874


##########
assemble/bin/accumulo-cluster:
##########
@@ -573,49 +573,32 @@ function stop_all() {
 }
 
 function stop_here() {
-  # Determine hostname without errors to user
-  hosts_to_check=("$(hostname -a 2>/dev/null | head -1)" "$(hostname -f)")
-
   if echo "${TSERVER_HOSTS}" | grep -Eq 'localhost|127[.]0[.]0[.]1'; then

Review Comment:
   In addition to "local_hosts", the logic in `control_service` attempts to do 
another validation to figure out if it should talk locally or create an SSH 
connection.
   ```
   if [[ $host == localhost || $host == "$(hostname -s)" || $host == 
"$(hostname -f)" || "$(hostname -I)" =~ $host ]]; then
    // do local connection
    else 
    // SSH to host
    ```
   Having two different host validation methods doesn't seem ideal and since 
`stop-here` should be locally scoped it seemed a better form of control to 
always run the local `accumulo-service` command vs possibly ssh to the target 
host.
   
   If the concern is that we are calling `accumulo-service` two separate ways, 
I could change the structure of control_service to accept a `--local` flag 
which would never allow the SSH option to run.



-- 
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