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

ASF GitHub Bot commented on KARAF-4843:
---------------------------------------

GitHub user cfiehe opened a pull request:

    https://github.com/apache/karaf/pull/272

    [KARAF-4843] Fix SEP_VERTICAL in ShellTable

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cfiehe/karaf fix_sep_vertical

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/karaf/pull/272.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #272
    
----
commit 749ae875683f3b3eff60e7d203112b85ab43f021
Author: Christoph Fiehe <christoph.fi...@materna.de>
Date:   2016-11-30T09:01:35Z

    [KARAF-4843] Fix SEP_VERTICAL in ShellTable

----


> Updating factory configuration leads to new configuration instance
> ------------------------------------------------------------------
>
>                 Key: KARAF-4843
>                 URL: https://issues.apache.org/jira/browse/KARAF-4843
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-config
>    Affects Versions: 4.1.0
>            Reporter: Jens Offenbach
>            Assignee: Guillaume Nodet
>             Fix For: 4.1.0
>
>
> Start with a fresh Karaf 4.1.0-SNAPSHOT installation and validate that 
> felix.fileinstall.enableConfigSave = true is set. 
> Scenario:
> - Create a factory configuration.
> - Update the configuration.
> Result:
> The configuration gets updated, but a new configuration with another 
> incorrect service.factoryPid gets created:
> Steps to reproduce:
> {code}
> karaf@root()> config:edit --factory com.example.TestConfig
> karaf@root()> config:property-set A B
> karaf@root()> config:update
> karaf@root()> config:list '(service.factoryPid=com.example.TestConfig*)'
> ----------------------------------------------------------------
> Pid:            com.example.TestConfig.8d22975e-3cb3-477c-985d-7c1a1d9f98af
> FactoryPid:     com.example.TestConfig
> BundleLocation: null
> Properties:
>    A = B
>    service.factoryPid = com.example.TestConfig
>    service.pid = com.example.TestConfig.8d22975e-3cb3-477c-985d-7c1a1d9f98af
> karaf@root()> config:edit 
> com.example.TestConfig.8d22975e-3cb3-477c-985d-7c1a1d9f98af
> karaf@root()> config:property-set A C
> karaf@root()> config:update
> karaf@root()> config:list '(service.factoryPid=com.example.TestConfig*)'
> ----------------------------------------------------------------
> Pid:            com.example.TestConfig.8d22975e-3cb3-477c-985d-7c1a1d9f98af
> FactoryPid:     com.example.TestConfig
> BundleLocation: null
> Properties:
>    A = C
>    service.factoryPid = com.example.TestConfig
>    service.pid = com.example.TestConfig.8d22975e-3cb3-477c-985d-7c1a1d9f98af
> ----------------------------------------------------------------
> Pid:            
> com.example.TestConfig.8d22975e.22055df0-4a85-4b87-94c6-7787cd84a8e5
> FactoryPid:     com.example.TestConfig.8d22975e
> BundleLocation: null
> Properties:
>    A = C
>    felix.fileinstall.filename = 
> file:/opt/apache-karaf-4.1.0-SNAPSHOT/etc/com.example.TestConfig.8d22975e-3cb3-477c-985d-7c1a1d9f98af.cfg
>    service.factoryPid = com.example.TestConfig.8d22975e
>    service.pid = 
> com.example.TestConfig.8d22975e.22055df0-4a85-4b87-94c6-7787cd84a8e5
> karaf@root()> config:list '(service.factoryPid=com.example.TestConfigd*)'
> {code}
> I think that there is a problem with fileinstall and hyphen handling. The 
> string before the hyphen is interpreted as factoryPid resulting in 
> "com.example.TestConfig.8d22975e". Fileinstall tries to find the existing 
> configuration using the key "felix.fileinstall.filename" which is not set by 
> "ConfigRepositoryImpl".
> Solution:
> I am not sure, but I think, that in the "update"-method of 
> "ConfigRepositoryImpl", the "felix.fileinstall.filename"-property has to be 
> set explicitly and that an alias has be used that does not contain a hyphen.
> It would be nice to add an "-alias" option to the command "config:edit" that 
> allows a user to specify the alias that gets used for the factory 
> configuration. Unfortunately, the alias does not get used when the 
> configuration gets created for the first time. Only its update leads to a 
> file creation that gets considered by Fileinstall.
> What are your thoughts?



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

Reply via email to