From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Mar 18 12:10:03 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B83C3106566B for ; Tue, 18 Mar 2008 12:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8F65F8FC22 for ; Tue, 18 Mar 2008 12:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m2ICA3vm068725 for ; Tue, 18 Mar 2008 12:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m2ICA3rM068719; Tue, 18 Mar 2008 12:10:03 GMT (envelope-from gnats) Resent-Date: Tue, 18 Mar 2008 12:10:03 GMT Resent-Message-Id: <200803181210.m2ICA3rM068719@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Hiroto Kagotani Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E18C106567A for ; Tue, 18 Mar 2008 12:02:50 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 798CA8FC19 for ; Tue, 18 Mar 2008 12:02:50 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m2IC2oUn012995 for ; Tue, 18 Mar 2008 12:02:50 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m2IC2oql012989; Tue, 18 Mar 2008 12:02:50 GMT (envelope-from nobody) Message-Id: <200803181202.m2IC2oql012989@www.freebsd.org> Date: Tue, 18 Mar 2008 12:02:50 GMT From: Hiroto Kagotani To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/121827: sysutils/ezjail: config-attached image jail can not be detached X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Mar 2008 12:10:03 -0000 >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@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: