conf/97166: Bug in /etc/rc.d/jail startup script

m m needacoder at gmail.com
Fri May 12 09:01:21 UTC 2006


>Number:         97166
>Category:       conf
>Synopsis:       Bug in /etc/rc.d/jail startup script
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 12 09:00:34 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     m m
>Release:        6.1
>Organization:
>Environment:
FreeBSD 6.1-STABLE #14: Thu May 11 23:14:19 EDT 2006
>Description:
Using the jail_list feature in rc.conf no longer works for starting up multiple jails at boot time if fstab.<jail> files are used for jail fstab.

Problem appears to be at or near these lines:

  # "/etc/fstab.${_j}" will be used for {,u}mount(8) if none is specified.
  eval jail_fstab=\"\${jail_${_j}_fstab:-${jail_fstab}}\"

the first jail starts up correctly, info output:

May 12 00:51:29 host root: /etc/rc: INFO: hosting root: /usr/jails/hosting/slash
May 12 00:51:29 host root: /etc/rc: INFO: hosting devdir: /usr/jails/hosting/slash/dev
May 12 00:51:29 host root: /etc/rc: INFO: hosting fdescdir: /usr/jails/hosting/slash/dev/fd
May 12 00:51:29 host root: /etc/rc: INFO: hosting procdir: /usr/jails/hosting/slash/proc
May 12 00:51:29 host root: /etc/rc: INFO: hosting ruleset: devfsrules_jail
May 12 00:51:29 host root: /etc/rc: INFO: hosting fstab: /etc/fstab.hosting
..
May 12 00:51:29 host root: /etc/rc: INFO: Mounting fstab for jail hosting (/etc/fstab.hosting)
..
May 12 00:51:30 host root: /etc/rc: INFO: devfs_domount(): mount-point is (/usr/jails/hosting/slash/dev), ruleset is (devfsrules_jail)

subsequent jails fail to start up, info output:

May 12 00:51:37 host root: /etc/rc: INFO: mysql root: /usr/jails/mysql/slash
May 12 00:51:37 host root: /etc/rc: INFO: mysql devdir: /usr/jails/mysql/slash/dev
May 12 00:51:37 host root: /etc/rc: INFO: mysql fdescdir: /usr/jails/mysql/slash/dev/fd
May 12 00:51:37 host root: /etc/rc: INFO: mysql procdir: /usr/jails/mysql/slash/proc
May 12 00:51:37 host root: /etc/rc: INFO: mysql ruleset: devfsrules_jail
May 12 00:51:37 host root: /etc/rc: INFO: mysql fstab: /etc/fstab.hosting
.. 
May 12 00:51:37 host root: /etc/rc: INFO: Mounting fstab for jail mysql (/etc/fstab.hosting)
.. 
May 12 00:51:37 host root: /etc/rc: WARNING: devfs_domount(): Unable to mount devfs on /usr/jails/mysql/slash/dev

it looks like jail_fstab remains set from the first jail (/etc/fstab.hosting) so second jail never mounts fstab.mysql and dies on devfs_domount().

>How-To-Repeat:

>Fix:
setting explicit jail_bla_fstab=/etc/fstab.bla will helps.


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list