stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nirmal Fernando <nirmal070...@gmail.com>
Subject Re: autoscaling is ignoring partiionMax
Date Thu, 29 May 2014 06:42:48 GMT
Ah.. probably Chris. So, in min check what happens is it always make sure
that you have min instance count in the system.


On Thu, May 29, 2014 at 11:42 AM, chris snow <chsnow123@gmail.com> wrote:

> Hi Nirmal,
>
> I've just see that it is the "Minimal Rule" in mincheck.drl that is
> trying to spawn the instance, and not scaling.drl.
>
> This is why  AutoscaleAlgorithm.getNextScaleUpPartition() is not getting
> called?
>
> Cheers,
>
> Chris
>
>
> On Wed, May 28, 2014 at 11:24 PM, Nirmal Fernando
> <nirmal070125@gmail.com> wrote:
> > No, Chris. This happens via Drools rules located in scaling.drl file of
> conf
> > directory.
> >
> >
> > On Thu, May 29, 2014 at 3:39 AM, chris snow <chsnow123@gmail.com> wrote:
> >>
> >> Hi Nirmal,
> >>
> >> For some reason, that method is not getting called.  I've pasted my
> >> stacktrace again with the drools methods removed:
> >>
> >> ---
> >> Daemon Thread [Thread-56] (Suspended (breakpoint at line 137 in
> >> CloudControllerClient))
> >> owns: CloudControllerClient  (id=2433)
> >> owns: DefaultAgenda  (id=2434)
> >>    CloudControllerClient.spawnAnInstance(Partition, String, String,
> >> String) line: 137
> >>    RuleTasksDelegator.delegateSpawn(PartitionContext, String, String)
> >> line: 92
> >>    //
> >>    // drools methods hidden
> >>    //
> >>    AutoscalerRuleEvaluator.evaluateMinCheck(StatefulKnowledgeSession,
> >> FactHandle, Object) line: 86
> >>    ClusterMonitor.monitor() line: 99
> >>    ClusterMonitor.run() line: 72
> >>    Thread.run() line: 744
> >> ---
> >>
> >> Would you expect to see AutoscaleAlgorithm.getNextScaleUpPartition
> >> executed somewhere in the stack of calls?
> >>
> >> Many thanks,
> >>
> >> Chris
> >>
> >> On Wed, May 28, 2014 at 11:03 PM, Nirmal Fernando
> >> <nirmal070125@gmail.com> wrote:
> >> > Hi Chris,
> >> >
> >> > PartitionMax is considered in
> AutoscaleAlgorithm.getNextScaleUpPartition
> >> > method.
> >> >
> >> >
> >> > On Thu, May 29, 2014 at 3:09 AM, chris snow <chsnow123@gmail.com>
> wrote:
> >> >>
> >> >> I setup a breakpoint in eclipse at
> >> >> CloudControllerClient.spawnAnInstance() and dumped the output
> (below).
> >> >>
> >> >> I've scanned through the code in the stratos methods in the
> >> >> stacktrace, but couldn't see any code that checks the partitionMax
> >> >> value.
> >> >>
> >> >> Any ideas?
> >> >>
> >> >> Daemon Thread [Thread-56] (Suspended (breakpoint at line 137 in
> >> >> CloudControllerClient))
> >> >> owns: CloudControllerClient  (id=2433)
> >> >> owns: DefaultAgenda  (id=2434)
> >> >>    CloudControllerClient.spawnAnInstance(Partition, String, String,
> >> >> String) line: 137
> >> >>    RuleTasksDelegator.delegateSpawn(PartitionContext, String, String)
> >> >> line: 92
> >> >>    NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line:
> >> >> not available [native method]
> >> >>    NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57
> >> >>    DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43
> >> >>    Method.invoke(Object, Object...) line: 606
> >> >>    ReflectiveAccessorOptimizer.getMethod(Object, String, Object[],
> >> >> Class[], ExecutableStatement[]) line: 1104
> >> >>    ReflectiveAccessorOptimizer.getMethod(Object, String) line: 987
> >> >>    ReflectiveAccessorOptimizer.compileGetChain() line: 377
> >> >>    ReflectiveAccessorOptimizer.optimizeAccessor(ParserContext,
> char[],
> >> >> int, int, Object, Object, VariableResolverFactory, boolean, Class)
> >> >> line: 143
> >> >>    ASTNode.optimize(Object, Object, VariableResolverFactory) line:
> 159
> >> >>    ASTNode.getReducedValueAccelerated(Object, Object,
> >> >> VariableResolverFactory) line: 115
> >> >>    MVELRuntime.execute(boolean, CompiledExpression, Object,
> >> >> VariableResolverFactory) line: 85
> >> >>    CompiledExpression.getDirectValue(Object, VariableResolverFactory)
> >> >> line: 123
> >> >>    CompiledExpression.getValue(Object, VariableResolverFactory) line:
> >> >> 119
> >> >>    MVEL.executeExpression(Object, Object, VariableResolverFactory)
> >> >> line:
> >> >> 930
> >> >>    MVELConsequence.evaluate(KnowledgeHelper, WorkingMemory) line: 104
> >> >>    DefaultAgenda.fireActivation(Activation) line: 1287
> >> >>    DefaultAgenda.fireNextItem(AgendaFilter) line: 1221
> >> >>    DefaultAgenda.fireAllRules(AgendaFilter, int) line: 1456
> >> >>
> >> >>
> ReteooStatefulSession(AbstractWorkingMemory).fireAllRules(AgendaFilter,
> >> >> int) line: 710
> >> >>    ReteooStatefulSession(AbstractWorkingMemory).fireAllRules() line:
> >> >> 674
> >> >>    StatefulKnowledgeSessionImpl.fireAllRules() line: 230
> >> >>    AutoscalerRuleEvaluator.evaluateMinCheck(StatefulKnowledgeSession,
> >> >> FactHandle, Object) line: 86
> >> >>    ClusterMonitor.monitor() line: 99
> >> >>    ClusterMonitor.run() line: 72
> >> >>    Thread.run() line: 744
> >> >>
> >> >> On Wed, May 28, 2014 at 3:37 AM, Lahiru Sandaruwan <lahirus@wso2.com
> >
> >> >> wrote:
> >> >> >
> >> >> >
> >> >> >
> >> >> > On Tue, May 27, 2014 at 11:54 PM, chris snow <chsnow123@gmail.com>
> >> >> > wrote:
> >> >> >>
> >> >> >> Hi Lahiru,
> >> >> >>
> >> >> >> I'll have a poke around - it will give me a good opportunity
to
> >> >> >> learn
> >> >> >> some more Stratos code :)
> >> >> >>
> >> >> >
> >> >> > Cool :)
> >> >> >
> >> >> > Debug logs should be able to show us where it went wrong.
> >> >> >
> >> >> > Thanks.
> >> >> >>
> >> >> >> Many thanks,
> >> >> >>
> >> >> >> Chris
> >> >> >>
> >> >> >> On Tue, May 27, 2014 at 7:45 AM, Lahiru Sandaruwan
> >> >> >> <lahirus@wso2.com>
> >> >> >> wrote:
> >> >> >> > Hi Chris,
> >> >> >> >
> >> >> >> > Can you enable debug logs and try out?
> >> >> >> > If so please send them over.
> >> >> >> >
> >> >> >> > Thanks.
> >> >> >> >
> >> >> >> >
> >> >> >> > On Tue, May 27, 2014 at 12:05 PM, chris snow <
> chsnow123@gmail.com>
> >> >> >> > wrote:
> >> >> >> >>
> >> >> >> >> Deployment Policy partitionMax seems to be ignored.
 My
> >> >> >> >> deployment
> >> >> >> >> policy looks like this:
> >> >> >> >>
> >> >> >> >> {
> >> >> >> >>   "id": "economyDeployment",
> >> >> >> >>   "partitionGroup": [
> >> >> >> >>     {
> >> >> >> >>       "id": "G1",
> >> >> >> >>       "partitionAlgo": "one-after-another",
> >> >> >> >>       "partition": [
> >> >> >> >>         {
> >> >> >> >>           "id": "P1",
> >> >> >> >>           "partitionMax": "1",
> >> >> >> >>           "partitionMin": "1"
> >> >> >> >>         }
> >> >> >> >>       ]
> >> >> >> >>     }
> >> >> >> >>   ]
> >> >> >> >> }
> >> >> >> >>
> >> >> >> >> Stratos initially starts two instances:
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> +--------------------------------------+---------------+--------+------------+-------------+--------------------+
> >> >> >> >> | ID                                   | Name   
      |
> Status |
> >> >> >> >> Task
> >> >> >> >> State | Power State | Networks           |
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> +--------------------------------------+---------------+--------+------------+-------------+--------------------+
> >> >> >> >> | c91eddd7-f2d5-49e5-b602-fde5df38e16d | php111php-9f6
|
> ACTIVE |
> >> >> >> >> -
> >> >> >> >>       | Running     | private=10.11.12.2 |
> >> >> >> >> | b38536d2-bc9e-4ab2-984c-bc3f2091947f | php111php-a05
|
> ACTIVE |
> >> >> >> >> -
> >> >> >> >>       | Running     | private=10.11.12.3 |
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> +--------------------------------------+---------------+--------+------------+-------------+--------------------+
> >> >> >> >> Then attempts to start more:
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> +--------------------------------------+---------------+--------+------------+-------------+--------------------+
> >> >> >> >> | ID                                   | Name   
      |
> Status |
> >> >> >> >> Task
> >> >> >> >> State | Power State | Networks           |
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> +--------------------------------------+---------------+--------+------------+-------------+--------------------+
> >> >> >> >> | 91029130-37b5-4df6-ad95-1d9f609a22c3 | php111php-13e
| ERROR
>  |
> >> >> >> >> -
> >> >> >> >>       | NOSTATE     |                    |
> >> >> >> >> | 71c1e361-df55-4f61-84c5-79774fef2beb | php111php-3d7
| ERROR
>  |
> >> >> >> >> -
> >> >> >> >>       | NOSTATE     |                    |
> >> >> >> >> | b0d72602-cdb8-4621-ad12-911ade4d89b1 | php111php-412
| ERROR
>  |
> >> >> >> >> -
> >> >> >> >>       | NOSTATE     |                    |
> >> >> >> >> | d4eac55d-bb7c-48d6-83f2-cb9a11581a18 | php111php-6f5
| ERROR
>  |
> >> >> >> >> -
> >> >> >> >>       | NOSTATE     |                    |
> >> >> >> >> | 738a9534-2b95-4984-a51b-748bc7169b9a | php111php-73e
| ERROR
>  |
> >> >> >> >> -
> >> >> >> >>       | NOSTATE     |                    |
> >> >> >> >> | c91eddd7-f2d5-49e5-b602-fde5df38e16d | php111php-9f6
|
> ACTIVE |
> >> >> >> >> -
> >> >> >> >>       | Running     | private=10.11.12.2 |
> >> >> >> >> | b38536d2-bc9e-4ab2-984c-bc3f2091947f | php111php-a05
|
> ACTIVE |
> >> >> >> >> -
> >> >> >> >>       | Running     | private=10.11.12.3 |
> >> >> >> >> | f570e654-024b-4240-bad2-8a11f04f23f0 | php111php-a30
| ERROR
>  |
> >> >> >> >> -
> >> >> >> >>       | NOSTATE     |                    |
> >> >> >> >> | 0ab36824-9bea-4a95-aa22-7f935406d83d | php111php-bca
| ERROR
>  |
> >> >> >> >> -
> >> >> >> >>       | NOSTATE     |                    |
> >> >> >> >> | 02ed97df-02bc-4bff-b42d-9f2bcbd4f569 | php111php-f6f
| ERROR
>  |
> >> >> >> >> -
> >> >> >> >>       | NOSTATE     |                    |
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> +--------------------------------------+---------------+--------+------------+-------------+--------------------+
> >> >> >> >>
> >> >> >> >> I'm on branch: 4.0.0-incubating, using Openstack
Havana +
> Docker.
> >> >> >> >>
> >> >> >> >> Any ideas?
> >> >> >> >>
> >> >> >> >> Many thanks,
> >> >> >> >>
> >> >> >> >> Chris
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > --
> >> >> >> > --
> >> >> >> > Lahiru Sandaruwan
> >> >> >> > Committer and PMC member, Apache Stratos,
> >> >> >> > Senior Software Engineer,
> >> >> >> > WSO2 Inc., http://wso2.com
> >> >> >> > lean.enterprise.middleware
> >> >> >> >
> >> >> >> > email: lahirus@wso2.com cell: (+94) 773 325 954
> >> >> >> > blog: http://lahiruwrites.blogspot.com/
> >> >> >> > twitter: http://twitter.com/lahirus
> >> >> >> > linked-in:
> http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Check out my professional profile and connect with me on LinkedIn.
> >> >> >> http://lnkd.in/cw5k69
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > --
> >> >> > Lahiru Sandaruwan
> >> >> > Committer and PMC member, Apache Stratos,
> >> >> > Senior Software Engineer,
> >> >> > WSO2 Inc., http://wso2.com
> >> >> > lean.enterprise.middleware
> >> >> >
> >> >> > email: lahirus@wso2.com cell: (+94) 773 325 954
> >> >> > blog: http://lahiruwrites.blogspot.com/
> >> >> > twitter: http://twitter.com/lahirus
> >> >> > linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Check out my professional profile and connect with me on LinkedIn.
> >> >> http://lnkd.in/cw5k69
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > Best Regards,
> >> > Nirmal
> >> >
> >> > Nirmal Fernando.
> >> > PPMC Member & Committer of Apache Stratos,
> >> >
> >> > Senior Software Engineer, WSO2 Inc.
> >> >
> >> > Blog: http://nirmalfdo.blogspot.com/
> >>
> >>
> >>
> >> --
> >> Check out my professional profile and connect with me on LinkedIn.
> >> http://lnkd.in/cw5k69
> >
> >
> >
> >
> > --
> > Best Regards,
> > Nirmal
> >
> > Nirmal Fernando.
> > PPMC Member & Committer of Apache Stratos,
> > Senior Software Engineer, WSO2 Inc.
> >
> > Blog: http://nirmalfdo.blogspot.com/
>
>
>
> --
> Check out my professional profile and connect with me on LinkedIn.
> http://lnkd.in/cw5k69
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Mime
View raw message