[Trac-bugs] [PC-BSD Trac] #1296: Warden can't create template on zpool with altroot

PC-BSD trac at pcbsd.org
Tue Jul 15 18:18:17 PDT 2014


#1296: Warden can't create template on zpool with altroot
----------------------------------+-----------------------
 Reporter:  clinta                |      Owner:
     Type:  System Defect         |     Status:  new
 Priority:  major                 |  Milestone:
Component:  System Configuration  |    Version:  10-STABLE
 Keywords:                        |
----------------------------------+-----------------------
 Steps to reproduce (Tested on FreeBSD 10-STABLE with pcbsd-utils package
 installed:

 1. Have a zpool mounted with an altroot:
 {{{
 # zpool list
 NAME    SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
 tank   13.6T  8.03T  5.60T    58%  1.00x  ONLINE  /mnt
 }}}

 2. Configure Warden to use a dataset on this pool:
 {{{
 cat /usr/local/etc/warden.conf
 #!/bin/sh
 # Configuration options for the Warden
 ######################################################################

 # Network Interface for the jails to use
 NIC: tap0

 # Directory to use for compressing / decompressing files
 WTMP: /mnt/tank/jails

 # Location of the jails
 JDIR: /mnt/tank/jails
 }}}
 {{{
 # zfs list -r tank/jails
 NAME                                  USED  AVAIL  REFER  MOUNTPOINT
 tank/jails                           77.2M  4.30T  77.0M  /mnt/tank/jails
 }}}

 3. Create a template:
 {{{
 # warden template create -fbsd 10.0-RELEASE -arch amd64 -nick fbsd100
 Fetching jail environment. This may take a while...
 /mnt/tank/jails/.download/base.txz            100% of   59 MB 2109 kBps
 00m29s
 /mnt/tank/jails/.download/doc.txz             100% of 1394 kB  801 kBps
 00m02s
 /mnt/tank/jails/.download/games.txz           100% of  865 kB  565 kBps
 00m02s
 /mnt/tank/jails/.download/lib32.txz           100% of   14 MB 1874 kBps
 00m09s
 Creating ZFS /mnt/tank/jails/.warden-template-fbsd100 dataset...
 ERROR: Failed extracting ZFS template environment
 }}}

 Result:

 Warden creates a dataset with mountpoint in an absolute path below the
 altroot rater than a path relative to the altroot.
 {{{
 # zfs list -r tank/jails
 NAME                                  USED  AVAIL  REFER  MOUNTPOINT
 tank/jails                           77.2M  4.30T  77.0M  /mnt/tank/jails
 tank/jails/.warden-template-fbsd100   230K  4.30T   230K
 /mnt/mnt/tank/jails/.warden-template-fbsd100
 }}}

 Expected results, warden should create a path relative to the altroot. I'm
 not sure why warden was written to create explicit mountpoints anyway,
 rather than inheriting them from the parent dataset. This can make things
 annoying of someone wants to change the mountpoint of their jails dataset
 in the future.

--
Ticket URL: <http://trac.pcbsd.org/ticket/1296>
PC-BSD <http://trac.pcbsd.org>
PC-BSD Project Management


More information about the Trac-bugs mailing list