GitHub user sjcorbett opened a pull request:
https://github.com/apache/incubator-brooklyn/pull/1043
Allows ScheduledTasks to be resubmitted even when the task throws an
exception.
I had to spend some time last week debugging an entity that was
mysteriously on fire even though its driver's `isRunning` method returned true
(verified via Groovy console).
After some log searching I realised that roughly the following scenario had
transpired:
* Entity running
* Network connectivity began affecting Brooklyn VM. Several entities were
on fire.
* One entity's SoftwareProcessImpl.serviceProcessIsRunning feed SSHed to
its VM. The SSH task threw an exception because of the network issue.
* The entity's serviceProcessIsRunning feed was cancelled.
* The network problem finished. The entity's status could not recover.
This PR adds a flag to `ScheduledTask` to indicate that its task should be
resubmitted even after throwing an exception. The `Poller` class has been
configured use this flag.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sjcorbett/incubator-brooklyn scheduled-poller
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-brooklyn/pull/1043.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1043
----
commit 4ece7feff521ad260286f6ef7a9f48202ab0df2f
Author: Sam Corbett <[email protected]>
Date: 2015-11-18T12:46:32Z
Trivial doc fix
commit ba313ec4fc720e7a704e25bdc6b67aa21f36d240
Author: Sam Corbett <[email protected]>
Date: 2015-11-18T12:46:56Z
Closing ] in jquery selector
commit abe1bf3e51f73a2896be13a1e88a66bab36bfd99
Author: Sam Corbett <[email protected]>
Date: 2015-11-18T12:47:44Z
Adds cancelOnException to ScheduledTask
commit c0da7603fb8e9580fb339a742d9e855bf619a840
Author: Sam Corbett <[email protected]>
Date: 2015-11-18T14:36:32Z
Pollers set cancelOnException=false when scheduling tasks
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---