From nobody@FreeBSD.org  Mon May  7 08:30:15 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 234791065674
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  7 May 2012 08:30:15 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 0F19B8FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  7 May 2012 08:30:15 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q478UE0N004304
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 7 May 2012 08:30:14 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q478UEhi004295;
	Mon, 7 May 2012 08:30:14 GMT
	(envelope-from nobody)
Message-Id: <201205070830.q478UEhi004295@red.freebsd.org>
Date: Mon, 7 May 2012 08:30:14 GMT
From: Filip Valder <filip@valder.cz>
To: freebsd-gnats-submit@FreeBSD.org
Subject: hastd conflicts with jails (jids)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         167673
>Category:       bin
>Synopsis:       hastd(8) conflicts with jails (jids)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pjd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 07 08:40:07 UTC 2012
>Closed-Date:    Sun May 13 11:41:41 UTC 2012
>Last-Modified:  Sun May 13 11:41:41 UTC 2012
>Originator:     Filip Valder
>Release:        8.3-RELEASE-p1
>Organization:
VB-TU Ostrava
>Environment:
FreeBSD hlidac-ha.ulice 8.3-RELEASE-p1 FreeBSD 8.3-RELEASE-p1 #2: Mon May  7 02:02:56 CEST 2012     root@hlidac-ha.ulice:/usr/obj/usr/src/sys/MYKERNEL  i386

>Description:
After upgrading, jls command shows the following output. On one of my jail provider it even messes JIDs (starting with 2). Furthermore, some JIDs are skipped randomly, so that the sequence is broken.

With 8.2-RELEASE:

   JID  IP Address      Hostname                      Path
     1  192.168.1.1     jail1                         /jail1
     2  192.168.1.2     jail2                         /jail2
     3  192.168.1.3     jail3                         /jail3
     4  192.168.1.4     jail4                         /jail4
     5  192.168.1.5     jail5                         /jail5
     6  192.168.1.6     jail6                         /jail6
     7  192.168.1.7     jail7                         /jail7
     8  192.168.1.8     jail8                         /jail8
     9  192.168.1.9     jail9                         /jail9

With 8.3-RELEASE(-p1):

   JID  IP Address      Hostname                      Path
     2  192.168.1.1     jail1                         /jail1
     3  -               hastd: hast0 (secondary)      /var/empty
     4  192.168.1.2     jail2                         /jail2
     5  192.168.1.3     jail3                         /jail3
     6  192.168.1.4     jail4                         /jail4
     8  192.168.1.5     jail5                         /jail5
     9  192.168.1.6     jail6                         /jail6
    10  192.168.1.7     jail7                         /jail7
    11  192.168.1.8     jail8                         /jail8
    12  192.168.1.9     jail9                         /jail9

>How-To-Repeat:
1) Install 8.3-RELEASE (and possibly update to 8.3-RELEASE-p1)
2) Enable hastd.
>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pjd 
State-Changed-When: nie 13 maj 2012 11:38:21 UTC 
State-Changed-Why:  
Jail IDs are like process ID - they are dynamically allocated and assigned. 
You cannot and should not rely on them being in any order. 
My recommendation would be to start using jail names, although I'm not sure 
they are already available in 8.3. 
As for HAST I might eventually turn off jail sandboxing, as capsicum 
sandboxing will be more than enough, but for now it has to stay that way and 
is really not a fix for your problem. 


Responsible-Changed-From-To: freebsd-bugs->pjd 
Responsible-Changed-By: pjd 
Responsible-Changed-When: nie 13 maj 2012 11:38:21 UTC 
Responsible-Changed-Why:  
I'll take this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=167673 
>Unformatted:
