ports/121827: sysutils/ezjail: config-attached image jail can not be detached
Hiroto Kagotani
hiroto.kagotani at gmail.com
Tue Mar 18 12:10:03 UTC 2008
>Number: 121827
>Category: ports
>Synopsis: sysutils/ezjail: config-attached image jail can not be detached
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Mar 18 12:10:03 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Hiroto Kagotani
>Release: 7.0-RELEASE
>Organization:
Okayama Univ.
>Environment:
FreeBSD myhost.mydomain 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 10:35:36 UTC 2008 root at driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
I created an image jail using ezjail-admin with create -i option and
attempted to configure the jail by attaching it successfully.
However when I attempted to detach the image jail, ezjail-admin
showed an error and couldn't detach it.
This is caused by mounting /dev/md* directly instead of mounting
*.device symlink when ezjail-admin is invoked with config -i attach option.
>How-To-Repeat:
# ezjail-admin update
# ezjail-admin create -i -s 10m foo.example.com 192.168.0.1
# ezjail-admin config -i attach foo.example.com
# ezjail-admin config -i detach foo.example.com
Error: Jail image file foo.example.com is not attached
>Fix:
--- ezjail-admin.orig 2008-03-18 20:51:41.000000000 +0900
+++ ezjail-admin 2008-03-18 20:54:21.000000000 +0900
@@ -782,10 +782,11 @@
# Clean image
fsck -t ufs -p -B /dev/${ezjail_device}
- mount /dev/${ezjail_device} ${ezjail_rootdir} || detach_images keep || exerr "Error: Could not mount /dev/${ezjail_device} to ${ezjail_rootdir}."
# relink image device
ln -s /dev/${ezjail_device} ${ezjail_rootdir}.device
+ mount ${ezjail_rootdir}.device ${ezjail_rootdir} || detach_images keep || exerr "Error: Could not mount ${ezjail_rootdir}.device to ${ezjail_rootdir}."
+
;;
detach)
# Check, if image really attached or running
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list