First customer pain point pull request - default-hook

Gustavo Niemeyer gustavo.niemeyer at canonical.com
Tue Aug 19 14:36:52 UTC 2014


On Tue, Aug 19, 2014 at 11:00 AM, Aaron Bentley
<aaron.bentley at canonical.com> wrote:
> On 14-08-19 09:42 AM, Gustavo Niemeyer wrote:
>> 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,
>
> The cs:~juju-qa/precise/juju-reports charm follows this general
> pattern, but there are some specialized hooks: install, start, stop
> and upgrade-charm.
>
> config-changed, database-relation-broken, database-relation-changed,
> database-relation-departed, and website-relation-changed are all the
> same code and read the state afresh every time without reference to
> the script name.

This is actually your website-relation-changed hook:

    http://paste.ubuntu.com/8089398/

> The charmworld charm is similar.

This is reverseproxy-relation-joined there:

    http://paste.ubuntu.com/8089386/


gustavo @ http://niemeyer.net



More information about the Juju-dev mailing list