GitHub user ahgittin opened a pull request:
https://github.com/apache/incubator-brooklyn/pull/131
Sensors chained for service up
This implements the use of service not-up indicators and problem
indicators, as discussed on the ML.
See `service-state.md` for docs and `ServiceStateLogicTest` for detailed
explanation and checking of subtleties.
The material differences in behaviour are surprisingly few (though in the
PR you will notice a lot of changes to tests; most test changes are
uninteresting!). The main functional differences, in addition to dynamic
updating, are:
* this removes a lot of ad hoc service-up computations; some quorum up
logic e.g. for mongo, has changed, but this was all quite hokey, we should
replace this with quorum keys in cluster
* this tweaks a recent workaround where AbstractEntity.add{Enricher,Policy}
detects a duplicate, we now take the more recent one rather than the older one;
this allows us to replace them in a principled fashion when using unique tags.
* ServiceFailureDetector is now very different, and extends
ServiceStateLogic (which previously is somewhat duplicated in the very
occasional places it was used); if you were relying on this, or your apps start
acting oddly, please let me know!
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ahgittin/incubator-brooklyn
sensors-chained-for-service-up
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-brooklyn/pull/131.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 #131
----
commit 238fab7f0f520a462175ca88b2a807c081e32145
Author: Alex Heneveld <[email protected]>
Date: 2014-08-06T15:16:23Z
prototype of service_up being derived from service_not_up_indicators
commit 45e3035de648e32487535bf7a8050d5b3926b057
Author: Alex Heneveld <[email protected]>
Date: 2014-08-06T19:38:40Z
add WhenFunctions which allows `Functionals.when(false).value("F")`
approach to building up functions
commit a8bff36ec5cbaaa4c4f10d0adfd464ba8d75b8a7
Author: Alex Heneveld <[email protected]>
Date: 2014-08-06T21:05:41Z
add a new "updatingMap" enricher which helps when multiple enrichers
contribute to a map, and use it for the new chaining of service_up behaviour
commit 141751b9213a28943b90e767349d11973a278083
Author: Alex Heneveld <[email protected]>
Date: 2014-08-07T02:04:45Z
minor test utils fixes, including `assertThat`
commit 3c714ed12259c3909f0244f83f504e6a62be7bdb
Author: Alex Heneveld <[email protected]>
Date: 2014-08-07T02:09:15Z
refactor Enrichers.builder() types to give correct generics for published
sensor
commit 41deca4d9428867d9c1d54ec3e5334fe183cfea2
Author: Alex Heneveld <[email protected]>
Date: 2014-08-07T02:38:11Z
add support for suppressing duplicates in enrichers, defaulting false for
most, but true for UpdatingMap; and in Enrichers.builder() use better
superclasses to support tags, uniqueTags
commit 843f1fcaa28331e5b3e9b3325899366d0588601f
Author: Alex Heneveld <[email protected]>
Date: 2014-08-07T03:47:59Z
simple cleaned up illustration of service_up from not_up computation
commit 94184b2f65bfe8a00fd6fe170f22c276ad9b29db
Author: Alex Heneveld <[email protected]>
Date: 2014-08-07T03:48:26Z
a bunch more service-up checks (WIP)
commit c1ebb8f44cb3baa24f05021b262b9bf25c864f39
Author: Alex Heneveld <[email protected]>
Date: 2014-08-08T03:37:51Z
fix enricher type test with suppress duplicates
commit bc1d19f755bc32a5ed5ec84ba50198fa39ba47bb
Author: Alex Heneveld <[email protected]>
Date: 2014-08-12T14:50:46Z
rename WhenFunctions class to IfFunctions, and tidies/cleanups there and in
enrichers
commit 97eed6bdc159ddcba231fc0183635317101ec7b9
Author: Alex Heneveld <[email protected]>
Date: 2014-08-25T06:23:01Z
add SERVICE_PROBLEMS and enrichers in ServiceStateLogic to compute state
from that.
add enrichers to populate PROBLEMS and NOT_UP_INDICATORS from children and
members: this removes a lot of ad hoc service-up computations; some quorum up
logic e.g. for mongo, have changed, but in those cases the previous logic was
quite hokey in any case. (to properly support QUORUM_SIZE we should have a key,
or use the UP_QUORUM_CHECK config).
also tweak the recent workaround when AbstractEntity.add{Enricher,Policy}
detects a duplicate, we now take the more recent one rather than the older one;
this allows us to replace them in a principled fashion when using unique tags.
commit d3886a055353f2efa435c84d45668c1a3ab0aa23
Author: Alex Heneveld <[email protected]>
Date: 2014-08-25T09:48:19Z
default children/members enrichers for service_up and service_problems
ignores entities that report null as well as those that don't report; this can
be overridden with IGNORE_{NULL,TRANSITIONING} config keys.
and the load balancing policy defaults not to blocking service up simply
because children/members are not present. misc other tidies around policies.
commit b2daedf8336a891167602f67e7f8e576256dc5e8
Author: Alex Heneveld <[email protected]>
Date: 2014-08-25T20:17:53Z
rewrite of ServiceFailureDetector -- part of what it did before is now done
by ServiceStateLogic of course,
so now this extends that, and provides options for emitting notifications
of ENTITY_FAILED, ENTITY_RECOVERED, as well as suppressing ON_FIRE
commit 5ec0a00b1c9deb4ff3b7ccc4dc7e7e6755fded26
Author: Alex Heneveld <[email protected]>
Date: 2014-08-25T21:29:52Z
use initApp for apps to ensure enrichers get added, fixing tests and other
misc tidies
commit bfb8737e647357053f65d5bd305a4f6783ad2866
Author: Alex Heneveld <[email protected]>
Date: 2014-08-25T21:35:55Z
fix failing test on service going on_fire not aborting dependent
configuration
commit cbc103a3b64cbcc7bcc9530cdd1914606e5b2520
Author: Alex Heneveld <[email protected]>
Date: 2014-08-27T06:16:18Z
some notes on tidying the REST API
commit 5db500e43fbc1973d5b941ff41f681e51c134217
Author: Alex Heneveld <[email protected]>
Date: 2014-08-26T13:46:02Z
fix all tests and related entities to get service lifecycle, including REST
app creation attaching all interfaces (previously it did not get "startable" so
entities did not start)
commit 31c5a0c2fd15ec23904bf438ba7b39579064dc8c
Author: Alex Heneveld <[email protected]>
Date: 2014-08-27T03:10:47Z
write comprehensive tests for ServiceStateLogic, and tidy some of the
semantics and usages elsewhere
commit ab1381b413543b69de62b498fe61f05b46cf9cae
Author: Alex Heneveld <[email protected]>
Date: 2014-08-27T03:17:20Z
make consistent
`Mutable{List,Set,Map}.as{Immutable,Unmodifiable,UnmodifiableCopy}()` methods,
and more forgiving if null is present, deprecatign the inconsistent and
break-prone `toImmutable()`
commit 099a5496e4ec48bb31d11a3be82c92831aef2ceb
Author: Alex Heneveld <[email protected]>
Date: 2014-08-27T05:10:08Z
convert SERVICE_STATE to _ACTUAL or _EXPECTED in many more places, and
force recompute of _ACTUAL whenever _EXPECTED is changed
commit 6a8af41e70ab96e361fb58953c2c3f072ff12678
Author: Alex Heneveld <[email protected]>
Date: 2014-08-26T13:46:48Z
docs for service state
----
---
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.
---