You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Dominik Przybysz <al...@apache.org> on 2019/02/13 13:10:37 UTC

Problem with the newest blueprint in karaf 4.2.x

Hi,
we have a problem with Blueprint in newest Karaf versions. We try to
upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we have a
strange situation during application startup. Bundles await for Config
Admin startup (opinion based on logs), but after that, sometimes our CM
Properties are injected empty. This is nondeterministic - sometimes
injection works fine, sometimes not. It looks like some kind of the race
between threads. On 4.0.4 everything seems to work fine.

Steps to reproduce:
1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin, including
a few apps using CM Properties.
2. Start you distribution.
3. Log injected properties.
4. Observe that the properties are sometimes empty (after the bundle
restart everything is correct).

Apache Karaf (4.0.4)

karaf@root()> list -t 0 | grep -i blueprint
11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core, Fragments: 14
14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core Compatiblity
Fragment Bundle, Hosts: 13
16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
BlueprintStateService
26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer :: Blueprint
33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint :: Config


Apache Karaf (4.2.2)

karaf@root()> list -t 0 | grep -i blueprint
 76 ? Active   ?  20 ? 1.0.1                                     ? Apache
Aries Blueprint API
 77 ? Active   ?  20 ? 1.3.1                                     ? Apache
Aries Blueprint CM
 78 ? Active   ?  20 ? 1.10.1                                    ? Apache
Aries Blueprint Core, Fragments: 79
 79 ? Resolved ?  20 ? 1.0.0                                     ? Apache
Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
 80 ? Active   ?  30 ? 1.2.0                                     ? Apache
Aries JMX Blueprint API
 81 ? Active   ?  30 ? 1.2.0                                     ? Apache
Aries JMX Blueprint Core
 84 ? Active   ?  80 ? 1.0.2                                     ? Apache
Aries Transaction Blueprint
132 ? Active   ?  30 ? 4.2.2                                     ? Apache
Karaf :: Bundle :: BlueprintStateService
133 ? Active   ?  24 ? 4.2.2                                     ? Apache
Karaf :: Deployer :: Blueprint
137 ? Active   ?  30 ? 4.2.2                                     ? Apache
Karaf :: JAAS :: Blueprint :: Config

What could be a source of problem? Is there any workaround for that?

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Grzegorz Grzybek <gr...@gmail.com>.
Hello

JBO - that's similar race we've observed (talked about this on IRC). I
remember we've found something (not synchronized, iterative copy of
properties between maps), but I can't remember the conclusion...

regards
Grzegorz Grzybek

śr., 13 lut 2019 o 14:11 Dominik Przybysz <al...@apache.org>
napisał(a):

> Hi,
> we have a problem with Blueprint in newest Karaf versions. We try to
> upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we have a
> strange situation during application startup. Bundles await for Config
> Admin startup (opinion based on logs), but after that, sometimes our CM
> Properties are injected empty. This is nondeterministic - sometimes
> injection works fine, sometimes not. It looks like some kind of the race
> between threads. On 4.0.4 everything seems to work fine.
>
> Steps to reproduce:
> 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin, including
> a few apps using CM Properties.
> 2. Start you distribution.
> 3. Log injected properties.
> 4. Observe that the properties are sometimes empty (after the bundle
> restart everything is correct).
>
> Apache Karaf (4.0.4)
>
> karaf@root()> list -t 0 | grep -i blueprint
> 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
> 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
> 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core, Fragments: 14
> 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core Compatiblity
> Fragment Bundle, Hosts: 13
> 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
> 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
> 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
> BlueprintStateService
> 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer :: Blueprint
> 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint ::
> Config
>
>
> Apache Karaf (4.2.2)
>
> karaf@root()> list -t 0 | grep -i blueprint
>  76 ? Active   ?  20 ? 1.0.1                                     ? Apache
> Aries Blueprint API
>  77 ? Active   ?  20 ? 1.3.1                                     ? Apache
> Aries Blueprint CM
>  78 ? Active   ?  20 ? 1.10.1                                    ? Apache
> Aries Blueprint Core, Fragments: 79
>  79 ? Resolved ?  20 ? 1.0.0                                     ? Apache
> Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
>  80 ? Active   ?  30 ? 1.2.0                                     ? Apache
> Aries JMX Blueprint API
>  81 ? Active   ?  30 ? 1.2.0                                     ? Apache
> Aries JMX Blueprint Core
>  84 ? Active   ?  80 ? 1.0.2                                     ? Apache
> Aries Transaction Blueprint
> 132 ? Active   ?  30 ? 4.2.2                                     ? Apache
> Karaf :: Bundle :: BlueprintStateService
> 133 ? Active   ?  24 ? 4.2.2                                     ? Apache
> Karaf :: Deployer :: Blueprint
> 137 ? Active   ?  30 ? 4.2.2                                     ? Apache
> Karaf :: JAAS :: Blueprint :: Config
>
> What could be a source of problem? Is there any workaround for that?
>

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
I also started some changes on a local branch. Let's sync together
tomorrow or next week.

Regards
JB

On 14/02/2019 08:58, Grzegorz Grzybek wrote:
> Dominik, could you attach sample blueprint to ARIES-1841? I could check
> ~next week.
> 
> regards
> Grzegorz Grzybek
> 
> czw., 14 lut 2019 o 08:56 Dominik Przybysz <al...@gmail.com>
> napisał(a):
> 
>> Yes, it looks like the description of our bug.
>> But the workaround from your comment is not acceptable for us, because we
>> cannot rebuild all our bundles to run it on newer platform.
>>
>> czw., 14 lut 2019 o 07:25 Jean-Baptiste Onofré <jb...@nanthrax.net>
>> napisał(a):
>>
>>> It's what I meant: cm:properties.
>>>
>>> I already analyzed a similar behavior (and it's here for a while): the
>>> properties map is created empty than populated afterward.
>>>
>>> I think it's similar to:
>>>
>>> https://issues.apache.org/jira/browse/ARIES-1841
>>>
>>> Do you confirm ?
>>>
>>> You can the description that I provided here and the improvements I plan.
>>>
>>> Regards
>>> JB
>>>
>>> On 13/02/2019 20:50, Dominik Przybysz wrote:
>>>> @Jean-Baptiste We are using cm-properties as in the provided code
>>> before. I
>>>> don't see cm:properties in blueprint-cm-1.3.0.xsd
>>>>
>>>> @Grzegorz we try to prepare the examples ASAP
>>>>
>>>> śr., 13 lut 2019 o 18:39 Jean-Baptiste Onofré <jb...@nanthrax.net>
>>> napisał(a):
>>>>
>>>>> Hi,
>>>>>
>>>>> It's normal, and I bet it was the case before.
>>>>>
>>>>> Depending how you create the config, it can be created empty (no
>>>>> property first) and updated later.
>>>>>
>>>>> You should use managed factory (so update reload in blueprint) to be
>> up
>>>>> to date.
>>>>>
>>>>> I also notified it's especially true with cm:properties (instead of
>>>>> property placeholder).
>>>>>
>>>>> Are you using cm:properties ?
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>> On 13/02/2019 14:10, Dominik Przybysz wrote:
>>>>>> Hi,
>>>>>> we have a problem with Blueprint in newest Karaf versions. We try to
>>>>>> upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we
>>> have
>>>>> a
>>>>>> strange situation during application startup. Bundles await for
>> Config
>>>>>> Admin startup (opinion based on logs), but after that, sometimes our
>> CM
>>>>>> Properties are injected empty. This is nondeterministic - sometimes
>>>>>> injection works fine, sometimes not. It looks like some kind of the
>>> race
>>>>>> between threads. On 4.0.4 everything seems to work fine.
>>>>>>
>>>>>> Steps to reproduce:
>>>>>> 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin,
>>>>> including
>>>>>> a few apps using CM Properties.
>>>>>> 2. Start you distribution.
>>>>>> 3. Log injected properties.
>>>>>> 4. Observe that the properties are sometimes empty (after the bundle
>>>>>> restart everything is correct).
>>>>>>
>>>>>> Apache Karaf (4.0.4)
>>>>>>
>>>>>> karaf@root()> list -t 0 | grep -i blueprint
>>>>>> 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
>>>>>> 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
>>>>>> 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core,
>>> Fragments:
>>>>> 14
>>>>>> 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core
>>> Compatiblity
>>>>>> Fragment Bundle, Hosts: 13
>>>>>> 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
>>>>>> 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
>>>>>> 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
>>>>>> BlueprintStateService
>>>>>> 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer ::
>> Blueprint
>>>>>> 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint ::
>>>>> Config
>>>>>>
>>>>>>
>>>>>> Apache Karaf (4.2.2)
>>>>>>
>>>>>> karaf@root()> list -t 0 | grep -i blueprint
>>>>>>  76 ? Active   ?  20 ? 1.0.1                                     ?
>>> Apache
>>>>>> Aries Blueprint API
>>>>>>  77 ? Active   ?  20 ? 1.3.1                                     ?
>>> Apache
>>>>>> Aries Blueprint CM
>>>>>>  78 ? Active   ?  20 ? 1.10.1                                    ?
>>> Apache
>>>>>> Aries Blueprint Core, Fragments: 79
>>>>>>  79 ? Resolved ?  20 ? 1.0.0                                     ?
>>> Apache
>>>>>> Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
>>>>>>  80 ? Active   ?  30 ? 1.2.0                                     ?
>>> Apache
>>>>>> Aries JMX Blueprint API
>>>>>>  81 ? Active   ?  30 ? 1.2.0                                     ?
>>> Apache
>>>>>> Aries JMX Blueprint Core
>>>>>>  84 ? Active   ?  80 ? 1.0.2                                     ?
>>> Apache
>>>>>> Aries Transaction Blueprint
>>>>>> 132 ? Active   ?  30 ? 4.2.2                                     ?
>>> Apache
>>>>>> Karaf :: Bundle :: BlueprintStateService
>>>>>> 133 ? Active   ?  24 ? 4.2.2                                     ?
>>> Apache
>>>>>> Karaf :: Deployer :: Blueprint
>>>>>> 137 ? Active   ?  30 ? 4.2.2                                     ?
>>> Apache
>>>>>> Karaf :: JAAS :: Blueprint :: Config
>>>>>>
>>>>>> What could be a source of problem? Is there any workaround for that?
>>>>>>
>>>>>
>>>>> --
>>>>> Jean-Baptiste Onofré
>>>>> jbonofre@apache.org
>>>>> http://blog.nanthrax.net
>>>>> Talend - http://www.talend.com
>>>>>
>>>>
>>>>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>
>>
>> --
>> Pozdrawiam / Regards,
>> Dominik Przybysz
>>
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Grzegorz Grzybek <gr...@gmail.com>.
Dominik, could you attach sample blueprint to ARIES-1841? I could check
~next week.

regards
Grzegorz Grzybek

czw., 14 lut 2019 o 08:56 Dominik Przybysz <al...@gmail.com>
napisał(a):

> Yes, it looks like the description of our bug.
> But the workaround from your comment is not acceptable for us, because we
> cannot rebuild all our bundles to run it on newer platform.
>
> czw., 14 lut 2019 o 07:25 Jean-Baptiste Onofré <jb...@nanthrax.net>
> napisał(a):
>
> > It's what I meant: cm:properties.
> >
> > I already analyzed a similar behavior (and it's here for a while): the
> > properties map is created empty than populated afterward.
> >
> > I think it's similar to:
> >
> > https://issues.apache.org/jira/browse/ARIES-1841
> >
> > Do you confirm ?
> >
> > You can the description that I provided here and the improvements I plan.
> >
> > Regards
> > JB
> >
> > On 13/02/2019 20:50, Dominik Przybysz wrote:
> > > @Jean-Baptiste We are using cm-properties as in the provided code
> > before. I
> > > don't see cm:properties in blueprint-cm-1.3.0.xsd
> > >
> > > @Grzegorz we try to prepare the examples ASAP
> > >
> > > śr., 13 lut 2019 o 18:39 Jean-Baptiste Onofré <jb...@nanthrax.net>
> > napisał(a):
> > >
> > >> Hi,
> > >>
> > >> It's normal, and I bet it was the case before.
> > >>
> > >> Depending how you create the config, it can be created empty (no
> > >> property first) and updated later.
> > >>
> > >> You should use managed factory (so update reload in blueprint) to be
> up
> > >> to date.
> > >>
> > >> I also notified it's especially true with cm:properties (instead of
> > >> property placeholder).
> > >>
> > >> Are you using cm:properties ?
> > >>
> > >> Regards
> > >> JB
> > >>
> > >> On 13/02/2019 14:10, Dominik Przybysz wrote:
> > >>> Hi,
> > >>> we have a problem with Blueprint in newest Karaf versions. We try to
> > >>> upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we
> > have
> > >> a
> > >>> strange situation during application startup. Bundles await for
> Config
> > >>> Admin startup (opinion based on logs), but after that, sometimes our
> CM
> > >>> Properties are injected empty. This is nondeterministic - sometimes
> > >>> injection works fine, sometimes not. It looks like some kind of the
> > race
> > >>> between threads. On 4.0.4 everything seems to work fine.
> > >>>
> > >>> Steps to reproduce:
> > >>> 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin,
> > >> including
> > >>> a few apps using CM Properties.
> > >>> 2. Start you distribution.
> > >>> 3. Log injected properties.
> > >>> 4. Observe that the properties are sometimes empty (after the bundle
> > >>> restart everything is correct).
> > >>>
> > >>> Apache Karaf (4.0.4)
> > >>>
> > >>> karaf@root()> list -t 0 | grep -i blueprint
> > >>> 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
> > >>> 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
> > >>> 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core,
> > Fragments:
> > >> 14
> > >>> 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core
> > Compatiblity
> > >>> Fragment Bundle, Hosts: 13
> > >>> 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
> > >>> 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
> > >>> 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
> > >>> BlueprintStateService
> > >>> 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer ::
> Blueprint
> > >>> 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint ::
> > >> Config
> > >>>
> > >>>
> > >>> Apache Karaf (4.2.2)
> > >>>
> > >>> karaf@root()> list -t 0 | grep -i blueprint
> > >>>  76 ? Active   ?  20 ? 1.0.1                                     ?
> > Apache
> > >>> Aries Blueprint API
> > >>>  77 ? Active   ?  20 ? 1.3.1                                     ?
> > Apache
> > >>> Aries Blueprint CM
> > >>>  78 ? Active   ?  20 ? 1.10.1                                    ?
> > Apache
> > >>> Aries Blueprint Core, Fragments: 79
> > >>>  79 ? Resolved ?  20 ? 1.0.0                                     ?
> > Apache
> > >>> Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
> > >>>  80 ? Active   ?  30 ? 1.2.0                                     ?
> > Apache
> > >>> Aries JMX Blueprint API
> > >>>  81 ? Active   ?  30 ? 1.2.0                                     ?
> > Apache
> > >>> Aries JMX Blueprint Core
> > >>>  84 ? Active   ?  80 ? 1.0.2                                     ?
> > Apache
> > >>> Aries Transaction Blueprint
> > >>> 132 ? Active   ?  30 ? 4.2.2                                     ?
> > Apache
> > >>> Karaf :: Bundle :: BlueprintStateService
> > >>> 133 ? Active   ?  24 ? 4.2.2                                     ?
> > Apache
> > >>> Karaf :: Deployer :: Blueprint
> > >>> 137 ? Active   ?  30 ? 4.2.2                                     ?
> > Apache
> > >>> Karaf :: JAAS :: Blueprint :: Config
> > >>>
> > >>> What could be a source of problem? Is there any workaround for that?
> > >>>
> > >>
> > >> --
> > >> Jean-Baptiste Onofré
> > >> jbonofre@apache.org
> > >> http://blog.nanthrax.net
> > >> Talend - http://www.talend.com
> > >>
> > >
> > >
> >
> > --
> > Jean-Baptiste Onofré
> > jbonofre@apache.org
> > http://blog.nanthrax.net
> > Talend - http://www.talend.com
> >
>
>
> --
> Pozdrawiam / Regards,
> Dominik Przybysz
>

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Dominik Przybysz <al...@gmail.com>.
Yes, it looks like the description of our bug.
But the workaround from your comment is not acceptable for us, because we
cannot rebuild all our bundles to run it on newer platform.

czw., 14 lut 2019 o 07:25 Jean-Baptiste Onofré <jb...@nanthrax.net> napisał(a):

> It's what I meant: cm:properties.
>
> I already analyzed a similar behavior (and it's here for a while): the
> properties map is created empty than populated afterward.
>
> I think it's similar to:
>
> https://issues.apache.org/jira/browse/ARIES-1841
>
> Do you confirm ?
>
> You can the description that I provided here and the improvements I plan.
>
> Regards
> JB
>
> On 13/02/2019 20:50, Dominik Przybysz wrote:
> > @Jean-Baptiste We are using cm-properties as in the provided code
> before. I
> > don't see cm:properties in blueprint-cm-1.3.0.xsd
> >
> > @Grzegorz we try to prepare the examples ASAP
> >
> > śr., 13 lut 2019 o 18:39 Jean-Baptiste Onofré <jb...@nanthrax.net>
> napisał(a):
> >
> >> Hi,
> >>
> >> It's normal, and I bet it was the case before.
> >>
> >> Depending how you create the config, it can be created empty (no
> >> property first) and updated later.
> >>
> >> You should use managed factory (so update reload in blueprint) to be up
> >> to date.
> >>
> >> I also notified it's especially true with cm:properties (instead of
> >> property placeholder).
> >>
> >> Are you using cm:properties ?
> >>
> >> Regards
> >> JB
> >>
> >> On 13/02/2019 14:10, Dominik Przybysz wrote:
> >>> Hi,
> >>> we have a problem with Blueprint in newest Karaf versions. We try to
> >>> upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we
> have
> >> a
> >>> strange situation during application startup. Bundles await for Config
> >>> Admin startup (opinion based on logs), but after that, sometimes our CM
> >>> Properties are injected empty. This is nondeterministic - sometimes
> >>> injection works fine, sometimes not. It looks like some kind of the
> race
> >>> between threads. On 4.0.4 everything seems to work fine.
> >>>
> >>> Steps to reproduce:
> >>> 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin,
> >> including
> >>> a few apps using CM Properties.
> >>> 2. Start you distribution.
> >>> 3. Log injected properties.
> >>> 4. Observe that the properties are sometimes empty (after the bundle
> >>> restart everything is correct).
> >>>
> >>> Apache Karaf (4.0.4)
> >>>
> >>> karaf@root()> list -t 0 | grep -i blueprint
> >>> 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
> >>> 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
> >>> 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core,
> Fragments:
> >> 14
> >>> 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core
> Compatiblity
> >>> Fragment Bundle, Hosts: 13
> >>> 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
> >>> 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
> >>> 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
> >>> BlueprintStateService
> >>> 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer :: Blueprint
> >>> 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint ::
> >> Config
> >>>
> >>>
> >>> Apache Karaf (4.2.2)
> >>>
> >>> karaf@root()> list -t 0 | grep -i blueprint
> >>>  76 ? Active   ?  20 ? 1.0.1                                     ?
> Apache
> >>> Aries Blueprint API
> >>>  77 ? Active   ?  20 ? 1.3.1                                     ?
> Apache
> >>> Aries Blueprint CM
> >>>  78 ? Active   ?  20 ? 1.10.1                                    ?
> Apache
> >>> Aries Blueprint Core, Fragments: 79
> >>>  79 ? Resolved ?  20 ? 1.0.0                                     ?
> Apache
> >>> Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
> >>>  80 ? Active   ?  30 ? 1.2.0                                     ?
> Apache
> >>> Aries JMX Blueprint API
> >>>  81 ? Active   ?  30 ? 1.2.0                                     ?
> Apache
> >>> Aries JMX Blueprint Core
> >>>  84 ? Active   ?  80 ? 1.0.2                                     ?
> Apache
> >>> Aries Transaction Blueprint
> >>> 132 ? Active   ?  30 ? 4.2.2                                     ?
> Apache
> >>> Karaf :: Bundle :: BlueprintStateService
> >>> 133 ? Active   ?  24 ? 4.2.2                                     ?
> Apache
> >>> Karaf :: Deployer :: Blueprint
> >>> 137 ? Active   ?  30 ? 4.2.2                                     ?
> Apache
> >>> Karaf :: JAAS :: Blueprint :: Config
> >>>
> >>> What could be a source of problem? Is there any workaround for that?
> >>>
> >>
> >> --
> >> Jean-Baptiste Onofré
> >> jbonofre@apache.org
> >> http://blog.nanthrax.net
> >> Talend - http://www.talend.com
> >>
> >
> >
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>


-- 
Pozdrawiam / Regards,
Dominik Przybysz

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
It's what I meant: cm:properties.

I already analyzed a similar behavior (and it's here for a while): the
properties map is created empty than populated afterward.

I think it's similar to:

https://issues.apache.org/jira/browse/ARIES-1841

Do you confirm ?

You can the description that I provided here and the improvements I plan.

Regards
JB

On 13/02/2019 20:50, Dominik Przybysz wrote:
> @Jean-Baptiste We are using cm-properties as in the provided code before. I
> don't see cm:properties in blueprint-cm-1.3.0.xsd
> 
> @Grzegorz we try to prepare the examples ASAP
> 
> śr., 13 lut 2019 o 18:39 Jean-Baptiste Onofré <jb...@nanthrax.net> napisał(a):
> 
>> Hi,
>>
>> It's normal, and I bet it was the case before.
>>
>> Depending how you create the config, it can be created empty (no
>> property first) and updated later.
>>
>> You should use managed factory (so update reload in blueprint) to be up
>> to date.
>>
>> I also notified it's especially true with cm:properties (instead of
>> property placeholder).
>>
>> Are you using cm:properties ?
>>
>> Regards
>> JB
>>
>> On 13/02/2019 14:10, Dominik Przybysz wrote:
>>> Hi,
>>> we have a problem with Blueprint in newest Karaf versions. We try to
>>> upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we have
>> a
>>> strange situation during application startup. Bundles await for Config
>>> Admin startup (opinion based on logs), but after that, sometimes our CM
>>> Properties are injected empty. This is nondeterministic - sometimes
>>> injection works fine, sometimes not. It looks like some kind of the race
>>> between threads. On 4.0.4 everything seems to work fine.
>>>
>>> Steps to reproduce:
>>> 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin,
>> including
>>> a few apps using CM Properties.
>>> 2. Start you distribution.
>>> 3. Log injected properties.
>>> 4. Observe that the properties are sometimes empty (after the bundle
>>> restart everything is correct).
>>>
>>> Apache Karaf (4.0.4)
>>>
>>> karaf@root()> list -t 0 | grep -i blueprint
>>> 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
>>> 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
>>> 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core, Fragments:
>> 14
>>> 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core Compatiblity
>>> Fragment Bundle, Hosts: 13
>>> 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
>>> 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
>>> 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
>>> BlueprintStateService
>>> 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer :: Blueprint
>>> 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint ::
>> Config
>>>
>>>
>>> Apache Karaf (4.2.2)
>>>
>>> karaf@root()> list -t 0 | grep -i blueprint
>>>  76 ? Active   ?  20 ? 1.0.1                                     ? Apache
>>> Aries Blueprint API
>>>  77 ? Active   ?  20 ? 1.3.1                                     ? Apache
>>> Aries Blueprint CM
>>>  78 ? Active   ?  20 ? 1.10.1                                    ? Apache
>>> Aries Blueprint Core, Fragments: 79
>>>  79 ? Resolved ?  20 ? 1.0.0                                     ? Apache
>>> Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
>>>  80 ? Active   ?  30 ? 1.2.0                                     ? Apache
>>> Aries JMX Blueprint API
>>>  81 ? Active   ?  30 ? 1.2.0                                     ? Apache
>>> Aries JMX Blueprint Core
>>>  84 ? Active   ?  80 ? 1.0.2                                     ? Apache
>>> Aries Transaction Blueprint
>>> 132 ? Active   ?  30 ? 4.2.2                                     ? Apache
>>> Karaf :: Bundle :: BlueprintStateService
>>> 133 ? Active   ?  24 ? 4.2.2                                     ? Apache
>>> Karaf :: Deployer :: Blueprint
>>> 137 ? Active   ?  30 ? 4.2.2                                     ? Apache
>>> Karaf :: JAAS :: Blueprint :: Config
>>>
>>> What could be a source of problem? Is there any workaround for that?
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
> 
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Dominik Przybysz <al...@gmail.com>.
@Jean-Baptiste We are using cm-properties as in the provided code before. I
don't see cm:properties in blueprint-cm-1.3.0.xsd

@Grzegorz we try to prepare the examples ASAP

śr., 13 lut 2019 o 18:39 Jean-Baptiste Onofré <jb...@nanthrax.net> napisał(a):

> Hi,
>
> It's normal, and I bet it was the case before.
>
> Depending how you create the config, it can be created empty (no
> property first) and updated later.
>
> You should use managed factory (so update reload in blueprint) to be up
> to date.
>
> I also notified it's especially true with cm:properties (instead of
> property placeholder).
>
> Are you using cm:properties ?
>
> Regards
> JB
>
> On 13/02/2019 14:10, Dominik Przybysz wrote:
> > Hi,
> > we have a problem with Blueprint in newest Karaf versions. We try to
> > upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we have
> a
> > strange situation during application startup. Bundles await for Config
> > Admin startup (opinion based on logs), but after that, sometimes our CM
> > Properties are injected empty. This is nondeterministic - sometimes
> > injection works fine, sometimes not. It looks like some kind of the race
> > between threads. On 4.0.4 everything seems to work fine.
> >
> > Steps to reproduce:
> > 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin,
> including
> > a few apps using CM Properties.
> > 2. Start you distribution.
> > 3. Log injected properties.
> > 4. Observe that the properties are sometimes empty (after the bundle
> > restart everything is correct).
> >
> > Apache Karaf (4.0.4)
> >
> > karaf@root()> list -t 0 | grep -i blueprint
> > 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
> > 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
> > 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core, Fragments:
> 14
> > 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core Compatiblity
> > Fragment Bundle, Hosts: 13
> > 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
> > 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
> > 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
> > BlueprintStateService
> > 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer :: Blueprint
> > 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint ::
> Config
> >
> >
> > Apache Karaf (4.2.2)
> >
> > karaf@root()> list -t 0 | grep -i blueprint
> >  76 ? Active   ?  20 ? 1.0.1                                     ? Apache
> > Aries Blueprint API
> >  77 ? Active   ?  20 ? 1.3.1                                     ? Apache
> > Aries Blueprint CM
> >  78 ? Active   ?  20 ? 1.10.1                                    ? Apache
> > Aries Blueprint Core, Fragments: 79
> >  79 ? Resolved ?  20 ? 1.0.0                                     ? Apache
> > Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
> >  80 ? Active   ?  30 ? 1.2.0                                     ? Apache
> > Aries JMX Blueprint API
> >  81 ? Active   ?  30 ? 1.2.0                                     ? Apache
> > Aries JMX Blueprint Core
> >  84 ? Active   ?  80 ? 1.0.2                                     ? Apache
> > Aries Transaction Blueprint
> > 132 ? Active   ?  30 ? 4.2.2                                     ? Apache
> > Karaf :: Bundle :: BlueprintStateService
> > 133 ? Active   ?  24 ? 4.2.2                                     ? Apache
> > Karaf :: Deployer :: Blueprint
> > 137 ? Active   ?  30 ? 4.2.2                                     ? Apache
> > Karaf :: JAAS :: Blueprint :: Config
> >
> > What could be a source of problem? Is there any workaround for that?
> >
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>


-- 
Pozdrawiam / Regards,
Dominik Przybysz

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Dominik Przybysz <al...@gmail.com>.
@Jean-Baptiste We are using cm-properties as in the provided code before. I
don't see cm:properties in blueprint-cm-1.3.0.xsd

@Grzegorz we try to prepare the examples ASAP

śr., 13 lut 2019 o 18:39 Jean-Baptiste Onofré <jb...@nanthrax.net> napisał(a):

> Hi,
>
> It's normal, and I bet it was the case before.
>
> Depending how you create the config, it can be created empty (no
> property first) and updated later.
>
> You should use managed factory (so update reload in blueprint) to be up
> to date.
>
> I also notified it's especially true with cm:properties (instead of
> property placeholder).
>
> Are you using cm:properties ?
>
> Regards
> JB
>
> On 13/02/2019 14:10, Dominik Przybysz wrote:
> > Hi,
> > we have a problem with Blueprint in newest Karaf versions. We try to
> > upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we have
> a
> > strange situation during application startup. Bundles await for Config
> > Admin startup (opinion based on logs), but after that, sometimes our CM
> > Properties are injected empty. This is nondeterministic - sometimes
> > injection works fine, sometimes not. It looks like some kind of the race
> > between threads. On 4.0.4 everything seems to work fine.
> >
> > Steps to reproduce:
> > 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin,
> including
> > a few apps using CM Properties.
> > 2. Start you distribution.
> > 3. Log injected properties.
> > 4. Observe that the properties are sometimes empty (after the bundle
> > restart everything is correct).
> >
> > Apache Karaf (4.0.4)
> >
> > karaf@root()> list -t 0 | grep -i blueprint
> > 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
> > 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
> > 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core, Fragments:
> 14
> > 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core Compatiblity
> > Fragment Bundle, Hosts: 13
> > 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
> > 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
> > 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
> > BlueprintStateService
> > 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer :: Blueprint
> > 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint ::
> Config
> >
> >
> > Apache Karaf (4.2.2)
> >
> > karaf@root()> list -t 0 | grep -i blueprint
> >  76 ? Active   ?  20 ? 1.0.1                                     ? Apache
> > Aries Blueprint API
> >  77 ? Active   ?  20 ? 1.3.1                                     ? Apache
> > Aries Blueprint CM
> >  78 ? Active   ?  20 ? 1.10.1                                    ? Apache
> > Aries Blueprint Core, Fragments: 79
> >  79 ? Resolved ?  20 ? 1.0.0                                     ? Apache
> > Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
> >  80 ? Active   ?  30 ? 1.2.0                                     ? Apache
> > Aries JMX Blueprint API
> >  81 ? Active   ?  30 ? 1.2.0                                     ? Apache
> > Aries JMX Blueprint Core
> >  84 ? Active   ?  80 ? 1.0.2                                     ? Apache
> > Aries Transaction Blueprint
> > 132 ? Active   ?  30 ? 4.2.2                                     ? Apache
> > Karaf :: Bundle :: BlueprintStateService
> > 133 ? Active   ?  24 ? 4.2.2                                     ? Apache
> > Karaf :: Deployer :: Blueprint
> > 137 ? Active   ?  30 ? 4.2.2                                     ? Apache
> > Karaf :: JAAS :: Blueprint :: Config
> >
> > What could be a source of problem? Is there any workaround for that?
> >
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>


-- 
Pozdrawiam / Regards,
Dominik Przybysz

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

It's normal, and I bet it was the case before.

Depending how you create the config, it can be created empty (no
property first) and updated later.

You should use managed factory (so update reload in blueprint) to be up
to date.

I also notified it's especially true with cm:properties (instead of
property placeholder).

Are you using cm:properties ?

Regards
JB

On 13/02/2019 14:10, Dominik Przybysz wrote:
> Hi,
> we have a problem with Blueprint in newest Karaf versions. We try to
> upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we have a
> strange situation during application startup. Bundles await for Config
> Admin startup (opinion based on logs), but after that, sometimes our CM
> Properties are injected empty. This is nondeterministic - sometimes
> injection works fine, sometimes not. It looks like some kind of the race
> between threads. On 4.0.4 everything seems to work fine.
> 
> Steps to reproduce:
> 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin, including
> a few apps using CM Properties.
> 2. Start you distribution.
> 3. Log injected properties.
> 4. Observe that the properties are sometimes empty (after the bundle
> restart everything is correct).
> 
> Apache Karaf (4.0.4)
> 
> karaf@root()> list -t 0 | grep -i blueprint
> 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
> 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
> 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core, Fragments: 14
> 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core Compatiblity
> Fragment Bundle, Hosts: 13
> 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
> 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
> 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
> BlueprintStateService
> 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer :: Blueprint
> 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint :: Config
> 
> 
> Apache Karaf (4.2.2)
> 
> karaf@root()> list -t 0 | grep -i blueprint
>  76 ? Active   ?  20 ? 1.0.1                                     ? Apache
> Aries Blueprint API
>  77 ? Active   ?  20 ? 1.3.1                                     ? Apache
> Aries Blueprint CM
>  78 ? Active   ?  20 ? 1.10.1                                    ? Apache
> Aries Blueprint Core, Fragments: 79
>  79 ? Resolved ?  20 ? 1.0.0                                     ? Apache
> Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
>  80 ? Active   ?  30 ? 1.2.0                                     ? Apache
> Aries JMX Blueprint API
>  81 ? Active   ?  30 ? 1.2.0                                     ? Apache
> Aries JMX Blueprint Core
>  84 ? Active   ?  80 ? 1.0.2                                     ? Apache
> Aries Transaction Blueprint
> 132 ? Active   ?  30 ? 4.2.2                                     ? Apache
> Karaf :: Bundle :: BlueprintStateService
> 133 ? Active   ?  24 ? 4.2.2                                     ? Apache
> Karaf :: Deployer :: Blueprint
> 137 ? Active   ?  30 ? 4.2.2                                     ? Apache
> Karaf :: JAAS :: Blueprint :: Config
> 
> What could be a source of problem? Is there any workaround for that?
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Grzegorz Grzybek <gr...@gmail.com>.
Hello

JBO - that's similar race we've observed (talked about this on IRC). I
remember we've found something (not synchronized, iterative copy of
properties between maps), but I can't remember the conclusion...

regards
Grzegorz Grzybek

śr., 13 lut 2019 o 14:11 Dominik Przybysz <al...@apache.org>
napisał(a):

> Hi,
> we have a problem with Blueprint in newest Karaf versions. We try to
> upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we have a
> strange situation during application startup. Bundles await for Config
> Admin startup (opinion based on logs), but after that, sometimes our CM
> Properties are injected empty. This is nondeterministic - sometimes
> injection works fine, sometimes not. It looks like some kind of the race
> between threads. On 4.0.4 everything seems to work fine.
>
> Steps to reproduce:
> 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin, including
> a few apps using CM Properties.
> 2. Start you distribution.
> 3. Log injected properties.
> 4. Observe that the properties are sometimes empty (after the bundle
> restart everything is correct).
>
> Apache Karaf (4.0.4)
>
> karaf@root()> list -t 0 | grep -i blueprint
> 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
> 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
> 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core, Fragments: 14
> 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core Compatiblity
> Fragment Bundle, Hosts: 13
> 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
> 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
> 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
> BlueprintStateService
> 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer :: Blueprint
> 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint ::
> Config
>
>
> Apache Karaf (4.2.2)
>
> karaf@root()> list -t 0 | grep -i blueprint
>  76 ? Active   ?  20 ? 1.0.1                                     ? Apache
> Aries Blueprint API
>  77 ? Active   ?  20 ? 1.3.1                                     ? Apache
> Aries Blueprint CM
>  78 ? Active   ?  20 ? 1.10.1                                    ? Apache
> Aries Blueprint Core, Fragments: 79
>  79 ? Resolved ?  20 ? 1.0.0                                     ? Apache
> Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
>  80 ? Active   ?  30 ? 1.2.0                                     ? Apache
> Aries JMX Blueprint API
>  81 ? Active   ?  30 ? 1.2.0                                     ? Apache
> Aries JMX Blueprint Core
>  84 ? Active   ?  80 ? 1.0.2                                     ? Apache
> Aries Transaction Blueprint
> 132 ? Active   ?  30 ? 4.2.2                                     ? Apache
> Karaf :: Bundle :: BlueprintStateService
> 133 ? Active   ?  24 ? 4.2.2                                     ? Apache
> Karaf :: Deployer :: Blueprint
> 137 ? Active   ?  30 ? 4.2.2                                     ? Apache
> Karaf :: JAAS :: Blueprint :: Config
>
> What could be a source of problem? Is there any workaround for that?
>

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Grzegorz Grzybek <gr...@gmail.com>.
Do you have some extracted example (simple blueprint file) that can show
this problem? I'd be happy to track down this race condition...

regards
Grzegorz Grzybek

śr., 13 lut 2019 o 15:29 Dominik Przybysz <al...@gmail.com> napisał(a):

> We had this problem when we had only cm-properties, so we started to add
> placeholder. And it works fine in karaf 2.x and 4.0.4, but it doesn't work
> in 4.2.2/3
>
> śr., 13 lut 2019 o 15:18 Grzegorz Grzybek <gr...@gmail.com>
> napisał(a):
>
> > Hello
> >
> > Do you really need both? I vaguely remember that the race was with
> > property-placeholder, but not with cm-properties (or vice versa - sorry,
> > can't check now).
> >
> > regards
> > Grzegorz Grzybek
> >
> > śr., 13 lut 2019 o 14:57 Dominik Przybysz <al...@gmail.com>
> > napisał(a):
> >
> > > The problem is that we always have reloading for the configuration in
> our
> > > blueprint xmls and we always generate both cm-properties and
> > > property-placeholder, e.g.
> > >
> > > <property-placeholder xmlns="
> > > http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0"
> > > persistent-id="properties1" update-strategy="reload"/>
> > > <cm-properties xmlns="
> > > http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0"
> > > id="properties1" persistent-id="properties1" update="true"/>
> > >
> > > śr., 13 lut 2019 o 14:37 Christian Schneider <ch...@die-schneider.net>
> > > napisał(a):
> > >
> > > > I think generally this can always happen.
> > > >
> > > > I usually use update-strategy="reload" to make sure the new config is
> > > > applied.
> > > >
> > > > See
> > > >
> > > >
> > >
> >
> https://github.com/cschneider/Karaf-Tutorial/blob/bf7c69efee2a49422106820a52e9a7ec24131bc3/configadmin/configapp-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml#L9
> > > >
> > > > Christian
> > > >
> > > > Am Mi., 13. Feb. 2019 um 14:11 Uhr schrieb Dominik Przybysz <
> > > > alien11689@apache.org>:
> > > >
> > > > > Hi,
> > > > > we have a problem with Blueprint in newest Karaf versions. We try
> to
> > > > > upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we
> > > have
> > > > a
> > > > > strange situation during application startup. Bundles await for
> > Config
> > > > > Admin startup (opinion based on logs), but after that, sometimes
> our
> > CM
> > > > > Properties are injected empty. This is nondeterministic - sometimes
> > > > > injection works fine, sometimes not. It looks like some kind of the
> > > race
> > > > > between threads. On 4.0.4 everything seems to work fine.
> > > > >
> > > > > Steps to reproduce:
> > > > > 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin,
> > > > including
> > > > > a few apps using CM Properties.
> > > > > 2. Start you distribution.
> > > > > 3. Log injected properties.
> > > > > 4. Observe that the properties are sometimes empty (after the
> bundle
> > > > > restart everything is correct).
> > > > >
> > > > > Apache Karaf (4.0.4)
> > > > >
> > > > > karaf@root()> list -t 0 | grep -i blueprint
> > > > > 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
> > > > > 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
> > > > > 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core,
> > > Fragments:
> > > > 14
> > > > > 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core
> > > Compatiblity
> > > > > Fragment Bundle, Hosts: 13
> > > > > 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
> > > > > 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
> > > > > 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
> > > > > BlueprintStateService
> > > > > 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer ::
> > Blueprint
> > > > > 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint
> ::
> > > > > Config
> > > > >
> > > > >
> > > > > Apache Karaf (4.2.2)
> > > > >
> > > > > karaf@root()> list -t 0 | grep -i blueprint
> > > > >  76 ? Active   ?  20 ? 1.0.1                                     ?
> > > Apache
> > > > > Aries Blueprint API
> > > > >  77 ? Active   ?  20 ? 1.3.1                                     ?
> > > Apache
> > > > > Aries Blueprint CM
> > > > >  78 ? Active   ?  20 ? 1.10.1                                    ?
> > > Apache
> > > > > Aries Blueprint Core, Fragments: 79
> > > > >  79 ? Resolved ?  20 ? 1.0.0                                     ?
> > > Apache
> > > > > Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
> > > > >  80 ? Active   ?  30 ? 1.2.0                                     ?
> > > Apache
> > > > > Aries JMX Blueprint API
> > > > >  81 ? Active   ?  30 ? 1.2.0                                     ?
> > > Apache
> > > > > Aries JMX Blueprint Core
> > > > >  84 ? Active   ?  80 ? 1.0.2                                     ?
> > > Apache
> > > > > Aries Transaction Blueprint
> > > > > 132 ? Active   ?  30 ? 4.2.2                                     ?
> > > Apache
> > > > > Karaf :: Bundle :: BlueprintStateService
> > > > > 133 ? Active   ?  24 ? 4.2.2                                     ?
> > > Apache
> > > > > Karaf :: Deployer :: Blueprint
> > > > > 137 ? Active   ?  30 ? 4.2.2                                     ?
> > > Apache
> > > > > Karaf :: JAAS :: Blueprint :: Config
> > > > >
> > > > > What could be a source of problem? Is there any workaround for
> that?
> > > > >
> > > >
> > > >
> > > > --
> > > > --
> > > > Christian Schneider
> > > > http://www.liquid-reality.de
> > > >
> > > > Computer Scientist
> > > > http://www.adobe.com
> > > >
> > >
> > >
> > > --
> > > Pozdrawiam / Regards,
> > > Dominik Przybysz
> > >
> >
>
>
> --
> Pozdrawiam / Regards,
> Dominik Przybysz
>

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Grzegorz Grzybek <gr...@gmail.com>.
Do you have some extracted example (simple blueprint file) that can show
this problem? I'd be happy to track down this race condition...

regards
Grzegorz Grzybek

śr., 13 lut 2019 o 15:29 Dominik Przybysz <al...@gmail.com> napisał(a):

> We had this problem when we had only cm-properties, so we started to add
> placeholder. And it works fine in karaf 2.x and 4.0.4, but it doesn't work
> in 4.2.2/3
>
> śr., 13 lut 2019 o 15:18 Grzegorz Grzybek <gr...@gmail.com>
> napisał(a):
>
> > Hello
> >
> > Do you really need both? I vaguely remember that the race was with
> > property-placeholder, but not with cm-properties (or vice versa - sorry,
> > can't check now).
> >
> > regards
> > Grzegorz Grzybek
> >
> > śr., 13 lut 2019 o 14:57 Dominik Przybysz <al...@gmail.com>
> > napisał(a):
> >
> > > The problem is that we always have reloading for the configuration in
> our
> > > blueprint xmls and we always generate both cm-properties and
> > > property-placeholder, e.g.
> > >
> > > <property-placeholder xmlns="
> > > http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0"
> > > persistent-id="properties1" update-strategy="reload"/>
> > > <cm-properties xmlns="
> > > http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0"
> > > id="properties1" persistent-id="properties1" update="true"/>
> > >
> > > śr., 13 lut 2019 o 14:37 Christian Schneider <ch...@die-schneider.net>
> > > napisał(a):
> > >
> > > > I think generally this can always happen.
> > > >
> > > > I usually use update-strategy="reload" to make sure the new config is
> > > > applied.
> > > >
> > > > See
> > > >
> > > >
> > >
> >
> https://github.com/cschneider/Karaf-Tutorial/blob/bf7c69efee2a49422106820a52e9a7ec24131bc3/configadmin/configapp-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml#L9
> > > >
> > > > Christian
> > > >
> > > > Am Mi., 13. Feb. 2019 um 14:11 Uhr schrieb Dominik Przybysz <
> > > > alien11689@apache.org>:
> > > >
> > > > > Hi,
> > > > > we have a problem with Blueprint in newest Karaf versions. We try
> to
> > > > > upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we
> > > have
> > > > a
> > > > > strange situation during application startup. Bundles await for
> > Config
> > > > > Admin startup (opinion based on logs), but after that, sometimes
> our
> > CM
> > > > > Properties are injected empty. This is nondeterministic - sometimes
> > > > > injection works fine, sometimes not. It looks like some kind of the
> > > race
> > > > > between threads. On 4.0.4 everything seems to work fine.
> > > > >
> > > > > Steps to reproduce:
> > > > > 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin,
> > > > including
> > > > > a few apps using CM Properties.
> > > > > 2. Start you distribution.
> > > > > 3. Log injected properties.
> > > > > 4. Observe that the properties are sometimes empty (after the
> bundle
> > > > > restart everything is correct).
> > > > >
> > > > > Apache Karaf (4.0.4)
> > > > >
> > > > > karaf@root()> list -t 0 | grep -i blueprint
> > > > > 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
> > > > > 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
> > > > > 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core,
> > > Fragments:
> > > > 14
> > > > > 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core
> > > Compatiblity
> > > > > Fragment Bundle, Hosts: 13
> > > > > 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
> > > > > 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
> > > > > 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
> > > > > BlueprintStateService
> > > > > 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer ::
> > Blueprint
> > > > > 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint
> ::
> > > > > Config
> > > > >
> > > > >
> > > > > Apache Karaf (4.2.2)
> > > > >
> > > > > karaf@root()> list -t 0 | grep -i blueprint
> > > > >  76 ? Active   ?  20 ? 1.0.1                                     ?
> > > Apache
> > > > > Aries Blueprint API
> > > > >  77 ? Active   ?  20 ? 1.3.1                                     ?
> > > Apache
> > > > > Aries Blueprint CM
> > > > >  78 ? Active   ?  20 ? 1.10.1                                    ?
> > > Apache
> > > > > Aries Blueprint Core, Fragments: 79
> > > > >  79 ? Resolved ?  20 ? 1.0.0                                     ?
> > > Apache
> > > > > Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
> > > > >  80 ? Active   ?  30 ? 1.2.0                                     ?
> > > Apache
> > > > > Aries JMX Blueprint API
> > > > >  81 ? Active   ?  30 ? 1.2.0                                     ?
> > > Apache
> > > > > Aries JMX Blueprint Core
> > > > >  84 ? Active   ?  80 ? 1.0.2                                     ?
> > > Apache
> > > > > Aries Transaction Blueprint
> > > > > 132 ? Active   ?  30 ? 4.2.2                                     ?
> > > Apache
> > > > > Karaf :: Bundle :: BlueprintStateService
> > > > > 133 ? Active   ?  24 ? 4.2.2                                     ?
> > > Apache
> > > > > Karaf :: Deployer :: Blueprint
> > > > > 137 ? Active   ?  30 ? 4.2.2                                     ?
> > > Apache
> > > > > Karaf :: JAAS :: Blueprint :: Config
> > > > >
> > > > > What could be a source of problem? Is there any workaround for
> that?
> > > > >
> > > >
> > > >
> > > > --
> > > > --
> > > > Christian Schneider
> > > > http://www.liquid-reality.de
> > > >
> > > > Computer Scientist
> > > > http://www.adobe.com
> > > >
> > >
> > >
> > > --
> > > Pozdrawiam / Regards,
> > > Dominik Przybysz
> > >
> >
>
>
> --
> Pozdrawiam / Regards,
> Dominik Przybysz
>

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Dominik Przybysz <al...@gmail.com>.
We had this problem when we had only cm-properties, so we started to add
placeholder. And it works fine in karaf 2.x and 4.0.4, but it doesn't work
in 4.2.2/3

śr., 13 lut 2019 o 15:18 Grzegorz Grzybek <gr...@gmail.com> napisał(a):

> Hello
>
> Do you really need both? I vaguely remember that the race was with
> property-placeholder, but not with cm-properties (or vice versa - sorry,
> can't check now).
>
> regards
> Grzegorz Grzybek
>
> śr., 13 lut 2019 o 14:57 Dominik Przybysz <al...@gmail.com>
> napisał(a):
>
> > The problem is that we always have reloading for the configuration in our
> > blueprint xmls and we always generate both cm-properties and
> > property-placeholder, e.g.
> >
> > <property-placeholder xmlns="
> > http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0"
> > persistent-id="properties1" update-strategy="reload"/>
> > <cm-properties xmlns="
> > http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0"
> > id="properties1" persistent-id="properties1" update="true"/>
> >
> > śr., 13 lut 2019 o 14:37 Christian Schneider <ch...@die-schneider.net>
> > napisał(a):
> >
> > > I think generally this can always happen.
> > >
> > > I usually use update-strategy="reload" to make sure the new config is
> > > applied.
> > >
> > > See
> > >
> > >
> >
> https://github.com/cschneider/Karaf-Tutorial/blob/bf7c69efee2a49422106820a52e9a7ec24131bc3/configadmin/configapp-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml#L9
> > >
> > > Christian
> > >
> > > Am Mi., 13. Feb. 2019 um 14:11 Uhr schrieb Dominik Przybysz <
> > > alien11689@apache.org>:
> > >
> > > > Hi,
> > > > we have a problem with Blueprint in newest Karaf versions. We try to
> > > > upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we
> > have
> > > a
> > > > strange situation during application startup. Bundles await for
> Config
> > > > Admin startup (opinion based on logs), but after that, sometimes our
> CM
> > > > Properties are injected empty. This is nondeterministic - sometimes
> > > > injection works fine, sometimes not. It looks like some kind of the
> > race
> > > > between threads. On 4.0.4 everything seems to work fine.
> > > >
> > > > Steps to reproduce:
> > > > 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin,
> > > including
> > > > a few apps using CM Properties.
> > > > 2. Start you distribution.
> > > > 3. Log injected properties.
> > > > 4. Observe that the properties are sometimes empty (after the bundle
> > > > restart everything is correct).
> > > >
> > > > Apache Karaf (4.0.4)
> > > >
> > > > karaf@root()> list -t 0 | grep -i blueprint
> > > > 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
> > > > 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
> > > > 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core,
> > Fragments:
> > > 14
> > > > 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core
> > Compatiblity
> > > > Fragment Bundle, Hosts: 13
> > > > 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
> > > > 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
> > > > 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
> > > > BlueprintStateService
> > > > 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer ::
> Blueprint
> > > > 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint ::
> > > > Config
> > > >
> > > >
> > > > Apache Karaf (4.2.2)
> > > >
> > > > karaf@root()> list -t 0 | grep -i blueprint
> > > >  76 ? Active   ?  20 ? 1.0.1                                     ?
> > Apache
> > > > Aries Blueprint API
> > > >  77 ? Active   ?  20 ? 1.3.1                                     ?
> > Apache
> > > > Aries Blueprint CM
> > > >  78 ? Active   ?  20 ? 1.10.1                                    ?
> > Apache
> > > > Aries Blueprint Core, Fragments: 79
> > > >  79 ? Resolved ?  20 ? 1.0.0                                     ?
> > Apache
> > > > Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
> > > >  80 ? Active   ?  30 ? 1.2.0                                     ?
> > Apache
> > > > Aries JMX Blueprint API
> > > >  81 ? Active   ?  30 ? 1.2.0                                     ?
> > Apache
> > > > Aries JMX Blueprint Core
> > > >  84 ? Active   ?  80 ? 1.0.2                                     ?
> > Apache
> > > > Aries Transaction Blueprint
> > > > 132 ? Active   ?  30 ? 4.2.2                                     ?
> > Apache
> > > > Karaf :: Bundle :: BlueprintStateService
> > > > 133 ? Active   ?  24 ? 4.2.2                                     ?
> > Apache
> > > > Karaf :: Deployer :: Blueprint
> > > > 137 ? Active   ?  30 ? 4.2.2                                     ?
> > Apache
> > > > Karaf :: JAAS :: Blueprint :: Config
> > > >
> > > > What could be a source of problem? Is there any workaround for that?
> > > >
> > >
> > >
> > > --
> > > --
> > > Christian Schneider
> > > http://www.liquid-reality.de
> > >
> > > Computer Scientist
> > > http://www.adobe.com
> > >
> >
> >
> > --
> > Pozdrawiam / Regards,
> > Dominik Przybysz
> >
>


-- 
Pozdrawiam / Regards,
Dominik Przybysz

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Dominik Przybysz <al...@gmail.com>.
We had this problem when we had only cm-properties, so we started to add
placeholder. And it works fine in karaf 2.x and 4.0.4, but it doesn't work
in 4.2.2/3

śr., 13 lut 2019 o 15:18 Grzegorz Grzybek <gr...@gmail.com> napisał(a):

> Hello
>
> Do you really need both? I vaguely remember that the race was with
> property-placeholder, but not with cm-properties (or vice versa - sorry,
> can't check now).
>
> regards
> Grzegorz Grzybek
>
> śr., 13 lut 2019 o 14:57 Dominik Przybysz <al...@gmail.com>
> napisał(a):
>
> > The problem is that we always have reloading for the configuration in our
> > blueprint xmls and we always generate both cm-properties and
> > property-placeholder, e.g.
> >
> > <property-placeholder xmlns="
> > http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0"
> > persistent-id="properties1" update-strategy="reload"/>
> > <cm-properties xmlns="
> > http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0"
> > id="properties1" persistent-id="properties1" update="true"/>
> >
> > śr., 13 lut 2019 o 14:37 Christian Schneider <ch...@die-schneider.net>
> > napisał(a):
> >
> > > I think generally this can always happen.
> > >
> > > I usually use update-strategy="reload" to make sure the new config is
> > > applied.
> > >
> > > See
> > >
> > >
> >
> https://github.com/cschneider/Karaf-Tutorial/blob/bf7c69efee2a49422106820a52e9a7ec24131bc3/configadmin/configapp-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml#L9
> > >
> > > Christian
> > >
> > > Am Mi., 13. Feb. 2019 um 14:11 Uhr schrieb Dominik Przybysz <
> > > alien11689@apache.org>:
> > >
> > > > Hi,
> > > > we have a problem with Blueprint in newest Karaf versions. We try to
> > > > upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we
> > have
> > > a
> > > > strange situation during application startup. Bundles await for
> Config
> > > > Admin startup (opinion based on logs), but after that, sometimes our
> CM
> > > > Properties are injected empty. This is nondeterministic - sometimes
> > > > injection works fine, sometimes not. It looks like some kind of the
> > race
> > > > between threads. On 4.0.4 everything seems to work fine.
> > > >
> > > > Steps to reproduce:
> > > > 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin,
> > > including
> > > > a few apps using CM Properties.
> > > > 2. Start you distribution.
> > > > 3. Log injected properties.
> > > > 4. Observe that the properties are sometimes empty (after the bundle
> > > > restart everything is correct).
> > > >
> > > > Apache Karaf (4.0.4)
> > > >
> > > > karaf@root()> list -t 0 | grep -i blueprint
> > > > 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
> > > > 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
> > > > 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core,
> > Fragments:
> > > 14
> > > > 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core
> > Compatiblity
> > > > Fragment Bundle, Hosts: 13
> > > > 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
> > > > 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
> > > > 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
> > > > BlueprintStateService
> > > > 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer ::
> Blueprint
> > > > 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint ::
> > > > Config
> > > >
> > > >
> > > > Apache Karaf (4.2.2)
> > > >
> > > > karaf@root()> list -t 0 | grep -i blueprint
> > > >  76 ? Active   ?  20 ? 1.0.1                                     ?
> > Apache
> > > > Aries Blueprint API
> > > >  77 ? Active   ?  20 ? 1.3.1                                     ?
> > Apache
> > > > Aries Blueprint CM
> > > >  78 ? Active   ?  20 ? 1.10.1                                    ?
> > Apache
> > > > Aries Blueprint Core, Fragments: 79
> > > >  79 ? Resolved ?  20 ? 1.0.0                                     ?
> > Apache
> > > > Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
> > > >  80 ? Active   ?  30 ? 1.2.0                                     ?
> > Apache
> > > > Aries JMX Blueprint API
> > > >  81 ? Active   ?  30 ? 1.2.0                                     ?
> > Apache
> > > > Aries JMX Blueprint Core
> > > >  84 ? Active   ?  80 ? 1.0.2                                     ?
> > Apache
> > > > Aries Transaction Blueprint
> > > > 132 ? Active   ?  30 ? 4.2.2                                     ?
> > Apache
> > > > Karaf :: Bundle :: BlueprintStateService
> > > > 133 ? Active   ?  24 ? 4.2.2                                     ?
> > Apache
> > > > Karaf :: Deployer :: Blueprint
> > > > 137 ? Active   ?  30 ? 4.2.2                                     ?
> > Apache
> > > > Karaf :: JAAS :: Blueprint :: Config
> > > >
> > > > What could be a source of problem? Is there any workaround for that?
> > > >
> > >
> > >
> > > --
> > > --
> > > Christian Schneider
> > > http://www.liquid-reality.de
> > >
> > > Computer Scientist
> > > http://www.adobe.com
> > >
> >
> >
> > --
> > Pozdrawiam / Regards,
> > Dominik Przybysz
> >
>


-- 
Pozdrawiam / Regards,
Dominik Przybysz

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Grzegorz Grzybek <gr...@gmail.com>.
Hello

Do you really need both? I vaguely remember that the race was with
property-placeholder, but not with cm-properties (or vice versa - sorry,
can't check now).

regards
Grzegorz Grzybek

śr., 13 lut 2019 o 14:57 Dominik Przybysz <al...@gmail.com> napisał(a):

> The problem is that we always have reloading for the configuration in our
> blueprint xmls and we always generate both cm-properties and
> property-placeholder, e.g.
>
> <property-placeholder xmlns="
> http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0"
> persistent-id="properties1" update-strategy="reload"/>
> <cm-properties xmlns="
> http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0"
> id="properties1" persistent-id="properties1" update="true"/>
>
> śr., 13 lut 2019 o 14:37 Christian Schneider <ch...@die-schneider.net>
> napisał(a):
>
> > I think generally this can always happen.
> >
> > I usually use update-strategy="reload" to make sure the new config is
> > applied.
> >
> > See
> >
> >
> https://github.com/cschneider/Karaf-Tutorial/blob/bf7c69efee2a49422106820a52e9a7ec24131bc3/configadmin/configapp-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml#L9
> >
> > Christian
> >
> > Am Mi., 13. Feb. 2019 um 14:11 Uhr schrieb Dominik Przybysz <
> > alien11689@apache.org>:
> >
> > > Hi,
> > > we have a problem with Blueprint in newest Karaf versions. We try to
> > > upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we
> have
> > a
> > > strange situation during application startup. Bundles await for Config
> > > Admin startup (opinion based on logs), but after that, sometimes our CM
> > > Properties are injected empty. This is nondeterministic - sometimes
> > > injection works fine, sometimes not. It looks like some kind of the
> race
> > > between threads. On 4.0.4 everything seems to work fine.
> > >
> > > Steps to reproduce:
> > > 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin,
> > including
> > > a few apps using CM Properties.
> > > 2. Start you distribution.
> > > 3. Log injected properties.
> > > 4. Observe that the properties are sometimes empty (after the bundle
> > > restart everything is correct).
> > >
> > > Apache Karaf (4.0.4)
> > >
> > > karaf@root()> list -t 0 | grep -i blueprint
> > > 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
> > > 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
> > > 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core,
> Fragments:
> > 14
> > > 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core
> Compatiblity
> > > Fragment Bundle, Hosts: 13
> > > 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
> > > 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
> > > 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
> > > BlueprintStateService
> > > 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer :: Blueprint
> > > 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint ::
> > > Config
> > >
> > >
> > > Apache Karaf (4.2.2)
> > >
> > > karaf@root()> list -t 0 | grep -i blueprint
> > >  76 ? Active   ?  20 ? 1.0.1                                     ?
> Apache
> > > Aries Blueprint API
> > >  77 ? Active   ?  20 ? 1.3.1                                     ?
> Apache
> > > Aries Blueprint CM
> > >  78 ? Active   ?  20 ? 1.10.1                                    ?
> Apache
> > > Aries Blueprint Core, Fragments: 79
> > >  79 ? Resolved ?  20 ? 1.0.0                                     ?
> Apache
> > > Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
> > >  80 ? Active   ?  30 ? 1.2.0                                     ?
> Apache
> > > Aries JMX Blueprint API
> > >  81 ? Active   ?  30 ? 1.2.0                                     ?
> Apache
> > > Aries JMX Blueprint Core
> > >  84 ? Active   ?  80 ? 1.0.2                                     ?
> Apache
> > > Aries Transaction Blueprint
> > > 132 ? Active   ?  30 ? 4.2.2                                     ?
> Apache
> > > Karaf :: Bundle :: BlueprintStateService
> > > 133 ? Active   ?  24 ? 4.2.2                                     ?
> Apache
> > > Karaf :: Deployer :: Blueprint
> > > 137 ? Active   ?  30 ? 4.2.2                                     ?
> Apache
> > > Karaf :: JAAS :: Blueprint :: Config
> > >
> > > What could be a source of problem? Is there any workaround for that?
> > >
> >
> >
> > --
> > --
> > Christian Schneider
> > http://www.liquid-reality.de
> >
> > Computer Scientist
> > http://www.adobe.com
> >
>
>
> --
> Pozdrawiam / Regards,
> Dominik Przybysz
>

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Grzegorz Grzybek <gr...@gmail.com>.
Hello

Do you really need both? I vaguely remember that the race was with
property-placeholder, but not with cm-properties (or vice versa - sorry,
can't check now).

regards
Grzegorz Grzybek

śr., 13 lut 2019 o 14:57 Dominik Przybysz <al...@gmail.com> napisał(a):

> The problem is that we always have reloading for the configuration in our
> blueprint xmls and we always generate both cm-properties and
> property-placeholder, e.g.
>
> <property-placeholder xmlns="
> http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0"
> persistent-id="properties1" update-strategy="reload"/>
> <cm-properties xmlns="
> http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0"
> id="properties1" persistent-id="properties1" update="true"/>
>
> śr., 13 lut 2019 o 14:37 Christian Schneider <ch...@die-schneider.net>
> napisał(a):
>
> > I think generally this can always happen.
> >
> > I usually use update-strategy="reload" to make sure the new config is
> > applied.
> >
> > See
> >
> >
> https://github.com/cschneider/Karaf-Tutorial/blob/bf7c69efee2a49422106820a52e9a7ec24131bc3/configadmin/configapp-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml#L9
> >
> > Christian
> >
> > Am Mi., 13. Feb. 2019 um 14:11 Uhr schrieb Dominik Przybysz <
> > alien11689@apache.org>:
> >
> > > Hi,
> > > we have a problem with Blueprint in newest Karaf versions. We try to
> > > upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we
> have
> > a
> > > strange situation during application startup. Bundles await for Config
> > > Admin startup (opinion based on logs), but after that, sometimes our CM
> > > Properties are injected empty. This is nondeterministic - sometimes
> > > injection works fine, sometimes not. It looks like some kind of the
> race
> > > between threads. On 4.0.4 everything seems to work fine.
> > >
> > > Steps to reproduce:
> > > 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin,
> > including
> > > a few apps using CM Properties.
> > > 2. Start you distribution.
> > > 3. Log injected properties.
> > > 4. Observe that the properties are sometimes empty (after the bundle
> > > restart everything is correct).
> > >
> > > Apache Karaf (4.0.4)
> > >
> > > karaf@root()> list -t 0 | grep -i blueprint
> > > 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
> > > 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
> > > 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core,
> Fragments:
> > 14
> > > 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core
> Compatiblity
> > > Fragment Bundle, Hosts: 13
> > > 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
> > > 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
> > > 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
> > > BlueprintStateService
> > > 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer :: Blueprint
> > > 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint ::
> > > Config
> > >
> > >
> > > Apache Karaf (4.2.2)
> > >
> > > karaf@root()> list -t 0 | grep -i blueprint
> > >  76 ? Active   ?  20 ? 1.0.1                                     ?
> Apache
> > > Aries Blueprint API
> > >  77 ? Active   ?  20 ? 1.3.1                                     ?
> Apache
> > > Aries Blueprint CM
> > >  78 ? Active   ?  20 ? 1.10.1                                    ?
> Apache
> > > Aries Blueprint Core, Fragments: 79
> > >  79 ? Resolved ?  20 ? 1.0.0                                     ?
> Apache
> > > Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
> > >  80 ? Active   ?  30 ? 1.2.0                                     ?
> Apache
> > > Aries JMX Blueprint API
> > >  81 ? Active   ?  30 ? 1.2.0                                     ?
> Apache
> > > Aries JMX Blueprint Core
> > >  84 ? Active   ?  80 ? 1.0.2                                     ?
> Apache
> > > Aries Transaction Blueprint
> > > 132 ? Active   ?  30 ? 4.2.2                                     ?
> Apache
> > > Karaf :: Bundle :: BlueprintStateService
> > > 133 ? Active   ?  24 ? 4.2.2                                     ?
> Apache
> > > Karaf :: Deployer :: Blueprint
> > > 137 ? Active   ?  30 ? 4.2.2                                     ?
> Apache
> > > Karaf :: JAAS :: Blueprint :: Config
> > >
> > > What could be a source of problem? Is there any workaround for that?
> > >
> >
> >
> > --
> > --
> > Christian Schneider
> > http://www.liquid-reality.de
> >
> > Computer Scientist
> > http://www.adobe.com
> >
>
>
> --
> Pozdrawiam / Regards,
> Dominik Przybysz
>

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Dominik Przybysz <al...@gmail.com>.
The problem is that we always have reloading for the configuration in our
blueprint xmls and we always generate both cm-properties and
property-placeholder, e.g.

<property-placeholder xmlns="
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0"
persistent-id="properties1" update-strategy="reload"/>
<cm-properties xmlns="
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0"
id="properties1" persistent-id="properties1" update="true"/>

śr., 13 lut 2019 o 14:37 Christian Schneider <ch...@die-schneider.net>
napisał(a):

> I think generally this can always happen.
>
> I usually use update-strategy="reload" to make sure the new config is
> applied.
>
> See
>
> https://github.com/cschneider/Karaf-Tutorial/blob/bf7c69efee2a49422106820a52e9a7ec24131bc3/configadmin/configapp-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml#L9
>
> Christian
>
> Am Mi., 13. Feb. 2019 um 14:11 Uhr schrieb Dominik Przybysz <
> alien11689@apache.org>:
>
> > Hi,
> > we have a problem with Blueprint in newest Karaf versions. We try to
> > upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we have
> a
> > strange situation during application startup. Bundles await for Config
> > Admin startup (opinion based on logs), but after that, sometimes our CM
> > Properties are injected empty. This is nondeterministic - sometimes
> > injection works fine, sometimes not. It looks like some kind of the race
> > between threads. On 4.0.4 everything seems to work fine.
> >
> > Steps to reproduce:
> > 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin,
> including
> > a few apps using CM Properties.
> > 2. Start you distribution.
> > 3. Log injected properties.
> > 4. Observe that the properties are sometimes empty (after the bundle
> > restart everything is correct).
> >
> > Apache Karaf (4.0.4)
> >
> > karaf@root()> list -t 0 | grep -i blueprint
> > 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
> > 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
> > 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core, Fragments:
> 14
> > 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core Compatiblity
> > Fragment Bundle, Hosts: 13
> > 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
> > 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
> > 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
> > BlueprintStateService
> > 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer :: Blueprint
> > 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint ::
> > Config
> >
> >
> > Apache Karaf (4.2.2)
> >
> > karaf@root()> list -t 0 | grep -i blueprint
> >  76 ? Active   ?  20 ? 1.0.1                                     ? Apache
> > Aries Blueprint API
> >  77 ? Active   ?  20 ? 1.3.1                                     ? Apache
> > Aries Blueprint CM
> >  78 ? Active   ?  20 ? 1.10.1                                    ? Apache
> > Aries Blueprint Core, Fragments: 79
> >  79 ? Resolved ?  20 ? 1.0.0                                     ? Apache
> > Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
> >  80 ? Active   ?  30 ? 1.2.0                                     ? Apache
> > Aries JMX Blueprint API
> >  81 ? Active   ?  30 ? 1.2.0                                     ? Apache
> > Aries JMX Blueprint Core
> >  84 ? Active   ?  80 ? 1.0.2                                     ? Apache
> > Aries Transaction Blueprint
> > 132 ? Active   ?  30 ? 4.2.2                                     ? Apache
> > Karaf :: Bundle :: BlueprintStateService
> > 133 ? Active   ?  24 ? 4.2.2                                     ? Apache
> > Karaf :: Deployer :: Blueprint
> > 137 ? Active   ?  30 ? 4.2.2                                     ? Apache
> > Karaf :: JAAS :: Blueprint :: Config
> >
> > What could be a source of problem? Is there any workaround for that?
> >
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Computer Scientist
> http://www.adobe.com
>


-- 
Pozdrawiam / Regards,
Dominik Przybysz

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Dominik Przybysz <al...@gmail.com>.
The problem is that we always have reloading for the configuration in our
blueprint xmls and we always generate both cm-properties and
property-placeholder, e.g.

<property-placeholder xmlns="
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0"
persistent-id="properties1" update-strategy="reload"/>
<cm-properties xmlns="
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0"
id="properties1" persistent-id="properties1" update="true"/>

śr., 13 lut 2019 o 14:37 Christian Schneider <ch...@die-schneider.net>
napisał(a):

> I think generally this can always happen.
>
> I usually use update-strategy="reload" to make sure the new config is
> applied.
>
> See
>
> https://github.com/cschneider/Karaf-Tutorial/blob/bf7c69efee2a49422106820a52e9a7ec24131bc3/configadmin/configapp-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml#L9
>
> Christian
>
> Am Mi., 13. Feb. 2019 um 14:11 Uhr schrieb Dominik Przybysz <
> alien11689@apache.org>:
>
> > Hi,
> > we have a problem with Blueprint in newest Karaf versions. We try to
> > upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we have
> a
> > strange situation during application startup. Bundles await for Config
> > Admin startup (opinion based on logs), but after that, sometimes our CM
> > Properties are injected empty. This is nondeterministic - sometimes
> > injection works fine, sometimes not. It looks like some kind of the race
> > between threads. On 4.0.4 everything seems to work fine.
> >
> > Steps to reproduce:
> > 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin,
> including
> > a few apps using CM Properties.
> > 2. Start you distribution.
> > 3. Log injected properties.
> > 4. Observe that the properties are sometimes empty (after the bundle
> > restart everything is correct).
> >
> > Apache Karaf (4.0.4)
> >
> > karaf@root()> list -t 0 | grep -i blueprint
> > 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
> > 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
> > 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core, Fragments:
> 14
> > 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core Compatiblity
> > Fragment Bundle, Hosts: 13
> > 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
> > 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
> > 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
> > BlueprintStateService
> > 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer :: Blueprint
> > 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint ::
> > Config
> >
> >
> > Apache Karaf (4.2.2)
> >
> > karaf@root()> list -t 0 | grep -i blueprint
> >  76 ? Active   ?  20 ? 1.0.1                                     ? Apache
> > Aries Blueprint API
> >  77 ? Active   ?  20 ? 1.3.1                                     ? Apache
> > Aries Blueprint CM
> >  78 ? Active   ?  20 ? 1.10.1                                    ? Apache
> > Aries Blueprint Core, Fragments: 79
> >  79 ? Resolved ?  20 ? 1.0.0                                     ? Apache
> > Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
> >  80 ? Active   ?  30 ? 1.2.0                                     ? Apache
> > Aries JMX Blueprint API
> >  81 ? Active   ?  30 ? 1.2.0                                     ? Apache
> > Aries JMX Blueprint Core
> >  84 ? Active   ?  80 ? 1.0.2                                     ? Apache
> > Aries Transaction Blueprint
> > 132 ? Active   ?  30 ? 4.2.2                                     ? Apache
> > Karaf :: Bundle :: BlueprintStateService
> > 133 ? Active   ?  24 ? 4.2.2                                     ? Apache
> > Karaf :: Deployer :: Blueprint
> > 137 ? Active   ?  30 ? 4.2.2                                     ? Apache
> > Karaf :: JAAS :: Blueprint :: Config
> >
> > What could be a source of problem? Is there any workaround for that?
> >
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Computer Scientist
> http://www.adobe.com
>


-- 
Pozdrawiam / Regards,
Dominik Przybysz

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Christian Schneider <ch...@die-schneider.net>.
I think generally this can always happen.

I usually use update-strategy="reload" to make sure the new config is
applied.

See
https://github.com/cschneider/Karaf-Tutorial/blob/bf7c69efee2a49422106820a52e9a7ec24131bc3/configadmin/configapp-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml#L9

Christian

Am Mi., 13. Feb. 2019 um 14:11 Uhr schrieb Dominik Przybysz <
alien11689@apache.org>:

> Hi,
> we have a problem with Blueprint in newest Karaf versions. We try to
> upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we have a
> strange situation during application startup. Bundles await for Config
> Admin startup (opinion based on logs), but after that, sometimes our CM
> Properties are injected empty. This is nondeterministic - sometimes
> injection works fine, sometimes not. It looks like some kind of the race
> between threads. On 4.0.4 everything seems to work fine.
>
> Steps to reproduce:
> 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin, including
> a few apps using CM Properties.
> 2. Start you distribution.
> 3. Log injected properties.
> 4. Observe that the properties are sometimes empty (after the bundle
> restart everything is correct).
>
> Apache Karaf (4.0.4)
>
> karaf@root()> list -t 0 | grep -i blueprint
> 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
> 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
> 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core, Fragments: 14
> 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core Compatiblity
> Fragment Bundle, Hosts: 13
> 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
> 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
> 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
> BlueprintStateService
> 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer :: Blueprint
> 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint ::
> Config
>
>
> Apache Karaf (4.2.2)
>
> karaf@root()> list -t 0 | grep -i blueprint
>  76 ? Active   ?  20 ? 1.0.1                                     ? Apache
> Aries Blueprint API
>  77 ? Active   ?  20 ? 1.3.1                                     ? Apache
> Aries Blueprint CM
>  78 ? Active   ?  20 ? 1.10.1                                    ? Apache
> Aries Blueprint Core, Fragments: 79
>  79 ? Resolved ?  20 ? 1.0.0                                     ? Apache
> Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
>  80 ? Active   ?  30 ? 1.2.0                                     ? Apache
> Aries JMX Blueprint API
>  81 ? Active   ?  30 ? 1.2.0                                     ? Apache
> Aries JMX Blueprint Core
>  84 ? Active   ?  80 ? 1.0.2                                     ? Apache
> Aries Transaction Blueprint
> 132 ? Active   ?  30 ? 4.2.2                                     ? Apache
> Karaf :: Bundle :: BlueprintStateService
> 133 ? Active   ?  24 ? 4.2.2                                     ? Apache
> Karaf :: Deployer :: Blueprint
> 137 ? Active   ?  30 ? 4.2.2                                     ? Apache
> Karaf :: JAAS :: Blueprint :: Config
>
> What could be a source of problem? Is there any workaround for that?
>


-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

It's normal, and I bet it was the case before.

Depending how you create the config, it can be created empty (no
property first) and updated later.

You should use managed factory (so update reload in blueprint) to be up
to date.

I also notified it's especially true with cm:properties (instead of
property placeholder).

Are you using cm:properties ?

Regards
JB

On 13/02/2019 14:10, Dominik Przybysz wrote:
> Hi,
> we have a problem with Blueprint in newest Karaf versions. We try to
> upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we have a
> strange situation during application startup. Bundles await for Config
> Admin startup (opinion based on logs), but after that, sometimes our CM
> Properties are injected empty. This is nondeterministic - sometimes
> injection works fine, sometimes not. It looks like some kind of the race
> between threads. On 4.0.4 everything seems to work fine.
> 
> Steps to reproduce:
> 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin, including
> a few apps using CM Properties.
> 2. Start you distribution.
> 3. Log injected properties.
> 4. Observe that the properties are sometimes empty (after the bundle
> restart everything is correct).
> 
> Apache Karaf (4.0.4)
> 
> karaf@root()> list -t 0 | grep -i blueprint
> 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
> 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
> 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core, Fragments: 14
> 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core Compatiblity
> Fragment Bundle, Hosts: 13
> 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
> 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
> 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
> BlueprintStateService
> 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer :: Blueprint
> 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint :: Config
> 
> 
> Apache Karaf (4.2.2)
> 
> karaf@root()> list -t 0 | grep -i blueprint
>  76 ? Active   ?  20 ? 1.0.1                                     ? Apache
> Aries Blueprint API
>  77 ? Active   ?  20 ? 1.3.1                                     ? Apache
> Aries Blueprint CM
>  78 ? Active   ?  20 ? 1.10.1                                    ? Apache
> Aries Blueprint Core, Fragments: 79
>  79 ? Resolved ?  20 ? 1.0.0                                     ? Apache
> Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
>  80 ? Active   ?  30 ? 1.2.0                                     ? Apache
> Aries JMX Blueprint API
>  81 ? Active   ?  30 ? 1.2.0                                     ? Apache
> Aries JMX Blueprint Core
>  84 ? Active   ?  80 ? 1.0.2                                     ? Apache
> Aries Transaction Blueprint
> 132 ? Active   ?  30 ? 4.2.2                                     ? Apache
> Karaf :: Bundle :: BlueprintStateService
> 133 ? Active   ?  24 ? 4.2.2                                     ? Apache
> Karaf :: Deployer :: Blueprint
> 137 ? Active   ?  30 ? 4.2.2                                     ? Apache
> Karaf :: JAAS :: Blueprint :: Config
> 
> What could be a source of problem? Is there any workaround for that?
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Problem with the newest blueprint in karaf 4.2.x

Posted by Christian Schneider <ch...@die-schneider.net>.
I think generally this can always happen.

I usually use update-strategy="reload" to make sure the new config is
applied.

See
https://github.com/cschneider/Karaf-Tutorial/blob/bf7c69efee2a49422106820a52e9a7ec24131bc3/configadmin/configapp-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml#L9

Christian

Am Mi., 13. Feb. 2019 um 14:11 Uhr schrieb Dominik Przybysz <
alien11689@apache.org>:

> Hi,
> we have a problem with Blueprint in newest Karaf versions. We try to
> upgrade Karaf from version 4.0.4 to 4.2.2/4.2.3. As we do that, we have a
> strange situation during application startup. Bundles await for Config
> Admin startup (opinion based on logs), but after that, sometimes our CM
> Properties are injected empty. This is nondeterministic - sometimes
> injection works fine, sometimes not. It looks like some kind of the race
> between threads. On 4.0.4 everything seems to work fine.
>
> Steps to reproduce:
> 1. Build Karaf 4.2.2/4.2.3 distribution using karaf-maven-plugin, including
> a few apps using CM Properties.
> 2. Start you distribution.
> 3. Log injected properties.
> 4. Observe that the properties are sometimes empty (after the bundle
> restart everything is correct).
>
> Apache Karaf (4.0.4)
>
> karaf@root()> list -t 0 | grep -i blueprint
> 11 | Active   |  20 | 1.0.1    | Apache Aries Blueprint API
> 12 | Active   |  20 | 1.0.7    | Apache Aries Blueprint CM
> 13 | Active   |  20 | 1.5.0    | Apache Aries Blueprint Core, Fragments: 14
> 14 | Resolved |  20 | 1.0.0    | Apache Aries Blueprint Core Compatiblity
> Fragment Bundle, Hosts: 13
> 16 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint API
> 17 | Active   |  30 | 1.1.5    | Apache Aries JMX Blueprint Core
> 23 | Active   |  30 | 4.0.4    | Apache Karaf :: Bundle ::
> BlueprintStateService
> 26 | Active   |  24 | 4.0.4    | Apache Karaf :: Deployer :: Blueprint
> 33 | Active   |  30 | 4.0.4    | Apache Karaf :: JAAS :: Blueprint ::
> Config
>
>
> Apache Karaf (4.2.2)
>
> karaf@root()> list -t 0 | grep -i blueprint
>  76 ? Active   ?  20 ? 1.0.1                                     ? Apache
> Aries Blueprint API
>  77 ? Active   ?  20 ? 1.3.1                                     ? Apache
> Aries Blueprint CM
>  78 ? Active   ?  20 ? 1.10.1                                    ? Apache
> Aries Blueprint Core, Fragments: 79
>  79 ? Resolved ?  20 ? 1.0.0                                     ? Apache
> Aries Blueprint Core Compatiblity Fragment Bundle, Hosts: 78
>  80 ? Active   ?  30 ? 1.2.0                                     ? Apache
> Aries JMX Blueprint API
>  81 ? Active   ?  30 ? 1.2.0                                     ? Apache
> Aries JMX Blueprint Core
>  84 ? Active   ?  80 ? 1.0.2                                     ? Apache
> Aries Transaction Blueprint
> 132 ? Active   ?  30 ? 4.2.2                                     ? Apache
> Karaf :: Bundle :: BlueprintStateService
> 133 ? Active   ?  24 ? 4.2.2                                     ? Apache
> Karaf :: Deployer :: Blueprint
> 137 ? Active   ?  30 ? 4.2.2                                     ? Apache
> Karaf :: JAAS :: Blueprint :: Config
>
> What could be a source of problem? Is there any workaround for that?
>


-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com