Repository: mesos Updated Branches: refs/heads/master b26a2e1a7 -> b85c79525
Added decorator documentation and described the change in Mesos 0.23.0. Review: https://reviews.apache.org/r/33372 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b85c7952 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b85c7952 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b85c7952 Branch: refs/heads/master Commit: b85c79525292f2098408db376f142bc7bb16f853 Parents: b26a2e1 Author: Niklas Nielsen <[email protected]> Authored: Mon May 18 18:14:35 2015 -0700 Committer: Niklas Q. Nielsen <[email protected]> Committed: Mon May 18 18:14:35 2015 -0700 ---------------------------------------------------------------------- docs/modules.md | 40 +++++++++++++++++++++++++++++++++++++++- docs/upgrades.md | 4 ++++ 2 files changed, 43 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/b85c7952/docs/modules.md ---------------------------------------------------------------------- diff --git a/docs/modules.md b/docs/modules.md index d0391ce..835c195 100644 --- a/docs/modules.md +++ b/docs/modules.md @@ -143,7 +143,45 @@ could be to support PAM (LDAP, MySQL, NIS, UNIX) backed authentication. Similar to Apache Webserver Modules, hooks allows module writers to tie into internal components which may not be suitable to be abstracted entirely behind -modules but rather let's them define actions on so-called hooks. +modules but rather lets them define actions on so-called hooks. + +The available hooks API is defined in mesos/hook.hpp and for each hook defines +the insertion point and available context. An example of this context is the +task information which is passed to masterLaunchTaskHook. + +Some hooks take in an object (e.g. TaskInfo) and return all or part of that +object (e.g. task labels), so that the hook can modify or replace the contents +in-flight. These hooks are referred to as _decorators_. + +In order to enable decorator modules to remove metadata (environment variables +or labels), the effect of the return value for decorator hooks changed in +Mesos 0.23.0. + +The Result<T> return values before and after Mesos 0.23.0 means: + +<table> +<tr> +<th>State</th> +<th>Before (0.22.x)</th> +<th>After (0.23.0+)</th> +</tr> +<tr> +<td>Error</td> +<td>Error is propagated to the call-site</td> +<td>No change</td> +</tr> +<tr> +<td>None</td> +<td>The result of the decorator is not applied</td> +<td>No change</td> +</tr> +<tr> +<td>Some</td> +<td>The result of the decorator is appended</td> +<td>The result of the decorator overwrites the final labels/environment +object</td> +</tr> +</table> To load a hook into Mesos, you need to http://git-wip-us.apache.org/repos/asf/mesos/blob/b85c7952/docs/upgrades.md ---------------------------------------------------------------------- diff --git a/docs/upgrades.md b/docs/upgrades.md index 2a15694..355307a 100644 --- a/docs/upgrades.md +++ b/docs/upgrades.md @@ -6,6 +6,10 @@ layout: documentation This document serves as a guide for users who wish to upgrade an existing mesos cluster. Some versions require particular upgrade techniques when upgrading a running cluster. Some upgrades will have incompatible changes. +## Upgrading from 0.22.x to 0.23.x + +**NOTE** In order to enable decorator modules to remove metadata (environment variables or labels), we changed the meaning of the return value for decorator hooks in Mesos 0.23.0. Please refer to the modules documentation for more details. + ## Upgrading from 0.21.x to 0.22.x **NOTE** Slave checkpoint flag has been removed as it will be enabled for all
