Merge lp:~bloodearnest/charms/precise/gunicorn/upgrade-path into lp:~charmers/charms/precise/gunicorn/trunk
Status: | Merged |
---|---|
Merged at revision: | 30 |
Proposed branch: | lp:~bloodearnest/charms/precise/gunicorn/upgrade-path |
Merge into: | lp:~charmers/charms/precise/gunicorn/trunk |
Diff against target: |
159 lines (+76/-11) 3 files modified
hooks/hooks.py (+49/-8) hooks/tests/test_hooks.py (+26/-2) revision (+1/-1) |
To merge this branch: | bzr merge lp:~bloodearnest/charms/precise/gunicorn/upgrade-path |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matt Bruzek (community) | Approve | ||
Wes Mason (community) | Approve | ||
Michael Nelson (community) | Approve | ||
Review via email: mp+213236@code.launchpad.net |
Commit message
Allow an easier upgrade path from old bash version of charm by adding support for old env_extra relation data format, and removing old service. Plus, and fix bug/wart in config-changed hook.
Description of the change
add support for old env_extra relation data format, to allow an upgrade path.
The old format was a partial python dict format, e.g.
'A': 1, 'B': 'C'
The new format is standard env format, e.g
A=1 B="C"
This update adds support back for the old format, to allow an upgrade path, as it's impossible to upgrade a subordinate and its principle in lock-step.
It also removes the older-style gunicorn config and service from previous versions of the charm, if found.
Also, using remote_unit as job name doesn't work well in config-changed hooks, so switched to local_unit, as avoids unnecessary complications.
I ran into the issue related to remote_unit. Updated to this branch to fix that. Everything works except that I had to manually `juju ssh my-service/0 "sudo service gunicorn stop" (but that might just be related to the *very* old gunicorn charm I was using.