Re: More entropy on bundle startup.

2016-07-14 Thread Nick Baker
Thanks Guillaume! This will definitely help us as we find those holding onto 
stale service references.

-Nick

From: Guillaume Nodet <gno...@apache.org>
Reply-To: "user@karaf.apache.org" <user@karaf.apache.org>
Date: Thursday, July 14, 2016 at 3:11 PM
To: user <user@karaf.apache.org>
Subject: Re: More entropy on bundle startup.

Try the load-test command inside the karaf console.  It randomly starts / stop 
/ refresh bundles with multiple threads in loop, so such things are quickly 
seen usually.

2016-07-13 22:56 GMT+02:00 Benson Margulies 
<ben...@basistech.com<mailto:ben...@basistech.com>>:
Folks,

We've had a couple of incidents of latent problems stemming from
invalid assumptions on bundle start order. Everything seems to be
fine, then some trivial change reveals that we've failed to ensure
that service 'a' is available before component 'b' needs it. by and
large, we use DS to get this right, but there are a few cases where it
does not serve.

I am wondering: is there some way to get _more_ randomness out of the
startup process, to shake out mistakes like this?

thanks,
benson



--

Guillaume Nodet

Red Hat, Open Source Integration

Email: gno...@redhat.com<mailto:gno...@redhat.com>
Web: http://fusesource.com<http://fusesource.com/>
Blog: http://gnodet.blogspot.com/



Re: More entropy on bundle startup.

2016-07-14 Thread Guillaume Nodet
Try the load-test command inside the karaf console.  It randomly starts /
stop / refresh bundles with multiple threads in loop, so such things are
quickly seen usually.

2016-07-13 22:56 GMT+02:00 Benson Margulies :

> Folks,
>
> We've had a couple of incidents of latent problems stemming from
> invalid assumptions on bundle start order. Everything seems to be
> fine, then some trivial change reveals that we've failed to ensure
> that service 'a' is available before component 'b' needs it. by and
> large, we use DS to get this right, but there are a few cases where it
> does not serve.
>
> I am wondering: is there some way to get _more_ randomness out of the
> startup process, to shake out mistakes like this?
>
> thanks,
> benson
>



-- 

Guillaume Nodet

Red Hat, Open Source Integration

Email: gno...@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/


Re: More entropy on bundle startup.

2016-07-14 Thread Benson Margulies
We use DS for most of our services, but we have a few down at the
activator level.

I appreciate that the fixes to the bugs involve service tracking. The
problem is _finding_ the bugs.

Yes we use featuresBoot.

featuresBootAsynchronous=false



On Thu, Jul 14, 2016 at 9:56 AM, James Carman
 wrote:
> You are using featuresBoot?  Do you have featuresBootAsynchronous=false in
> your org.apache.karaf.features.cfg file?
>
>
> On Thu, Jul 14, 2016 at 9:33 AM Benson Margulies 
> wrote:
>>
>> I don't think so, no. I do not do any dynamic installation. I use the
>> Maven plugin to make an assembly with all the features I need. I then
>> observe that the startup order is not deterministic from machine to
>> machine, and it is particularly prone to change when I stop and start
>> the container without clearing out the data directory.
>>
>>
>> On Thu, Jul 14, 2016 at 1:39 AM, Jean-Baptiste Onofré 
>> wrote:
>> > Hi Benson,
>> >
>> > I guess you are using the deploy folder, so the fileinstall deployer,
>> > right
>> > ?
>> >
>> > Regards
>> > JB
>> >
>> >
>> > On 07/13/2016 10:56 PM, Benson Margulies wrote:
>> >>
>> >> Folks,
>> >>
>> >> We've had a couple of incidents of latent problems stemming from
>> >> invalid assumptions on bundle start order. Everything seems to be
>> >> fine, then some trivial change reveals that we've failed to ensure
>> >> that service 'a' is available before component 'b' needs it. by and
>> >> large, we use DS to get this right, but there are a few cases where it
>> >> does not serve.
>> >>
>> >> I am wondering: is there some way to get _more_ randomness out of the
>> >> startup process, to shake out mistakes like this?
>> >>
>> >> thanks,
>> >> benson
>> >>
>> >
>> > --
>> > Jean-Baptiste Onofré
>> > jbono...@apache.org
>> > http://blog.nanthrax.net
>> > Talend - http://www.talend.com


Re: More entropy on bundle startup.

2016-07-14 Thread James Carman
You are using featuresBoot?  Do you have featuresBootAsynchronous=false in
your org.apache.karaf.features.cfg file?

On Thu, Jul 14, 2016 at 9:33 AM Benson Margulies 
wrote:

> I don't think so, no. I do not do any dynamic installation. I use the
> Maven plugin to make an assembly with all the features I need. I then
> observe that the startup order is not deterministic from machine to
> machine, and it is particularly prone to change when I stop and start
> the container without clearing out the data directory.
>
>
> On Thu, Jul 14, 2016 at 1:39 AM, Jean-Baptiste Onofré 
> wrote:
> > Hi Benson,
> >
> > I guess you are using the deploy folder, so the fileinstall deployer,
> right
> > ?
> >
> > Regards
> > JB
> >
> >
> > On 07/13/2016 10:56 PM, Benson Margulies wrote:
> >>
> >> Folks,
> >>
> >> We've had a couple of incidents of latent problems stemming from
> >> invalid assumptions on bundle start order. Everything seems to be
> >> fine, then some trivial change reveals that we've failed to ensure
> >> that service 'a' is available before component 'b' needs it. by and
> >> large, we use DS to get this right, but there are a few cases where it
> >> does not serve.
> >>
> >> I am wondering: is there some way to get _more_ randomness out of the
> >> startup process, to shake out mistakes like this?
> >>
> >> thanks,
> >> benson
> >>
> >
> > --
> > Jean-Baptiste Onofré
> > jbono...@apache.org
> > http://blog.nanthrax.net
> > Talend - http://www.talend.com
>


Re: More entropy on bundle startup.

2016-07-14 Thread Scott Carr
What kind of services do you create?  Blueprint, Component, direct 
Activator?


I use Component, and the Component waits for the required components to 
be available and then starts.


I have had issues in the past with badly coded direct Activators not 
starting in the correct order.  I then found that I had to poll 
periodically in the Activator to see if the service was available now.


Components took care of all that.

Now this process means you have to use scr:list to determine that the 
Components did indeed start correctly, but we have monitors in place 
that verifies this for us now.


On 07/14/2016 08:33 AM, Benson Margulies wrote:

I don't think so, no. I do not do any dynamic installation. I use the
Maven plugin to make an assembly with all the features I need. I then
observe that the startup order is not deterministic from machine to
machine, and it is particularly prone to change when I stop and start
the container without clearing out the data directory.


On Thu, Jul 14, 2016 at 1:39 AM, Jean-Baptiste Onofré  wrote:

Hi Benson,

I guess you are using the deploy folder, so the fileinstall deployer, right
?

Regards
JB


On 07/13/2016 10:56 PM, Benson Margulies wrote:

Folks,

We've had a couple of incidents of latent problems stemming from
invalid assumptions on bundle start order. Everything seems to be
fine, then some trivial change reveals that we've failed to ensure
that service 'a' is available before component 'b' needs it. by and
large, we use DS to get this right, but there are a few cases where it
does not serve.

I am wondering: is there some way to get _more_ randomness out of the
startup process, to shake out mistakes like this?

thanks,
benson


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




Re: More entropy on bundle startup.

2016-07-14 Thread Benson Margulies
I don't think so, no. I do not do any dynamic installation. I use the
Maven plugin to make an assembly with all the features I need. I then
observe that the startup order is not deterministic from machine to
machine, and it is particularly prone to change when I stop and start
the container without clearing out the data directory.


On Thu, Jul 14, 2016 at 1:39 AM, Jean-Baptiste Onofré  wrote:
> Hi Benson,
>
> I guess you are using the deploy folder, so the fileinstall deployer, right
> ?
>
> Regards
> JB
>
>
> On 07/13/2016 10:56 PM, Benson Margulies wrote:
>>
>> Folks,
>>
>> We've had a couple of incidents of latent problems stemming from
>> invalid assumptions on bundle start order. Everything seems to be
>> fine, then some trivial change reveals that we've failed to ensure
>> that service 'a' is available before component 'b' needs it. by and
>> large, we use DS to get this right, but there are a few cases where it
>> does not serve.
>>
>> I am wondering: is there some way to get _more_ randomness out of the
>> startup process, to shake out mistakes like this?
>>
>> thanks,
>> benson
>>
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com


Re: More entropy on bundle startup.

2016-07-13 Thread Jean-Baptiste Onofré

Hi Benson,

I guess you are using the deploy folder, so the fileinstall deployer, 
right ?


Regards
JB

On 07/13/2016 10:56 PM, Benson Margulies wrote:

Folks,

We've had a couple of incidents of latent problems stemming from
invalid assumptions on bundle start order. Everything seems to be
fine, then some trivial change reveals that we've failed to ensure
that service 'a' is available before component 'b' needs it. by and
large, we use DS to get this right, but there are a few cases where it
does not serve.

I am wondering: is there some way to get _more_ randomness out of the
startup process, to shake out mistakes like this?

thanks,
benson



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


Re: More entropy on bundle startup.

2016-07-13 Thread Nick Baker
I love this idea! We’ve been fighting the same issues as well.

-Nick

On 7/13/16, 4:56 PM, "Benson Margulies"  wrote:

>Folks,
>
>We've had a couple of incidents of latent problems stemming from
>invalid assumptions on bundle start order. Everything seems to be
>fine, then some trivial change reveals that we've failed to ensure
>that service 'a' is available before component 'b' needs it. by and
>large, we use DS to get this right, but there are a few cases where it
>does not serve.
>
>I am wondering: is there some way to get _more_ randomness out of the
>startup process, to shake out mistakes like this?
>
>thanks,
>benson



More entropy on bundle startup.

2016-07-13 Thread Benson Margulies
Folks,

We've had a couple of incidents of latent problems stemming from
invalid assumptions on bundle start order. Everything seems to be
fine, then some trivial change reveals that we've failed to ensure
that service 'a' is available before component 'b' needs it. by and
large, we use DS to get this right, but there are a few cases where it
does not serve.

I am wondering: is there some way to get _more_ randomness out of the
startup process, to shake out mistakes like this?

thanks,
benson