leader-set
immediately writes the key/value pairs to the juju controller,
which will then inform non-leader units of the change. It will fail if called
without arguments, or if called by a unit that is not currently service leader.
leader-set
lets you write string key=value pairs, but with the following differences:
- there's only one leader-settings bucket per service (not one per unit)
- only the leader can write to the bucket
- only minions are informed of changes to the bucket
- changes are propagated instantly
The instant propagation may be surprising, but it exists to satisfy the use case where shared data can be chosen by the leader at the very beginning of the install hook.
It is strongly recommended that leader settings are
always written as a self-consistent group leader-set one=one two=two three=three
.