karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julien Greffe (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KARAF-6182) Updating a <config> value should be reflected in config:list
Date Tue, 05 Mar 2019 14:23:00 GMT
Julien Greffe created KARAF-6182:
------------------------------------

             Summary: 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
         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