From owner-freebsd-bugs@freebsd.org Thu Nov 29 14:30:30 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACB43113DED1 for ; Thu, 29 Nov 2018 14:30:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 4422F6E22D for ; Thu, 29 Nov 2018 14:30:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 02074113DED0; Thu, 29 Nov 2018 14:30:30 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D39B1113DECF for ; Thu, 29 Nov 2018 14:30:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 716D26E226 for ; Thu, 29 Nov 2018 14:30:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 9C1B4322E for ; Thu, 29 Nov 2018 14:30:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id wATEUSWe029971 for ; Thu, 29 Nov 2018 14:30:28 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id wATEUS5O029969 for bugs@FreeBSD.org; Thu, 29 Nov 2018 14:30:28 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 233637] bectl jail doesn't honour {jailID | jailName} Date: Thu, 29 Nov 2018 14:30:28 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 12.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dch@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Rspamd-Queue-Id: 4422F6E22D X-Spamd-Result: default: False [1.89 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_SPAM_LONG(0.57)[0.567,0]; NEURAL_SPAM_SHORT(0.65)[0.651,0]; NEURAL_SPAM_MEDIUM(0.68)[0.676,0]; ASN(0.00)[asn:10310, ipnet:2001:1900:2254::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 14:30:30 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233637 Bug ID: 233637 Summary: bectl jail doesn't honour {jailID | jailName} Product: Base System Version: 12.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: dch@freebsd.org So great to have this in base now. TLDR this looks like a manpage addition, and/or a command line parsing bug.= I'm happy to contribute text for the manpage changes, although it may need some massaging for man format. I want to create a named jail of an existing BE that has a name that is als= o an invalid jail name. According to my reading of bectl(8) this should work, passing in a name or = jid as the first parameter after: # bectl create next # bectl jail prison next specified boot environment does not exist could not mount bootenv The outcome I wanted, to create a jail with a known name/tag works just fin= e if I *don't* specify a parameter, however if you *need* to specify a parameter because the BE name is not a valid jail name, then we have a problem: for example: If the BE name is e.g. 12.0-RC2 then it's not possible to use bectl at all: # bectl list BE Active Mountpoint Space Created default NR / 2.13G 2018-11-27 10:34 12.0-RC2-update - - 636K 2018-11-29 13:59 # echo $RELEASE 12.0-RC2-update # bectl jail ${RELEASE} unable to create jail. error: 2 # bectl jail next ${RELEASE} specified boot environment does not exist could not mount bootenv # mount |grep be_; jls zroot/ROOT/12.0-RC2-update on /tmp/be_mount.WVe0 (zfs, local, noatime, nfsv4acls) JID IP Address Hostname Path Finally, it is actually still possible via: # bectl jail -o name=3Dnext ${RELEASE} # man bectl=20 jail {-b | -U} [{-o key=3Dvalue | -u key}]... {jailID | jailName} [utility [argument ...]] Creates a jail of the given boot environment. Multiple -o a= nd -u arguments may be specified. -o will set a jail parameter, and -u will unset a jail parameter. By default, jails are created in interactive mode and /bin/sh is executed within the jail. If utility is specified, it wi= ll be executed instead of /bin/sh. The jail will be destroyed = and the boot environment unmounted when the command finishes exe- cuting, unless the -U argument is specified. The -b argument enables batch mode, thereby disabling intera= c- tive mode. The -U argument will be ignored in batch mode. The name, host.hostname, and path may not actually be unset. Attempts to unset any of these will revert them to the defau= lt values specified below, if they have been overwritten by -o. All key=3Dvalue pairs are interpreted as jail parameters as described in jail(8). The following default parameters are provided: allow.mount true allow.mount.devfs true enforce_statfs 1 name bootenv host.hostname bootenv path Set to a path in /tmp generated by libbe(3). --=20 You are receiving this mail because: You are the assignee for the bug.=