dlmarion commented on code in PR #5116:
URL: https://github.com/apache/accumulo/pull/5116#discussion_r1871968475


##########
assemble/bin/accumulo-cluster:
##########
@@ -632,22 +467,16 @@ function main() {
   accumulo_cmd="${bin}/accumulo"
   SSH='ssh -qnf -o ConnectTimeout=2'
 
-  # Copy input arguments into new array
-  # removing any options
-  DEBUG=0
-  i=0
-  declare -a program_args
-  for arg in "$@"; do
-    if [[ $arg == "--dry-run" ]]; then
-      DEBUG=1
-    else
-      program_args[i++]="$arg"
-    fi
-  done
+  cmd="$1"
+  shift
+  parse_args "$@"
 
-  debug "debug: ${DEBUG} args: ${program_args[*]}"
+  localhost_names=("localhost" "127.0.0.1" "$(hostname)" "$(hostname -a 
2>/dev/null | head -1)" "$(hostname -s)" "$(hostname -f)")
+  read -r -a localhost_interfaces <<<"$(hostname -I)"
+  LOCAL_HOST_ADDRESSES+=("${localhost_names[@]}" "${localhost_interfaces[@]}")
+  debug "${LOCAL_HOST_ADDRESSES[*]}"

Review Comment:
   I'm thinking actually that `ACCUMULO_LOCALHOST_ADDRESSES` may not work. I 
think what we really want is a call to `nslookup`, `getent` or similar. 
Removing the localhost processing totally I think will make this work as it 
will try to `ssh` to the address in cluster.yaml regardless of whether it's the 
local host or not, and address resolution will take place in the execution of 
`ssh`.



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