Merge lp:~canonical-ci-engineering/charms/trusty/core-result-checker/test-with-relations into lp:~canonical-ci-engineering/charms/trusty/core-result-checker/trunk

Proposed by Thomi Richards
Status: Merged
Approved by: Thomi Richards
Approved revision: 3
Merged at revision: 3
Proposed branch: lp:~canonical-ci-engineering/charms/trusty/core-result-checker/test-with-relations
Merge into: lp:~canonical-ci-engineering/charms/trusty/core-result-checker/trunk
Diff against target: 4 lines (+0/-0)
0 files modified
To merge this branch: bzr merge lp:~canonical-ci-engineering/charms/trusty/core-result-checker/test-with-relations
Reviewer Review Type Date Requested Status
Celso Providelo (community) Approve
Review via email: mp+260095@code.launchpad.net

Commit message

add missing relation hooks.

Description of the change

Add missing relation-departed and relation-broken hooks.

Do not ask me why I'm doing this. At this point, juju charms have taken my sanity. You can, however read https://trello.com/c/S0jZES0I/93-fix-hanging-rabbitmq-connections for a full blow-by-blow account of how I got to this point.

In case you don't believe me that this works, log in to wendigo, and run:

sh ~/thomi_playground/test_thomi.sh

This script will deploy a new snappy-proposed-migration-result-checker service with an alternate mojo spec branch (lp:~canonical-ci-engineering/canonical-mojo-specs/ci-test-with-relations). The only difference in that branch is that for that service, in production, it pulls in this charm, rather than the one in trunk.

Once that's deployed, log in to the rabbitmq server and count the active connections:

rabbitmqadmin list connections | wc -l

Now destroy the service (you can't use reaper.py just yet, I have another branch that will fix that):

JUJU_HOME=juju-environments/mojo-ue-snappy-proposed-result-checker-2af41f49/ juju destroy-service core-result-checker

wait while juju does it's thing. When it's finished (core-result-checker no longer appears in 'juju stat' output), re-check the rabbit connection count, it should be one less than it was.

If you repeat this experiment with the trunk charm, connections never get cleaned up.

Thanks Obama^Wjuju

To post a comment you must log in.
Revision history for this message
Celso Providelo (cprov) wrote :

Thomi,

As discussed on HO (me, Francis and you), the symlinks do not match our expectation from ServiceManager() [1], something does not fit well. Also we have experienced success with `juju destroy-service ...` last Friday.

There might be, as you suggested, some weird timing issues around this that we cannot easily reproduce.

From everything you have tried, I am ok for you to land this in the snappy-proposed-result-checker charm branch and experiment with reaper.py calling (and waiting) destroy-services before destroying the juju env.

If we get it to work, we can quickly propagate this other snappy-proposed charms

[1] https://pythonhosted.org/charmhelpers/examples/services.html

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added symlink 'hooks/relation-broken'
2=== target is u'hooks.py'
3=== added symlink 'hooks/relation-departed'
4=== target is u'hooks.py'

Subscribers

People subscribed via source and target branches

to all changes: