First customer pain point pull request - default-hook
Gustavo Niemeyer
gustavo.niemeyer at canonical.com
Tue Aug 19 13:42:14 UTC 2014
On Tue, Aug 19, 2014 at 9:07 AM, William Reade
<william.reade at canonical.com> wrote:
> On Mon, Aug 18, 2014 at 9:33 PM, Gustavo Niemeyer <gustavo at niemeyer.net>
> wrote:
>>
>> I don't think I fully understand the proposal there. To have such a
>> "something-changed" hook, we ought to have a better mechanism to tell
>> *what* actually changed. In other words, we have a number of hooks
>> that imply a state transition or a specific notification ("install",
>> "start", "config-changed", "leader-elected" coming, etc). Simply
>> calling out the charm saying "stuff changed" feels like a bad
>> interface, both in performance terms (we *know* what changed) and in
>> user experience (how do people use that!?).
>
> The issue is that as charms increase in sophistication, they seem to find it
> harder and harder to meaningfully map specific changes onto specific
> actions. Whether or not to react to a change in one relation depends on the
> values of a bunch of other units in other relations, to the extent that any
> individual relation change can have arbitrarily far-reaching consequences,
> and it ends up being easier to simply write something that maps directly
> from complete-available-state to desired-config.
I have never seen myself a single charm that completely ignores all
the action cues to simply re-read the whole state from the ground up,
and we've just heard in this thread people claiming that even the
charms that use a single hook via symlinks still rely on a dispatching
table based on what action is happening, so I'm not ready to accept
that claim at face value without some actual data.
What percentage of the charms we have completely ignore the actions
that are taking place when making decisions?
> * leader-deposed will completely lack hook tools: we can't run a
> default-hook there unless we know for sure that the implementation doesn't
> depend on any hook tools (in general, this is unlikely).
Why? People can still run hook tools in leader-deposed, and they will
not work. The situation is no different with default-hook: they are
just two files in the same directory. Run one instead of the other.
gustavo @ http://niemeyer.net
More information about the Juju-dev
mailing list