karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Commented] (KARAF-6182) Updating a <config> value should be reflected in config:list
Date Mon, 25 Mar 2019 16:51:00 GMT

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

Jean-Baptiste Onofré commented on KARAF-6182:
---------------------------------------------

Fair enough, I will do the improvement for you ;)

> 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: New Feature
>          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)

Mime
View raw message