From owner-freebsd-virtualization@freebsd.org Mon Nov 2 08:41:18 2015 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D823DA23AB7 for ; Mon, 2 Nov 2015 08:41:18 +0000 (UTC) (envelope-from doublef.mobile@gmail.com) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7257719C3 for ; Mon, 2 Nov 2015 08:41:18 +0000 (UTC) (envelope-from doublef.mobile@gmail.com) Received: by wicfx6 with SMTP id fx6so44745529wic.1 for ; Mon, 02 Nov 2015 00:41:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=U6QQ3oe1qukpNObs1BYS8MYQubhfxxSCrcfeCKC+2lo=; b=rdKrwfxTceC2Lo3nUYeyhHEff/YbG9u+sZJlOg8YZS7/NXzBoaq96NxV4/OxyqyCOd xyBI4+7+AbV3bsPn+tjv3zYLZMizHS7JOKrrUU3KfOAm29TzkiFEX+5imGsNO3d/5VPW nWdrkgk/etbZ6a5pEJwu8xyY9i8vRQIwlwwew8twpxS0VN+/5+KpPZHQN6Iq+YlB3tfd bMWgFzEL6+1lC9Sy22RrlsvHIcP5ovYFGrNAZBNaA9Ys8V3BN3J+Iayu3gDgABEoTIGX zuVcByU6BkIg8C/IR+FNdb4C+kGZp3+TZZnPJ8w96LEQ53//0jvNPQIgxlyuRCc1AJRF RZvQ== X-Received: by 10.194.20.135 with SMTP id n7mr21291699wje.95.1446453677003; Mon, 02 Nov 2015 00:41:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.178.3 with HTTP; Mon, 2 Nov 2015 00:40:57 -0800 (PST) In-Reply-To: References: <20151027145033.GA24588@dft-labs.eu> From: Sergey Zakharchenko Date: Mon, 2 Nov 2015 11:40:57 +0300 Message-ID: Subject: Re: Docker: jail: name cannot be numeric fix To: Mateusz Guzik Cc: freebsd-virtualization@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 08:41:18 -0000 2015-10-27 19:12 GMT+03:00 Sergey Zakharchenko : > Mateusz, > >> What's the significance of said names? > > None that I know of; I'm new to Docker so I might be wrong though. > >> The issue here is that said id may contain to letters, effectivley >> looking like a number > > ..the probability of that being (10/16)^12, which isn't too high but still > significant... A funny thing: Docker source (function GenerateRandomID in pkg/stringid/stringid.go) actually checks for a fully numeric ID and avoids it, because it causes other problems: // if we try to parse the truncated for as an int and we don't have // an error then the value is all numberic and causes issues when // used as a hostname. ref #3869 So the probability I mentioned is if fact zero and, ironically, fixing this small kernel bug could actually 'unbreak' Docker. Adjusting GenerateRandomID in the FreeBSD Docker port is another option, possibly faster to get into production. Best regards, -- DoubleF