Date: Thu, 29 Nov 2018 14:30:28 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 233637] bectl jail doesn't honour {jailID | jailName} Message-ID: <bug-233637-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
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} <boo= tenv> [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.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-233637-227>