Service Unit Agent presence should be observable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyjuju |
Fix Released
|
Low
|
Kapil Thangavelu |
Bug Description
The ServiceUnitState API should enable monitoring the running state of a Service Unit Agent, so that if the Service Unit goes away for longer than a given amount of time, the Machine Agent can take the needed measures (as defined in bug #617556).
Here is a suggested API:
class ServiceUnitState:
def has_agent(self):
"""Return boolean deferred informing whether an agent is connected."""
def watch_agent(self):
"""Return two boolean deferreds informing whether an agent is connected, and whether a change happened."""
def connect_
"""Inform Ensemble that this is a service unit agent alive."""
Note that this API is the same proposed for the MachineAgentState, in bug #617046.
Related branches
- Gustavo Niemeyer: Approve
-
Diff: 287 lines (+188/-2)7 files modifiedensemble/lib/testing.py (+9/-0)
ensemble/state/agent.py (+42/-0)
ensemble/state/machine.py (+7/-1)
ensemble/state/service.py (+6/-1)
ensemble/state/tests/test_agent.py (+94/-0)
ensemble/state/tests/test_machine.py (+14/-0)
ensemble/state/tests/test_service.py (+16/-0)
description: | updated |
Changed in ensemble: | |
importance: | Undecided → Low |
status: | New → Confirmed |
description: | updated |
summary: |
- Service Unit health should be observable + Service Unit Agent presence should be observable |
Changed in ensemble: | |
assignee: | nobody → Kapil Thangavelu (hazmat) |
milestone: | none → 0.3 |
status: | Confirmed → In Progress |
Changed in ensemble: | |
status: | In Progress → Fix Committed |
Changed in ensemble: | |
status: | Fix Committed → Fix Released |