Bug 194105 - sysutils/ezjail with zfs_datasets does not work with /etc/rc.d/zfs
Summary: sysutils/ezjail with zfs_datasets does not work with /etc/rc.d/zfs
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
Depends on:
Reported: 2014-10-02 22:56 UTC by Bryan Drewery
Modified: 2020-06-17 07:38 UTC (History)
5 users (show)

See Also:
lwhsu: maintainer-feedback? (erdgeist)


Note You need to log in before you can comment on or make changes to this bug.
Description Bryan Drewery freebsd_committer 2014-10-02 22:56:02 UTC
The ezjail rc script:
  1. starts the jail first
  2. -> calls /etc/rc in the jail
  3. -> runs /etc/rc.d/zfs (and any other rc scripts which might depend on a /zfs path being mounted)
  4. Finally after the jail is started the ezjail rc script runs 'zfs jail' to attach the datasets.

This ordering makes the use of startup scripts impossible in the jail which depend on the ZFS dataset being jailed.

I'm not sure how to fix this without using a post_start script to restart rc services or to rework /etc/rc.d/jail to:
  1. start the jail
  2. zfs jail datasets
  3. jexec run the startcmd

I think the only sane thing is to fix /etc/rc.d/jail. I'm logging this as a tracking/discussion issue though.
Comment 1 Bugzilla Automation freebsd_committer 2014-10-02 22:56:02 UTC
Maintainers CC'd
Comment 2 John Marino freebsd_committer 2014-10-31 18:06:38 UTC
Moving this to "open" since maintainer was notified and there's no patch to apply with the timeout.
Comment 3 Martin Wilke freebsd_committer 2017-05-06 10:20:15 UTC

This this problem still relevant for the current systems?
Comment 4 Walter Schwarzenfeld freebsd_triage 2018-02-05 13:48:13 UTC
Same question: Is this still relevant?