#686 closed PBI Packaging Bug (fixed)

EasyPBI cannot clean up .chroot dataset if snapshots exist (PCBSD 9.1)

Reported by: gja Owned by: kris
Priority: minor Milestone: 9.1
Component: PBI Creator Version: 9.1-RC3
Keywords: EasyPBI Cc: trac-bugs@…

Description

I just used EasyPBI under PCBSD 9.1 (DVD x64 version) for the first time and stumbled across a quirk during "zfs destroy" after a build is successful.

I tweak my FreeBSD desktops to make zfs snapshots of all mounted zfs datasets every 15 minutes (and delete them every few hours). EasyPBI created a .chroot zfs dataset for its own use when I initiated "Build PBI". So now, while EasyPBI is doing its thing, my snapshot'ing script starts creating snapshots of the .chroot dataset every 15min.

When EasyPBI finishes building the local PBI, it trys to "zfs destroy" the .chroot dataset and fails. In particular, the log ends with:

	[...]
  Cleaning /usr/pbi/tetex-base-amd64.chroot
  cannot destroy 'tank1/usr/pbi/tetex-base-amd64.chroot': filesystem has children
  use '-r' to destroy the following datasets:
  tank1/usr/pbi/tetex-base-amd64.chroot@121230_0845
  tank1/usr/pbi/tetex-base-amd64.chroot@121230_0800
  tank1/usr/pbi/tetex-base-amd64.chroot@121230_0900
  tank1/usr/pbi/tetex-base-amd64.chroot@121230_0945
  tank1/usr/pbi/tetex-base-amd64.chroot@121230_0815
  tank1/usr/pbi/tetex-base-amd64.chroot@121230_0915
  tank1/usr/pbi/tetex-base-amd64.chroot@121230_0930
  tank1/usr/pbi/tetex-base-amd64.chroot@121230_0830

I suspect the solution is for EasyPBI to use "zfs destroy -r" rather than "zfs destroy", just to catch oddball cases like mine where the .chroot dataset ends up with children that really don't need to survive after the PBI build has succeeded.

Change History (2)

comment:1 Changed 17 months ago by kenmoore

  • Owner set to kris

Assigning this to Kris.

EasyPBI just enables the --delbuild option for pbi_makeport, so the "zfs destroy -r" command will need to be placed in the proper pbi_makeport function that handles the PBI build environment cleanup.

comment:2 Changed 10 months ago by kris

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.