Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Mar 2012 08:39:15 -0600
From:      Jamie Gritton <jamie@FreeBSD.org>
To:        Nikos Vassiliadis <nvass@gmx.com>
Cc:        FreeBSD-Jail <freebsd-jail@FreeBSD.org>
Subject:   Re: jail name is interpreted as jid when numeric
Message-ID:  <4F6C8B13.1000508@FreeBSD.org>
In-Reply-To: <4F6B5EE6.8080006@gmx.com>
References:  <4F6B5EE6.8080006@gmx.com>

next in thread | previous in thread | raw e-mail | index | archive | help
It might seem clear with the dot-separated names that asd.asd.1 isn't
the same as jail 1. But looking from the viewpoint of asd.asd, that jail
would simply be "1". As jails may be referred to by either number or
name, it made sense to exclude jails whose name was a number, except in
the special case of it being the same as the jid. Otherwise there's the
confusion of a jail having two different numbers (one really being a
name), or of a number referring to two different jails.

So while this does seem to break the dot-separate namespace concept,
it's necessary because jails aren't always referred to by the full
hierarchical name.

- Jamie


On 03/22/12 11:18, Nikos Vassiliadis wrote:
> I found this somehow strange behavior and I am reporting it
> just to hear your opinions.
>
>> lab# jail -c name=asd persist
>> lab# jail -c name=asd.asd persist
>
> asd is interpreted as jail asd.asd
>
>> lab# jail -c name=asd.asd.1 persist
>> jail: jail 1 already exists
>
> 1 is interpreted as jail 1
>
> This has to do with the fact that a numeric name is interpreted as jid
> and this breaks the dot-seperated hierarchical jails concept.
> I find this behavior somehow strange. Is it intended or it's bug?
>
> Thanks for your insights, Nikos



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