Hi,

we have written our own URLStreamHandlerService to handle custom urls. The
urls are of the form "almscp://<user>@<host>:<port>/<remote path to a bundle
jar>;keyfile=<ssh keyfile path>,passphrase=<ssh key passphrase>"
for example :
"almscp://ikan@ikan514v:22//opt/ikan/alm5_8_frs/system/phaseCatalog/com.ikanalm.phase.echowebtestparameters/com.ikanalm.phase.echowebtestparameters-1.0.0.jar;keyfile=/home/ikan/.ssh/id_rsa,passphrase=pass"

when we try to install a feature using such an url from a generated feature
repository, like :

<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.1";
name="com.ikanalm.phase.echowebtestparameters1.0.0_1517241731122">
  <feature name="com.ikanalm.phase.echowebtestparameters" version="1.0.0">
   
<bundle>almscp://ikan@ikan514v:22//opt/ikan/alm5_8_frs/system/phaseCatalog/com.ikanalm.phase.echowebtestparameters/com.ikanalm.phase.echowebtestparameters-1.0.0.jar;keyfile=/home/ikan/.ssh/id_rsa,passphrase=pass</bundle>
  </feature>
</features>

The feature and bundle are installed ok, but in the $karaf.data/tmp dir, a
file was created with the name "id_rsa,passphrase=pass". 
Now, if we try to install another feature, also using an almscp:// url, for
example with bundle name/version
com.ikanalm.phase.echowebtestparameters-2.0.0.jar, then the 2.0.0 bundle
should also be copied to the tmp dir.
However, since the filename that is generated for the 2.0.0 bundle is also
"id_rsa,passphrase=pass", the 2.0.0 bundle is never copied. Instead, karaf
reinstalls the 1.0.0 bundle and then claims that feature 2.0.0 has been
installed.
At this point, we see that feature 1.0.0 and feature 2.0.0 are installed,
but only bundle 1.0.0 is installed.

This happens for every feature of which the bundle url happens to end with
"id_rsa,passphrase=pass". Thus our bundles don't get installed properly.

What part is responsible for creating the file in the $karaf.data/tmp dir ?
Is it Karaf or Felix or something else ? I tried to track it down in the
Karaf source code, but I couldn't find a spot where files got written to the
tmp dir.

If the generated temporary file was deleted from the tmp dir after the
feature was installed, this wouldn't be a problem. Is there a way to change
this behaviour ?

We are using Karaf 4.0.7

Thanks,
Frank 'S Jegers.




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Reply via email to