accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Elser (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-4403) Multiple hostname aliases breaks stop-here.sh
Date Sun, 14 Aug 2016 02:36:20 GMT

    [ https://issues.apache.org/jira/browse/ACCUMULO-4403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15420168#comment-15420168
] 

Josh Elser commented on ACCUMULO-4403:
--------------------------------------

{code}
diff --git a/assemble/bin/stop-here.sh b/assemble/bin/stop-here.sh
index 6f0aa7f..5ca4007 100755
--- a/assemble/bin/stop-here.sh
+++ b/assemble/bin/stop-here.sh
@@ -34,21 +34,22 @@ bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
 ACCUMULO="$ACCUMULO_HOME/lib/accumulo-start.jar"

 # Determine hostname without errors to user
-HOSTNAME=$(hostname -a 2> /dev/null | head -1)
-[[ -z ${HOSTNAME} ]] && HOSTNAME=$(hostname)
+HOSTS_TO_CHECK="$(hostname -a 2> /dev/null | head -1) $(hostname -f)"

 if egrep -q localhost\|127.0.0.1 "$ACCUMULO_CONF_DIR/slaves"; then
    "$bin/accumulo" admin stop localhost
 else
-   for host in "$(hostname -a 2> /dev/null)" "$(hostname)"; do
+   for host in $HOSTS_TO_CHECK; do
       if grep -q ${host} $ACCUMULO_CONF_DIR/slaves; then
          "${bin}/accumulo" admin stop "$host"
       fi
    done
 fi

-for signal in TERM KILL; do
-   for svc in tserver gc master monitor tracer; do
-      $ACCUMULO_HOME/bin/stop-server.sh $HOSTNAME "$ACCUMULO_HOME/lib/accumulo-start.jar"
$svc $signal
+for HOSTNAME in $HOSTS_TO_CHECK; do
+   for signal in TERM KILL; do
+      for svc in tserver gc master monitor tracer; do
+         $ACCUMULO_HOME/bin/stop-server.sh $HOSTNAME "$ACCUMULO_HOME/lib/accumulo-start.jar"
$svc $signal
+      done
    done
 done
{code}

[~ctubbsii], how do you feel about this?

> Multiple hostname aliases breaks stop-here.sh
> ---------------------------------------------
>
>                 Key: ACCUMULO-4403
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-4403
>             Project: Accumulo
>          Issue Type: Bug
>          Components: scripts
>            Reporter: Josh Elser
>            Assignee: Josh Elser
>            Priority: Critical
>             Fix For: 1.8.0
>
>
> I have a node with /etc/hosts
> {noformat}
> 172.22.98.184	jelser-accumulo-180-4.openstacklocal	jelser-accumulo-180-4	jelser-accumulo-180-4.openstacklocal.
> {noformat}
> hostname -a returns
> {noformat}
> [accumulo@jelser-accumulo-180-4 accumulo-1.8.0]$ hostname -a
> jelser-accumulo-180-4 jelser-accumulo-180-4.openstacklocal.
> {noformat}
> This breaks the stop-here.sh script which expects only a single alias.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message