You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "munene kiruja (JIRA)" <ji...@apache.org> on 2016/01/12 03:11:40 UTC

[jira] [Commented] (FELIX-5165) Fileinstall: OSGi config values not exposed to webconsole are lost upon saving because config manager overwrites instead of merge with internal set.

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

munene kiruja commented on FELIX-5165:
--------------------------------------

This bug exists for .cfg format also. For the new format, this issue is applies to code that has fixes for FELIX-5111 implemented, because the maiden support for .config did not even preserve the the file contents that were not part of the config update, among other issues like reorganizing the config files and removing all comment - all of which are addressed in 5111.

> Fileinstall: OSGi config values not exposed to webconsole are lost upon saving because config manager overwrites instead of merge with internal set.
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-5165
>                 URL: https://issues.apache.org/jira/browse/FELIX-5165
>             Project: Felix
>          Issue Type: Bug
>            Reporter: munene kiruja
>
> Supposing you have settings you prefer to keep away from webconsole's easy access. When you update other settings on the webconsole, it asks configadmin to update itself. Config admin takes the settings overwrites what it had. The service loses the values that are hidden until the next container restart (or similar event) when it rereads the file.
> Perhaps there might be a case for this behavior, so maybe there should be a setting to choose preference. 
> In our case, we have a third party OSGi container that uses Apache Fileinstall and Webconsole but their custom config admin (which does not merge changes upon Update(Dictionary props);. Apache's own also does not. We propose making Fileinstall update configadmin from file (as it is the one that can notice such a discrepancy.
> Its ConfigInstaller.setConfig method already does all the work of checking for differences, however in respect to the new .config format for configuration, it has a bug - namely - when the values of the map are arrays, the comparison is faulty (based on addresses of the arrays instead of the contents). This is easy to fix.



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