juju destroy-service deletes openstack volumes

Bug #1592887 reported by Jacek Nykis
46
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Andrew Wilkins
juju-core
Won't Fix
Undecided
Unassigned
1.25
Won't Fix
Undecided
Unassigned

Bug Description

I am testing juju storage support in openstack and I noticed dangerous default behaviour.

I deployed my service like this:
juju deploy --repository=. --storage metrics=3G local:trusty/charmname

This worked fine and 3GB nova volume was attached to my instance. I wanted to redeploy my service so I run:
juju destroy-service charmname

Which silently wiped my nova volume.

This is IMO dangerous. One of the most important reasons I use nova volumes is that they are persistent so I think juju should prompt user before deleting data.

juju 1.25.5-trusty-amd64

Revision history for this message
Cheryl Jennings (cherylj) wrote :

What you're seeing is the expected behavior. Support for disassociating volumes from the lifetime of a service is a potential future enhancement, but it isn't currently implemented.

Changed in juju-core:
status: New → Invalid
Revision history for this message
James Troup (elmo) wrote :

Sorry, even if it's expected behaviour, it's wrong, dangerous and will inevitably cause data loss for Juju users if it's left this way.

Service (or 'application') and data are two separate things. I asked juju to destroy the service - not the data! And it's called persistent storage for a reason - you generally speaking want it to persist.

Changed in juju-core:
status: Invalid → New
Revision history for this message
Andrew Wilkins (axwalk) wrote :

James, I certainly see where you and Jacek are coming from. The flip side is that other people may not be aware that they're leaving storage behind, and that's going to cost them.

I think it would be reasonable if we required the user to make a choice when destroying a unit, application, model, or controller:

    juju destroy-unit --destroy-storage|--keep-storage

(flag names plucked out of the air, subject to bikeshedding)

If you want to keep some but not all storage, there would be separate commands to explicitly disassociate storage from a unit/application/model/controller that you would call prior to destroying. If you had any persistent storage remaining and failed to specify one of the flags, you'd get an error telling you to do so. What do you think?

Revision history for this message
Jacek Nykis (jacekn) wrote :

Andrew,

Yes those extra flags would solve the problem.
To make user experience even better we could have juju destroy-service and other command prompt user about storage something like:

$ juju destroy-service blah
WARNING: units use persistent storage. Delete persistent storage? [ynQ]

Revision history for this message
Stuart Bishop (stub) wrote :

How machines are reaped is specified in environment configuration. Should persistent volumes be the same?

Revision history for this message
James Troup (elmo) wrote : Re: [Bug 1592887] Re: juju destroy-service deletes openstack volumes

Stuart Bishop <email address hidden> writes:

> How machines are reaped is specified in environment configuration.
> Should persistent volumes be the same?

Sure; as long as the default is to keep them ;-)

--
James

Changed in juju-core:
status: New → Triaged
importance: Undecided → High
Paul Gear (paulgear)
tags: added: canonical-is
Changed in juju-core:
milestone: none → 2.0.0
tags: added: blocker
tags: removed: blocker
Revision history for this message
Richard Harding (rharding) wrote :

In talking with Andrew the issue is that Juju storage wasn't built to support this at this time. Even if we leave the volumes, there's not a mechanism to reuse that storage block on a new/different instance.

We need to add support in storage for this in order for this to work properly as expected in this use case.

Changed in juju-core:
milestone: 2.0.0 → 2.1.0
David Britton (dpb)
tags: added: landscape
affects: juju-core → juju
Changed in juju:
milestone: 2.1.0 → none
milestone: none → 2.1.0
Changed in juju-core:
importance: Undecided → Critical
status: New → Triaged
Changed in juju:
assignee: nobody → Alexis Bruemmer (alexis-bruemmer)
Changed in juju:
milestone: 2.1.0 → 2.0-beta18
Changed in juju-core:
status: Triaged → Invalid
importance: Critical → Undecided
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.0-beta18 → 2.0-beta19
Changed in juju:
milestone: 2.0-beta19 → 2.0-rc1
Changed in juju:
milestone: 2.0-rc1 → 2.0-rc2
Changed in juju:
milestone: 2.0-rc2 → 2.1.0
Changed in juju-core:
status: Invalid → Triaged
importance: Undecided → Critical
Changed in juju-core:
milestone: none → 1.25.11
Ryan Beisner (1chb1n)
tags: added: uosci
Revision history for this message
Andrew Wilkins (axwalk) wrote :

We are looking at making storage persistent by default in 2.2. When you destroy an application or unit, the storage will be left behind, and there will be new commands to destroy the storage.

Changed in juju:
milestone: 2.1.0 → 2.2.0
assignee: Alexis Bruemmer (alexis-bruemmer) → Andrew Wilkins (axwalk)
status: Triaged → In Progress
Revision history for this message
Anastasia (anastasia-macmood) wrote :

We have no plans to back-port persistent storage to 1.25.x. Marking this bug as Won't Fix for it.

Changed in juju-core:
status: Triaged → Won't Fix
importance: Critical → Undecided
milestone: 1.25.11 → none
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.2-beta1 → 2.2-beta2
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.2-beta2 → 2.2-beta3
Andrew Wilkins (axwalk)
Changed in juju:
milestone: 2.2-beta3 → 2.3-alpha1
Revision history for this message
Anastasia (anastasia-macmood) wrote :

PR against feature branch: https://github.com/juju/juju/pull/7186

Ian Booth (wallyworld)
Changed in juju:
status: In Progress → Fix Committed
Andrew Wilkins (axwalk)
Changed in juju:
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.