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

ASF GitHub Bot commented on BROOKLYN-322:
-----------------------------------------

Github user bostko commented on the issue:

    https://github.com/apache/brooklyn-server/pull/286
  
    Looks good to me!


> On rebind, entity temporarily (incorrectly) reports serviceUp=false
> -------------------------------------------------------------------
>
>                 Key: BROOKLYN-322
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-322
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Aled Sage
>
> With Brooklyn 0.10.0-SNAPSHOT (but also with older versions, I presume)...
> When rebinding to many entities, some software processes temporarily show 
> serviceUp=false before going back to showing the correct serviceUp=true.
> The problem is with the polling of their feeds. It starts polling 
> immediately, rather than waiting for the entity to be managed. This can cause 
> some feeds to throw an exception (e.g. when 
> {{SoftwareProcessImpl.connectServiceUpIsRunning}} calls 
> {{driver.isRunning()}}, and that tries to execute an ssh command). The 
> exception causes the feed to set it to whatever value the {{onException}} 
> tells it to use.
> It is more likely to happen when there are many entities, because the 
> entities will be unmanaged for longer.
> The solution is to not poll when the entity is not managed.
> This is a simple fix in ((Poller}}.
> It might cause problems for those trying to use a Poller to poll just once: 
> it might skip that single poll because the entity is unmanaged. I think we 
> can ignore that. I don't know of any use-cases doing that. Also, I suspect 
> that it might be a good thing! On rebind we don't necessarily want to do that 
> single poll again, and when the feed is first registered we'd hope that it is 
> done when the entity is managed (if done in 
> {{SoftwareProcess.connectSensors()}}, but not if done in the entity's init 
> method).
> We could revisit this in the future, so that if the entity is unmanaged (but 
> e think it will soon be managed), then we reschedule it for when the entity 
> is actually managed.



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

Reply via email to