Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Nov 2013 17:07:09 +0100 (CET)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        erdgeist@erdgeist.org
Subject:   ports/183930: [PATCH] sysutils/ezjail: Fix when many jails are there.
Message-ID:  <20131113160709.8944114269C@aragorn.in.absolight.net>
Resent-Message-ID: <201311131610.rADGA09n012869@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         183930
>Category:       ports
>Synopsis:       [PATCH] sysutils/ezjail: Fix when many jails are there.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 13 16:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Mathieu Arnold
>Release:        FreeBSD 9.2-RELEASE i386
>Organization:
Absolight
>Environment:
System: FreeBSD aragorn.in.absolight.net 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Fri Sep 27 03:52:52 UTC
>Description:
Mostly, when you have jails, jls will output something like :

# jls
   JID  IP Address      Hostname                      Path
     2  1.1.1.1  jail.example.net          /usr/jails/jail.example.net

But when you have had many jails, like when running poudriere, you end up with :
# jls
   JID  IP Address      Hostname                      Path
124740  1.1.1.1  jail.example.net          /usr/jails/jail.example.net

and ezjail breaks :-)

Port maintainer (erdgeist@erdgeist.org) is cc'd.

Generated with FreeBSD Port Tools 0.99_10 (mode: change, diff: SVN)
>How-To-Repeat:
>Fix:

--- ezjail-3.3.patch begins here ---
--- /usr/local/bin/ezjail-admin.orig	2013-11-13 17:03:22.842331352 +0100
+++ /usr/local/bin/ezjail-admin	2013-11-13 16:45:29.946330450 +0100
@@ -260,7 +260,7 @@
   fi
 
   [ -f "/var/run/jail_${ezjail_safename}.id" ] && ezjail_id=`cat /var/run/jail_${ezjail_safename}.id` || return
-  jls | grep -q -E "^ +${ezjail_id} " || unset ezjail_id
+  jls | grep -q -E "^ *${ezjail_id} " || unset ezjail_id
 }
 
 # fill the base jail - this function is used by install and update
--- ezjail-3.3.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131113160709.8944114269C>