destroy-service should have a force option

Bug #1183309 reported by Kapil Thangavelu
76
This bug affects 14 people
Affects Status Importance Assigned to Milestone
juju-core
Won't Fix
Medium
Unassigned

Bug Description

much the same as Bug #1089289 except as option to destroy-service, so that all units of the service are forced to destroy instead of having the user manually push them through a workflow only to delete them. This seems to trip up users regularly.

John A Meinel (jameinel)
Changed in juju-core:
importance: Undecided → Low
status: New → Confirmed
tags: added: ui workflow
Revision history for this message
Stuart Bishop (stub) wrote :

I want this for writing reliable functional tests. A broken hook will cause the test suite to hang.

description: updated
Revision history for this message
William Reade (fwereade) wrote :

This will only be possible once lp:1089289 is done, but it should be pretty simple once that's done.

Changed in juju-core:
status: Confirmed → Triaged
importance: Low → Medium
Curtis Hovey (sinzui)
Changed in juju-core:
importance: Medium → Low
Curtis Hovey (sinzui)
tags: added: destroy-service
Curtis Hovey (sinzui)
Changed in juju-core:
importance: Low → High
Revision history for this message
Curtis Hovey (sinzui) wrote :

@John A Meinel's duplicate
In theory something like "juju destroy-service" should just kill off the remaining items.

I'm told that this might work as expected if the service wasn't already in Dying state.

Revision history for this message
John A Meinel (jameinel) wrote :

Per the discussion on lp:1089289 destroy-service --force is not going to be implemented because destroy-unit --force is not going to be implemented.
We have destroy-machine --force for how to clean things up when a unit agent is failing to progress, and we have regular "juju destroy-service" which should cascade to kill all the units already.

Changed in juju-core:
status: Triaged → Won't Fix
Revision history for this message
Kapil Thangavelu (hazmat) wrote : Re: [Bug 1183309] Re: destroy-service should have a force option

This is a usability issue, we're making users clean up after juju. if you
have units in error then lacking --force means manually correcting each
unit (possibly multiple times) then finally destroying the service... and
then going back and killing each machine.

On Mon, Apr 28, 2014 at 2:03 PM, John A Meinel <email address hidden>wrote:

> Per the discussion on lp:1089289 destroy-service --force is not going to
> be implemented because destroy-unit --force is not going to be implemented.
> We have destroy-machine --force for how to clean things up when a unit
> agent is failing to progress, and we have regular "juju destroy-service"
> which should cascade to kill all the units already.
>
> ** Changed in: juju-core
> Status: Triaged => Won't Fix
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1183309
>
> Title:
> destroy-service should have a force option
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1183309/+subscriptions
>

Revision history for this message
John A Meinel (jameinel) wrote :

remove-machine --force already cascades to remove-unit for any units that
were seen as on that machine.
Is that not sufficient for the use case? Is the idea that you might have
multiple units on a machine and only want to clean up one of them?

John
=:->

On Sun, May 4, 2014 at 8:57 PM, Kapil Thangavelu <<email address hidden>
> wrote:

> This is a usability issue, we're making users clean up after juju. if you
> have units in error then lacking --force means manually correcting each
> unit (possibly multiple times) then finally destroying the service... and
> then going back and killing each machine.
>
>
> On Mon, Apr 28, 2014 at 2:03 PM, John A Meinel <<email address hidden>
> >wrote:
>
> > Per the discussion on lp:1089289 destroy-service --force is not going to
> > be implemented because destroy-unit --force is not going to be
> implemented.
> > We have destroy-machine --force for how to clean things up when a unit
> > agent is failing to progress, and we have regular "juju destroy-service"
> > which should cascade to kill all the units already.
> >
> > ** Changed in: juju-core
> > Status: Triaged => Won't Fix
> >
> > --
> > You received this bug notification because you are subscribed to the bug
> > report.
> > https://bugs.launchpad.net/bugs/1183309
> >
> > Title:
> > destroy-service should have a force option
> >
> > To manage notifications about this bug go to:
> > https://bugs.launchpad.net/juju-core/+bug/1183309/+subscriptions
> >
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> https://bugs.launchpad.net/bugs/1183309
>
> Title:
> destroy-service should have a force option
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1183309/+subscriptions
>

Curtis Hovey (sinzui)
Changed in juju-core:
status: Won't Fix → Triaged
milestone: none → next-stable
tags: added: usability
Revision history for this message
Casey Marshall (cmars) wrote :

I will implement this to have similar behavior to my 'juju-nuke' plugin (https://gist.github.com/cmars/8306216).

juju destroy-service --force will remove all units of the given service. Then it proceed to destroy all target machines/containers that were hosting these service units -- unless there are other co-located service units occupying said machines/containers.

Sound good?

Changed in juju-core:
assignee: nobody → Casey Marshall (cmars)
status: Triaged → In Progress
Casey Marshall (cmars)
Changed in juju-core:
status: In Progress → Incomplete
Revision history for this message
William Reade (fwereade) wrote :

Removing service units *before* checking for colocation is broken. We'll end up with machines that are still running the old-unit software, alongside the units that are still meant to be running.

Either of the following would go a long way toward fixing this problem:

  * fix lp:1206532: make destroy-unit also [force-]destroy the hosting machine (iff that machine hosts no other units/machines)
  * fix lp:1219902: make dying units ignore all hook errors; they just record them and move on to try the next one (or possibly fast-forward through a bunch of -broken hooks, followed by a "stop", which should be sufficient to make sure the software is not running, in even a minimally well-written charm)

...but "destroy-service --force" in itself suffers from exactly the same issues as did the WONTFIXed lp:1089289 -- it's not useful in isolation (because removing the unit model from the system leaves the unit software running), and becomes redundant if we start either fast-forwarding or force-destroy-machineing, in which case we want to do both those things by default, and should leave the current behaviour accessible only behind flags like --ensure-clean or --preserve-machine respectively.

Curtis Hovey (sinzui)
Changed in juju-core:
status: Incomplete → Triaged
Curtis Hovey (sinzui)
Changed in juju-core:
assignee: Casey Marshall (cmars) → nobody
Curtis Hovey (sinzui)
Changed in juju-core:
importance: High → Medium
milestone: next-stable → none
Revision history for this message
Anastasia (anastasia-macmood) wrote :

It looks like this discussion has led to the same place as "remove-unit --force".

Changed in juju-core:
status: Triaged → Won't Fix
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.