drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kunal Khatua (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-4921) Scripts drill_config.sh, drillbit.sh, and drill-embedded fail when accessed via a symbolic link
Date Tue, 01 Nov 2016 20:05:59 GMT

     [ https://issues.apache.org/jira/browse/DRILL-4921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kunal Khatua updated DRILL-4921:
--------------------------------
    Reviewer: Krystal

[~knguyen] This is a simple patch. Please verify that the scripts behave correctly when being
executed via a symbolic link.

> Scripts drill_config.sh,  drillbit.sh, and drill-embedded fail when accessed via a symbolic
link
> ------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-4921
>                 URL: https://issues.apache.org/jira/browse/DRILL-4921
>             Project: Apache Drill
>          Issue Type: Bug
>          Components:  Server
>    Affects Versions: 1.8.0
>         Environment: The drill-embedded on the Mac; the other files on Linux
>            Reporter: Boaz Ben-Zvi
>            Assignee: Boaz Ben-Zvi
>            Priority: Minor
>             Fix For: 1.9.0
>
>
>   Several of the drill... scripts under $DRILL_HOME/bin use "pwd" to produce the local
path of that script. However "pwd" defaults to "logical" (i.e. the same as "pwd -L"); so if
accessed via a symbolic link, that link is used verbatim in the path, which can produce wrong
paths (e.g., when followed by "cd ..").
> For example, creating a symbolic link and using it (on the Mac):
> $  cd ~/drill
> $  ln -s $DRILL_HOME/bin 
> $  bin/drill-embedded
> ERROR: Drill config file missing: /Users/boazben-zvi/drill/conf/drill-override.conf --
Wrong config dir?
> Similarly on Linux the CLASS_PATH gets set wrong (when running "drillbit.sh start" via
a symlink).
> Solution: need to replace all the "pwd" in all the scripts with "pwd -P" which produces
the Physical path. (Or replace a preceding "cd" with "cd -P" which does the same).
> Relevant scripts:
> =============
> $ cd bin; grep pwd *
> drillbit.sh:bin=`cd "$bin">/dev/null; pwd`
> drillbit.sh:  echo "cwd:" `pwd`
> drill-conf:bin=`cd "$bin">/dev/null; pwd`
> drill-config.sh:home=`cd "$bin/..">/dev/null; pwd`
> drill-config.sh:      DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
> drill-config.sh:    JAVA_HOME="$( cd -P "$( dirname "$SOURCE" )" && cd .. &&
pwd )"
> drill-embedded:bin=`cd "$bin">/dev/null; pwd`
> drill-localhost:bin=`cd "$bin">/dev/null; pwd`
> submit_plan:bin=`cd "$bin">/dev/null; pwd`
>  



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

Mime
View raw message