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

Edward Ribeiro commented on ZOOKEEPER-2377:
-------------------------------------------

Hi [~sdh],

{quote}
Does not look like the failed tests are because of my patch, is it?
{quote}

1. Nope, I don't think so. Both the Findbugs warning and the failed test are 
related to SASL and SSL classes that your patch didn't touch at all. Right, 
[~rgs]?

2. In your latest patch I've seen the following lines, that I am assuming are 
left over debug statements, right? ;)

{code}
echo $ZOOBINDIR
exit 0
{code}

3. Your latest patch worked on OSX (after I removed the code snippet above, 
lol). :)

4. I agree with you wrt to the "hack". But, if I understood it right, now we 
have two scenarios: on Linux it will follow the chain of symbolic links until 
the real file while on OSX/FreeBSD it will stop short on the first scenario.

For example, the following code works on OSX now:

{code}
$ mkdir tmp; cd tmp
[tmp] $ ln -s /Users/edward/IdeaProjects/zookeeper/bin/zkServer.sh zkServer.sh
[tmp] $ ./zkServer.sh start 
{code}

But if I add the following commands

{code}
[tmp]$ ln -s ./zkServer.sh zkServer2
[tmp]$ ./zkServer2
{code}

Then it will not on OSX/FreeBSD/OpenBSD/NetBSD, but *it will work on Linux* 
because it follows the symlinks chain zkServer2 -> zkServer -> 
/Users/edward/IdeaProjects/zookeeper/bin/zkServer.sh, right?

So... My question (and I really don't have an option now) is: this dual 
behaviour is desirable? Would it not be better to only follow the first symlink 
and fail it is has further symlink??? [~rgs], [~cnauroth]? 

Last but not least, I personally like to append a ".n", where n > 1, just 
before the ".patch" suffix. It makes easy to quickly glance over which patch is 
the latest one and doesn't break Jenkins. Just a suggestion.

Cheers!

> zkServer.sh should resolve canonical path from symlinks
> -------------------------------------------------------
>
>                 Key: ZOOKEEPER-2377
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2377
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: scripts
>    Affects Versions: 3.4.8
>         Environment: Centos 6
>            Reporter: Siddhartha
>            Priority: Minor
>         Attachments: ZOOKEEPER-2377.patch, ZOOKEEPER-2377.patch
>
>
> If zkServer.sh is started from a symlink, it is not able to correctly source 
> the other scripts because it looks in the wrong path.
> Attached patch fixes this by first resolving absolute path to the script.



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

Reply via email to