Merge lp://staging/~bjornt/charms/precise/landscape-client/no-landscape-config-call into lp://staging/~charmers/charms/precise/landscape-client/trunk
Proposed by
Björn Tillenius
Status: | Merged |
---|---|
Approved by: | Mark Mims |
Approved revision: | 26 |
Merge reported by: | Mark Mims |
Merged at revision: | not available |
Proposed branch: | lp://staging/~bjornt/charms/precise/landscape-client/no-landscape-config-call |
Merge into: | lp://staging/~charmers/charms/precise/landscape-client/trunk |
Diff against target: |
138 lines (+79/-30) 4 files modified
hooks/common.py (+69/-0) hooks/config-changed (+5/-23) hooks/juju-info-relation-joined (+4/-6) revision (+1/-1) |
To merge this branch: | bzr merge lp://staging/~bjornt/charms/precise/landscape-client/no-landscape-config-call |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mark Mims (community) | Approve | ||
Thomas Herve (community) | Approve | ||
Review via email: mp+144456@code.staging.launchpad.net |
Description of the change
Improve error handling, putting the agent into an error state if something goes wrong
when trying to register.
The charm now uses the landscape-client python library instead of calling the
landcape-config executable, so that we have more control over the registration
process.
To post a comment you must log in.
Looks great! Thanks for starting to factor common code.
[1] config-changed and juju-info- relation- joined share lots of code, it'd be nice to add an additional function for those.
[2] I don't think we should exit_with_error on register error: if the server is out for a bit for example, the charm shouldn't not error out, and just retry to register later on. OTOH, I guess it's a problem if you're missing a configuration parameter. I suspect we want to re-register anyway if change the config later on? IE, instead of having the on_error call, I would stop_client_ and_disable_ init_script( ) on config-changed.
Thanks!