Service Unit Agent presence should be observable

Bug #617541 reported by Gustavo Niemeyer
6
This bug affects 1 person
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_agent(self):
        """Inform Ensemble that this is a service unit agent alive."""

Note that this API is the same proposed for the MachineAgentState, in bug #617046.

Tags: spike

Related branches

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
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.