Expose leadership over websocket API
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
From github.com issues, https:/
At present, if a charm depends on the leadership layer, and one wants to know whether a deployed unit is the leader, one can invoke FullStatus via the Client Facade over the websocket api, and then dig through the resulting json object.
This ticket requests that leadership be added to the deltas that get passed over the websocket connection, so that libraries like python-libjuju can keep track of leadership in their model, along with everything else, without requiring a separate FullStatus invocation.
This currently affects the matrix testing suite (https:/
To clarify, the issue is that the unit deltas that come in on the AllWatcher do not contain the leadership flag but otherwise contains all or more of the fields from UnitStatus. This means that leadership is the only field that requires an explicit separate call to one of FullStatus, ApplicationStatus, or UnitStatus.
no longer affects: | juju-core |
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
tags: | added: matrix |
tags: | added: libjuju |
tags: | removed: matrix |
This is the implementation of "is_leader_ from_status" in python-libjuju [1], which also references this bug.
1. https:/ /github. com/juju/ python- libjuju/ pull/13