You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org> on 2019/03/24 16:01:00 UTC

[jira] [Resolved] (KARAF-6182) Updating a value should be reflected in config:list

     [ https://issues.apache.org/jira/browse/KARAF-6182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré resolved KARAF-6182.
-----------------------------------------
    Resolution: Not A Problem

> Updating a <config> value should be reflected in config:list
> ------------------------------------------------------------
>
>                 Key: KARAF-6182
>                 URL: https://issues.apache.org/jira/browse/KARAF-6182
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.1.6
>            Reporter: Julien Greffe
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>         Attachments: feature-test_init.xml, feature-test_updated_0.1.0.xml, feature-test_updated_0.2.0.xml
>
>
> Hello,
>  
> this issue is related to https://issues.apache.org/jira/browse/KARAF-2894, but seems it's still in OPEN state.
>  
>  
> Having this feature file (feature-test_init.xml), installing it and listing the config shows the right values :
> {{karaf@trun()> feature:install config-test}}
> {{karaf@trun()> config:list | grep configTest -A 5}}
> {{Pid: configTest.Default}}
> {{BundleLocation: null}}
> {{Properties:}}
> {{ myKey = "myInitValue"}}
> {{ org.apache.karaf.features.configKey = configTest.Default}}
> {{ service.pid = configTest.Default}}
>  
> Whenever removing the file from deploy dir, updating the feature file with new value + modified value (feature-test_updated_0.1.0.xml), installing again, the config shows old value + inserted value :
> {{karaf@trun()> feature:install config-test}}
> {{karaf@trun()> config:list | grep configTest -A 5}}
> {{Pid: configTest.Default}}
> {{BundleLocation: null}}
> {{Properties:}}
> {{ myKey = "myInitValue"}}
> {{ newKey = "someValue"}}
> {{ org.apache.karaf.features.configKey = configTest.Default}}
> {{ service.pid = configTest.Default}}
>  
> Changing the feature version (feature-test_updated_0.2.0.xml) doesn't update existing keys :
> {{karaf@trun()> feature:install config-test}}
> {{karaf@trun()> config:list | grep configTest -A 5}}
> {{Pid: configTest.Default}}
> {{BundleLocation: null}}
> {{Properties:}}
> {{ myKey = "myInitValue"}}
> {{ newKey = "someValue"}}
> {{ newKey2 = "someValue2"}}
> {{ org.apache.karaf.features.configKey = configTest.Default}}
> {{ service.pid = configTest.Default}}
>  
> In order to have updated values of existing keys, should I always have to execute {{config:delete <ID>}} ?
> Or is there an uninstall option which allows to also delete the related config?
> Is this related to [https://github.com/apache/karaf/blob/karaf-4.1.6/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java#L132] ?
>  
> Thank you,



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)