Merge lp:~thedac/charms/precise/gunicorn/fix-config-changed into lp:~charmers/charms/precise/gunicorn/trunk
Proposed by
David Ames
Status: | Rejected |
---|---|
Rejected by: | Matt Bruzek |
Proposed branch: | lp:~thedac/charms/precise/gunicorn/fix-config-changed |
Merge into: | lp:~charmers/charms/precise/gunicorn/trunk |
Diff against target: |
67 lines (+12/-10) 2 files modified
README.md (+8/-6) hooks/hooks.py (+4/-4) |
To merge this branch: | bzr merge lp:~thedac/charms/precise/gunicorn/fix-config-changed |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matt Bruzek (community) | Needs Fixing | ||
Review via email: mp+211638@code.launchpad.net |
Description of the change
The config-changed hook does not have JUJU_REMOTE_UNIT set in the environment. This uses the relation data to get the remote unit name.
To post a comment you must log in.
Unmerged revisions
- 31. By David Ames
-
Update README with working deploy directions
- 30. By David Ames
-
Fix broken config-changed hook. Config-changed does not have JUJU_REMOTE_UNIT set in the environment
I took a look at this merge proposal and found the gunicorn README is not correct. I added to the existing bug here: https:/ /bugs.launchpad .net/charms/ +source/ gunicorn/ +bug/1193026
Got the new code with:
bzr branch lp:~bloodearnest/charms/precise/gunicorn/upgrade-path precise/gunicorn
I was able to get the code in this charm to deploy successfully with the following commands (from the python-django README):
juju bootstrap -e local gunicorn
juju deploy python-django
juju deploy postgresql
add-relation python-django postgresql:db
juju deploy local:precise/
juju expose python-django
juju add-relation python-django gunicorn
I was then able to verify that both the new and old format works by looking in the /etc/init/ gunicorn. conf for changes when I ran the following commands: "\"A\": 2"' (the old format)
juju run --unit python-django/0 "relation-ids wsgi" (the output me to use wgsi:2)
juju run --unit python-django/0 "relation-set -r wsgi:2 env_extra='A=5'" (the new format)
juju run --unit python-django/0 'relation-set -r wsgi:2 env_extra=
+1 LGTM