Improve hook error reporting

Bug #1224568 reported by Frank Mueller
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Frank Mueller

Bug Description

Extend status with error information to provide a better hook error reporting.

1) add a `Data map[string]interface{}` to statusDoc
2) add that field to all the API bits (including the allwatcher status stream)
3) add relevant data in case of relation hook errors (so: relation tag, hook kind, remote unit)
4) make sure that data comes out in the AllWatcher stream
5) make sure it's also put into status output

Gary adds this one:
6) make sure that we can correlate relation error identifiers with AllWatcher relation info. I think we are using the tag as the AllWatcher relation identifier, in which case we don't need to add anything, but I'd like to verify that.

Also add dict to machineStatus and keep similar signatures in sync.

Related branches

Gary Poster (gary)
description: updated
Revision history for this message
Dave Cheney (dave-cheney) wrote : Re: [Bug 1224568] Re: Improve hook error reporting

Frank, please document this in the release notes
https://docs.google.com/a/canonical.com/document/d/1o8YsLrQuadB1gbd5veJ3cpN_r2uozKwwTmIh1RmOVHM/edit#

On Wed, Sep 18, 2013 at 4:27 AM, Frank Mueller
<email address hidden> wrote:
> ** Branch linked: lp:~themue/juju-core/046-added-status-data
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> Matching subscriptions: MOAR JUJU SPAM!
> https://bugs.launchpad.net/bugs/1224568
>
> Title:
> Improve hook error reporting
>
> Status in juju-core:
> In Progress
>
> Bug description:
> Extend status with error information to provide a better hook error
> reporting.
>
> 1) add a `Data map[string]interface{}` to statusDoc
> 2) add that field to all the API bits (including the allwatcher status stream)
> 3) add relevant data in case of relation hook errors (so: relation tag, hook kind, remote unit)
> 4) make sure that data comes out in the AllWatcher stream
> 5) make sure it's also put into status output
>
> Gary adds this one:
> 6) make sure that we can correlate relation error identifiers with AllWatcher relation info. I think we are using the tag as the AllWatcher relation identifier, in which case we don't need to add anything, but I'd like to verify that.
>
> Also add dict to machineStatus and keep similar signatures in sync.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1224568/+subscriptions

Revision history for this message
Frank Mueller (themue) wrote :

Hi Dave, will do in the moment it is done. This second CL hasen't been the last one, only one step.

Revision history for this message
Dave Cheney (dave-cheney) wrote :

jolly good.

On Wed, Sep 18, 2013 at 5:50 PM, Frank Mueller
<email address hidden> wrote:
> Hi Dave, will do in the moment it is done. This second CL hasen't been
> the last one, only one step.
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> Matching subscriptions: MOAR JUJU SPAM!
> https://bugs.launchpad.net/bugs/1224568
>
> Title:
> Improve hook error reporting
>
> Status in juju-core:
> In Progress
>
> Bug description:
> Extend status with error information to provide a better hook error
> reporting.
>
> 1) add a `Data map[string]interface{}` to statusDoc
> 2) add that field to all the API bits (including the allwatcher status stream)
> 3) add relevant data in case of relation hook errors (so: relation tag, hook kind, remote unit)
> 4) make sure that data comes out in the AllWatcher stream
> 5) make sure it's also put into status output
>
> Gary adds this one:
> 6) make sure that we can correlate relation error identifiers with AllWatcher relation info. I think we are using the tag as the AllWatcher relation identifier, in which case we don't need to add anything, but I'd like to verify that.
>
> Also add dict to machineStatus and keep similar signatures in sync.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1224568/+subscriptions

Revision history for this message
Frank Mueller (themue) wrote :

Current status:

In case of hook errors the status data contains up to three key/value pairs.

1. "hook" : name of the hook
2. "relation-id" : in case of a relation the id of this relation
3. "remote-unit" : in case of a relation the name of the remote unit if it isn't empty

Revision history for this message
Frank Mueller (themue) wrote :

Examples:

1. Non-relation hook errors

"hook" : "install" / "config-changed" / "start" / "upgrade-charm"

2. Relation hook errors with remote unit

"hook": "<endpoint>-relation-joined" / "<endpoint>-relation-changed" / "<endpoint>-relation-departed"
"relation-id" : 0 (1, 2, 3 ...)
"remote-unit" : e.g. "mysql/0"

3. Relation hook errors without remote unit

"hook": "<endpoint>-relation-broken"
"relation-id" : 0 (1, 2, 3 ...)

Revision history for this message
Gary Poster (gary) wrote :

Hi Frank. This looks like it will be perfect. Thank you!

Mark Ramm (mark-ramm)
Changed in juju-core:
milestone: none → 1.15.1
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.