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 13:16:00 GMT

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

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

On config, you can use append to add new properties. The existing properties are not updated
as it could be really dangerous.

Are you sure you want override on config as well (like in configfile) ? Basically it means
that I will remove the config properties to recreate it.

The managed service associated to the config will be called.

> 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)

Mime
View raw message