ddanielr commented on code in PR #5116:
URL: https://github.com/apache/accumulo/pull/5116#discussion_r1864556424
##########
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 like that approach, It would be helpful for situations where a CNAME is
being used instead of something directly tied to the local host.
Once we decide on what variable to use I could backport that specific
override functionality to 2.1 in #5094
--
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]