service with no units stuck in lifecycle dying
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | juju-core |
High
|
William Reade | ||
| | 1.16 |
Critical
|
William Reade | ||
| | juju-core (Ubuntu) |
Undecided
|
Unassigned | ||
| | Saucy |
Undecided
|
Unassigned | ||
Bug Description
[Impact]
Services will no service units get stuck in 'dying' state preventing their removal from a deployment.
[Test Case]
juju deploy mysql
juju terminate-machine --force <machineid of mysql>
juju destroy-service mysql
[Regression Potential]
Part of the upstream tested 1.16.6 release. Change looks limited to impacted code path only
[Original Report]
[Report from the field, a service with no units (previously destroyed) is stuck in lifecycle dying. Per status snippet
mysql:
charm: local:precise/
exposed:false
life: dying
relations:
cluster:
- mysql
Related branches
- John A Meinel: Approve on 2013-11-10
- Ian Booth: Approve on 2013-11-07
-
Diff: 120 lines (+80/-3)3 files modifiedstate/service.go (+7/-3)
state/unit.go (+22/-0)
state/unit_test.go (+51/-0)
- juju hackers: Pending requested 2013-11-13
-
Diff: 120 lines (+80/-3)3 files modifiedstate/service.go (+7/-3)
state/unit.go (+22/-0)
state/unit_test.go (+51/-0)
| Kapil Thangavelu (hazmat) wrote : | #1 |
| Kapil Thangavelu (hazmat) wrote : | #2 |
<fwereade> hazmat, the service was kept alive by the relation, which was kept alive by its unit count, which implied there'd be a unit to do the final leavescope and set off the dominos to take down the relation and the service
| Changed in juju-core: | |
| importance: | Undecided → High |
| status: | New → Triaged |
| tags: | added: destroy-service |
| Kapil Thangavelu (hazmat) wrote : Re: [Bug 1233457] Re: service with no units stuck in lifecycle dying | #3 |
I have an export of the mongodb for this environment, if anyone needs it
for additional analysis.
On Sat, Oct 12, 2013 at 1:21 PM, Curtis Hovey <email address hidden> wrote:
> ** Tags added: destroy-service
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> service with no units stuck in lifecycle dying
>
> To manage notifications about this bug go to:
> https:/
>
| tags: |
added: cts-cloud-review removed: cts |
| Changed in juju-core: | |
| milestone: | none → 1.17.0 |
| Curtis Hovey (sinzui) wrote : | #4 |
This issue relates to bug 1205451. In this case, the machine terminated before the state server could tell the agent that it is dead. In the other bug, the machine terminated for other reasons. In both cases, The state-server does not recognise that the agent and machine are gone, so it only needs to remove the record of the agent.
| Kapil Thangavelu (hazmat) wrote : Re: [Bug 1233457] [NEW] service with no units stuck in lifecycle dying | #5 |
On Friday, October 25, 2013, Curtis Hovey wrote:
> This issue relates to bug 1205451. In this case, the machine terminated
> before the state server could tell the agent that it is dead. In the
> other bug, the machine terminated for other reasons. In both cases, The
> state-server does not recognise that the agent and machine are gone, so
> it only needs to remove the record of the agent.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> service with no units stuck in lifecycle dying
>
> To manage notifications about this bug go to:
> https:/
>
| William Reade (fwereade) wrote : | #6 |
I don't *think* it's related to lp:1205451 -- according to the transaction log captured by hazmat, mysql/0 never actually tried to leave relation scope for that relation... but *did* otherwise shut down cleanly. This points to a bug in the Uniter itself; still investigating.
| tags: | added: state-server |
| William Reade (fwereade) wrote : | #7 |
Root cause remains undetermined, but we can still ensure units are not removed without leaving all their relation scopes. Fix in progress.
| Changed in juju-core: | |
| assignee: | nobody → William Reade (fwereade) |
| Changed in juju-core: | |
| status: | Triaged → In Progress |
| Changed in juju-core: | |
| milestone: | 1.17.0 → 2.0 |
| Changed in juju-core: | |
| importance: | High → Critical |
| milestone: | 2.0 → 1.17.0 |
| Changed in juju-core: | |
| status: | In Progress → Fix Committed |
| Changed in juju-core: | |
| milestone: | 1.17.0 → 2.0 |
| status: | Fix Committed → In Progress |
| Changed in juju-core: | |
| milestone: | 2.0 → 1.17.0 |
| status: | In Progress → Fix Committed |
| Changed in juju-core: | |
| importance: | Critical → High |
| Changed in juju-core: | |
| status: | Fix Committed → Fix Released |
| Changed in juju-core (Ubuntu): | |
| status: | New → Fix Released |
| description: | updated |
| Launchpad Janitor (janitor) wrote : | #8 |
Status changed to 'Confirmed' because the bug affects multiple users.
| Changed in juju-core (Ubuntu Saucy): | |
| status: | New → Confirmed |
| Rolf Leggewie (r0lf) wrote : | #9 |
saucy has seen the end of its life and is no longer receiving any updates. Marking the saucy task for this ticket as "Won't Fix".
| Changed in juju-core (Ubuntu Saucy): | |
| status: | Confirmed → Won't Fix |


poking at the underlying mongodb shows that the mysql service still has an extant relation and no units, per william on irc <fwereade> hazmat, to me the really critical thing is that one of those units apparently managed to leave scope without updating the relation doc's unitcount