accumulo-notifications mailing list archives

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

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

Christopher Tubbs commented on ACCUMULO-4403:
---------------------------------------------

While you're in there, you could clean up the other shellcheck problems: ;)
{code}
 . "$bin"/config.sh
 
-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)
@@ -41,14 +39,14 @@ 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
-      if grep -q ${host} $ACCUMULO_CONF_DIR/slaves; then
-         "${bin}/accumulo" admin stop "$host"
+      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
+      "$ACCUMULO_HOME"/bin/stop-server.sh "$HOSTNAME" "$ACCUMULO_HOME/lib/accumulo-start.jar"
$svc $signal
    done
 done
{code}

> 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