Merge lp://staging/~nijaba/charm-tools/leader into lp://staging/~charmers/charm-tools/trunk

Proposed by Nick Barcet
Status: Work in progress
Proposed branch: lp://staging/~nijaba/charm-tools/leader
Merge into: lp://staging/~charmers/charm-tools/trunk
Diff against target: 103 lines (+54/-23)
2 files modified
helpers/sh/peer.sh (+47/-23)
tests/helpers/test_peer.sh (+7/-0)
To merge this branch: bzr merge lp://staging/~nijaba/charm-tools/leader
Reviewer Review Type Date Requested Status
Clint Byrum (community) Disapprove
Review via email: mp+88752@code.staging.launchpad.net

Description of the change

This branch adds the possibility to call ch_peer_i_am_leader outside of a peer relation.
It does so by storing the information when it is called within the relation.

To post a comment you must log in.
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

I'm not sure this is safe. We could make some assumptions in hooks because we knew the output of relation-list was up to date when the hook was called, but now we are going quite a bit further. Its already a sketchy way to do leader detection, because the list can change while code is executing. I am quite nervous about going even further.

review: Disapprove

Unmerged revisions

121. By Nick Barcet

adding tests and fixes of issues brought by the test

120. By Nick Barcet

make ch_peer_i_am_leader work outside of a relation

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches