You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Chris Drake <cg...@infodrake.com> on 2018/04/18 20:40:20 UTC

Felix Fileinstall 3.6.0 overwriting custom .json configuration files

Hello,

We have a OSGi service registered via a Bundle activator and which
implements the ArtifactInstaller and ConfigurationListener interfaces. The
purpose of this service is to support loading custom .json configuration
files from disk, creating and updating the corresponding config via the
ConfigurationAdmin and writing configuration changes back out to disk.

This service has worked well for a long time across multiple upgrades of
the Felix's FileInstall bundle.  Unfortunately recent changes as a result
of FELIX-5609 <https://issues.apache.org/jira/browse/FELIX-5609> have
broken this service.  Prior to FELIX-5609
<https://issues.apache.org/jira/browse/FELIX-5609> FileInstall was
restricted to handling .cfg and .config files and would ignore our
customized .json config files, never attempting to write them out to disk.
When we moved to FileInstall 3.6.0 we observed our .json config files being
overwritten by FileInstall's ConfigInstaller.

I believe the above is a bug and the changes introduced by FELIX-5609
<https://issues.apache.org/jira/browse/FELIX-5609> should have retained the
check restricting configuration handling to only .cfg and .confg files.

What do you think?

Regards,
Chris

Re: Felix Fileinstall 3.6.0 overwriting custom .json configuration files

Posted by Guillaume Nodet <gn...@apache.org>.
That's definitely a change in the behavior.
A simple workaround is to define the following property:

felix.fileinstall.filter = .*\\.(cfg|config)


2018-04-18 22:40 GMT+02:00 Chris Drake <cg...@infodrake.com>:

> Hello,
>
> We have a OSGi service registered via a Bundle activator and which
> implements the ArtifactInstaller and ConfigurationListener interfaces. The
> purpose of this service is to support loading custom .json configuration
> files from disk, creating and updating the corresponding config via the
> ConfigurationAdmin and writing configuration changes back out to disk.
>
> This service has worked well for a long time across multiple upgrades of
> the Felix's FileInstall bundle.  Unfortunately recent changes as a result
> of FELIX-5609 <https://issues.apache.org/jira/browse/FELIX-5609> have
> broken this service.  Prior to FELIX-5609
> <https://issues.apache.org/jira/browse/FELIX-5609> FileInstall was
> restricted to handling .cfg and .config files and would ignore our
> customized .json config files, never attempting to write them out to disk.
> When we moved to FileInstall 3.6.0 we observed our .json config files being
> overwritten by FileInstall's ConfigInstaller.
>
> I believe the above is a bug and the changes introduced by FELIX-5609
> <https://issues.apache.org/jira/browse/FELIX-5609> should have retained
> the
> check restricting configuration handling to only .cfg and .confg files.
>
> What do you think?
>
> Regards,
> Chris
>



-- 
------------------------
Guillaume Nodet