Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Question about deleting jail with --recursive #443

Closed
3 tasks done
stratacast opened this issue Dec 12, 2017 · 2 comments
Closed
3 tasks done

Question about deleting jail with --recursive #443

stratacast opened this issue Dec 12, 2017 · 2 comments
Milestone

Comments

@stratacast
Copy link

stratacast commented Dec 12, 2017

  • Supply iocage --version
    0.9.9.2
  • Supply the commands used, along with any steps to recreate it.
    sudo iocage destroy --recursive postgreTest
  • Supply what you expected the result or output to be
    Delete only snapshots/dependant jails pertaining to that jail alone

I have been using ZAP to do my snapshots and replication on my server, and for the first time in a while, came to delete a jail. However, I was surprised to see this come up when deleting the jail:
postgreTest has dependent jails (who may also have dependents), use --recursive to destroy:

Before I start running commands all willy nilly, will this just delete the zfs datasets and related snapshots? e.g. - iocage/jail/postgreTest and its children along with iocage/jail/postgreTest@all_its_snapshots

I get the output saying it will delete:

  ZAP_myServer_2017-11-28T02:00:00-0800--3w
  ZAP_myServer_2017-11-29T02:00:00-0800--3w
  ZAP_myServer_2017-11-30T02:00:00-0800--3w
  ZAP_myServer_2017-12-01T02:00:00-0800--3w
  ZAP_myServer_2017-12-02T02:00:00-0800--3w
  ZAP_myServer_2017-12-03T02:00:00-0800--3w
  ZAP_myServer_2017-12-04T02:00:00-0800--3w
  ZAP_myServer_2017-12-05T02:00:00-0800--3w
  ZAP_myServer_2017-12-06T02:00:00-0800--3w
  ZAP_myServer_2017-12-07T02:00:00-0800--3w
  ZAP_myServer_2017-12-08T02:00:00-0800--3w
  ZAP_myServer_2017-12-09T02:00:00-0800--3w
  ZAP_myServer_2017-12-10T02:00:00-0800--3w
  ZAP_myServer_2017-12-11T02:00:00-0800--3w

to me, this reads iocage is going to nuke my entire parent snapshot of iocage@ZAP_myServer_2017-11-28T02:00:00-0800--3w and so on, not iocage/jails/postgreTest ZAP_myServer_2017-11-28T02:00:00-0800--3w and the like. If this will delete snapshots ONLY pertaining to the jail in question, I think there should be some wording that clarifies that

@skarekrow
Copy link
Member

This should only delete /iocage/jails/postgreTest and it's children + snaps. As always backup before anything destructive.

I will add the enhancement label on this to see if I can clarify the wording. Any suggestions? Please report back if this does destroy other datasets, that would be terrible.

@stratacast
Copy link
Author

Doing --recursive will only delete children + snaps as you say, which is great!

I think changing the wording [jailname] has dependant jails could be best suited as [jailname] has dependant snapshots/clones would clarify it more. Or say use --recursive to destroy jail's dependent snapshots/clones. That way someone may not mistake the outputted list as the list of whole snapshots that will be destroyed, and only children snapshots/clones

@gronke gronke added this to the 1.1 milestone Oct 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants