Merge lp:~jimbaker/pyjuju/expose-provision-machines-reexpose into lp:pyjuju
Status: | Merged |
---|---|
Approved by: | Kapil Thangavelu |
Approved revision: | 300 |
Merged at revision: | 308 |
Proposed branch: | lp:~jimbaker/pyjuju/expose-provision-machines-reexpose |
Merge into: | lp:pyjuju |
Prerequisite: | lp:~jimbaker/pyjuju/expose-provision-machines |
Diff against target: |
287 lines (+168/-18) 4 files modified
ensemble/agents/provision.py (+15/-8) ensemble/agents/tests/test_provision.py (+27/-1) ensemble/state/base.py (+15/-0) ensemble/state/tests/test_base.py (+111/-9) |
To merge this branch: | bzr merge lp:~jimbaker/pyjuju/expose-provision-machines-reexpose |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Kapil Thangavelu (community) | Approve | ||
Gustavo Niemeyer | Approve | ||
Review via email: mp+68313@code.launchpad.net |
Description of the change
Fixing this was essentially a matter of making
cb_watch_
the corresponding service units; that is, the following code should be
run regardless of whether the service is exposed:
for unit_state in unit_states:
Tests in test_provision have been changed so that they actually test
re-exposing a service.
In addition, the support for re-exposing brought up the issue that
StateBase.
other watches: that it needs to guard on the connection being
connected upon entry to the watch function. These changes were made in
both _watch_topology and __watch_topology. Tests were also add to
test_base to verify that when the client is disconnected, the watch
properly shuts down. (The necessity for this change to StateBase is
otherwise only seen in repeated looping of tests that in the
provisioning agent.)
Lastly, I removed the unnecessary sleeps in test_base in favor of our
current practice of using poke_zk (but only for these types of tests).
Looks good, thanks Jim.