[CONTROLLER-1525] Can't start karaf using symbolic link Created: 07/Jun/16 Updated: 03/May/18 Resolved: 01/Aug/16 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | karaf |
| Affects Version/s: | Lithium |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Alexis de Talhouët | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 6027 |
| Description |
|
When using symbolic link, e.g. root@foo:/usr/bin# ls -ls karaf karaf fail to start because of wrong DIRNAME, as DIRNAME is based on $0 being the path of the executed file. Karaf script is setting multiple env variable to be able to start correctly, and all of those variables are based on the KARAF_HOME, that is tied to the DIRNAME. |
| Comments |
| Comment by Alexis de Talhouët [ 08/Jun/16 ] |
|
For Ubuntu (Linux vagrant 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux) For OSX (Darwin inocybe.local 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep 1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64) |
| Comment by Alexis de Talhouët [ 08/Jun/16 ] |
|
JIRA opened in Karaf project https://issues.apache.org/jira/browse/KARAF-4564 |
| Comment by Michael Vorburger [ 30/Jun/16 ] |
| Comment by Michael Vorburger [ 22/Jul/16 ] |
|
I've just amended https://git.opendaylight.org/gerrit/#/c/39982/ with the solution proposed on https://issues.apache.org/jira/browse/KARAF-4599 (upstream is slow to react, so let's just apply this here, we've anyway forked the Karaf scripts already, so we can continue to patch them). FTR: Alexis pointed out (on IRC) that his initial solution https://git.opendaylight.org/gerrit/#/c/39982/2/karaf/opendaylight-karaf-resources/src/main/resources/bin/karaf worked fine with both absolute and relative path. But Karaf dev jbonofre then pointed out on https://github.com/apache/karaf/pull/196 that realpath as it's not available on most of Unix systems, so it was changed to readlink. That initially caused it to "now only works when invoked from current directoy, no longer via absolute path" (KARAF-4599). So with the latest patch set 10 in c/41305/ that's resolved too, so I think we'll have fixed this bug for good when https://git.opendaylight.org/gerrit/#/c/39982/10/ is merged. |
| Comment by Alexis de Talhouët [ 01/Aug/16 ] |
|
beryllium --> https://git.opendaylight.org/gerrit/#/c/42646/1 |