bin/165207: rctl(8) cannot identify jails via modified name
Brent
brent at beanfield.com
Thu Feb 16 17:20:10 UTC 2012
>Number: 165207
>Category: bin
>Synopsis: rctl(8) cannot identify jails via modified name
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Feb 16 17:20:09 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Brent
>Release: 9.0-RELEASE
>Organization:
>Environment:
FreeBSD freebsd 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Feb 14 11:01:47 EST 2012 root at freebsd:/usr/obj/usr/src/sys/RCTL amd64
>Description:
rctl(8) man page examples state:
rctl -hu jail:www
Display resource usage information for jail named "www".
If a jail is started with -n "name", rctl can correctly identify it. If a running jail's name is modified with `jail -m name="name"`, rctl cannot identify it, and continues to use the previous jail name. If no jail name was set upon jail creation, rctl can only identify it via its JID.
>How-To-Repeat:
JID 5 was started with -n "test1":
freebsd# jls
JID IP Address Hostname Path
5 10.1.1.1 test1 /usr/jails/test1
Accessible via name:
freebsd# jexec test1 tcsh
test1#
Show stats for jail named "test1":
freebsd# rctl -hu jail:test1|head
cputime=1681
datasize=16M
stacksize=0
coredumpsize=0
memoryuse=57M
memorylocked=0
maxproc=10
openfiles=0
vmemoryuse=937M
pseudoterminals=0
Modify jail name to "test2":
freebsd# jail -m name=test2 jid=5
Accessible via modified name "test2":
freebsd# jexec test2 tcsh
test1#
`rctl` has no knowledge of "test2":
freebsd# rctl -hu jail:test2|head
cputime=0
datasize=0
stacksize=0
coredumpsize=0
memoryuse=0
memorylocked=0
maxproc=0
openfiles=0
vmemoryuse=0
pseudoterminals=0
`rctl` still believes it's "test1":
freebsd# rctl -hu jail:test1|head
cputime=1900
datasize=16M
stacksize=0
coredumpsize=0
memoryuse=57M
memorylocked=0
maxproc=10
openfiles=0
vmemoryuse=937M
pseudoterminals=0
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list