service lifecycle API is wrong

Bug #1089285 reported by William Reade
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
William Reade

Bug Description

Services don't have associated agents, and need to be removed differently to units and machines -- much like relations.

The right API is, I believe:

Service.Destroy() -- like Relation.Destroy, may set Dying or may remove entirely, depending on whether units exist.
Service.AddUnit() -- needs to check for Dying (may do so already)
Service.RemoveUnit() -- needs to remove the service if it's Dying and otherwise unreferenced.

William Reade (fwereade)
Changed in juju-core:
importance: Undecided → High
assignee: nobody → William Reade (fwereade)
Revision history for this message
Dave Cheney (dave-cheney) wrote :

Making this as triaged, WIlliam if we need to do this before 2.0 then when is a good time?

Changed in juju-core:
milestone: none → 1.9.7
status: New → Triaged
Revision history for this message
William Reade (fwereade) wrote :

Taking it back to in progress: I'm working on it now because think it's critical that we get the lifecycle bits in good order; I can't have confidence in the subordinates work without it.

Changed in juju-core:
status: Triaged → In Progress
William Reade (fwereade)
Changed in juju-core:
status: In Progress → 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.