Karaf 4.2.x: ConfigRepository.update changes config file location

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Karaf 4.2.x: ConfigRepository.update changes config file location

jochenw
Hello,

we have some functionality to update the configuration for a bundle using
the ConfigRepository API. Before Karaf 4.2.x, we had set the
felix.fileinstall.filename property to reflect the folder where the .cfg
files for our application are stored, which is different from the Karaf etc
folder.

Since Karaf 4.2.x, this doesn't work any longer in all cases, since Karaf
doesn't check this property from the passed property map, but reads it from
the configuration respository. If there is not yet a configuration for this
PID, the felix.fileinstall.filename property is of course null, and then
Karaf's etc folder is prepended to the <pid>.cfg.

In Karaf 4.1.x, first the configuration was updated form the properties
passed as argument to the update function, and only then the .cfg file is
updated (using the felilx.fileinstall.filename property if this was part of
the passed properties).

So the question: is it possible to achieve the Karaf 4.1.x functionality, so
our .cfg files are stored in the right place, even if no configuration
existed before?

Regards
Jochen



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.x: ConfigRepository.update changes config file location

jbonofre
Hi Jochen

I think I see the point.

Mind to create a jira ?

Thanks
Regards
JB
Le 18 juil. 2019, à 08:55, jochenw <[hidden email]> a écrit:
Hello,

we have some functionality to update the configuration for a bundle using
the ConfigRepository API. Before Karaf 4.2.x, we had set the
felix.fileinstall.filename property to reflect the folder where the .cfg
files for our application are stored, which is different from the Karaf etc
folder.

Since Karaf 4.2.x, this doesn't work any longer in all cases, since Karaf
doesn't check this property from the passed property map, but reads it from
the configuration respository. If there is not yet a configuration for this
PID, the felix.fileinstall.filename property is of course null, and then
Karaf's etc folder is prepended to the <pid>.cfg.

In Karaf 4.1.x, first the configuration was updated form the properties
passed as argument to the update function, and only then the .cfg file is
updated (using the felilx.fileinstall.filename property if this was part of
the passed properties).

So the question: is it possible to achieve the Karaf 4.1.x functionality, so
our .cfg files are stored in the right place, even if no configuration
existed before?

Regards
Jochen



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.x: ConfigRepository.update changes config file location

jochenw
Hi JB,

KARAF-6363

Thanks!

Jochen



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.x: ConfigRepository.update changes config file location

jbonofre
Cool !

Thanks !

Regards
JB

On 23/07/2019 08:18, jochenw wrote:

> Hi JB,
>
> KARAF-6363
>
> Thanks!
>
> Jochen
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com