illuria / jailer

Minimal, flexible, and easy-to-expand FreeBSD jail manager.
https://jailer.dev
BSD 2-Clause "Simplified" License
56 stars 5 forks source link

Eliminate incompatibilities with jails created/modified either manually or with other tools #5

Open kfv opened 2 years ago

kfv commented 2 years ago

At this time, we heavily rely on our internal structure, causing atrocious incompatibilities and pitfalls. I should investigate further to better comment, but I presume that one possible solution could be to improve the info command and use that to ensure there are no speculations about jails. In other words, anytime a command is to modify or deal with an attribute, the info command checks that attribute first, so the intended job happens on the right thing and not on a sloppy guess based on the internal design.

For instance, the ZFS mount point of a jail does not necessarily have to be ${JAILER_ZFS_DATASET}/${_name}. We follow that convention, right, but it doesn't mean we should believe all jails (whether or not created/modified by our jailer) follow that too.

antranigv commented 1 year ago

Hey Faraz.

As nice as this sounds, we probably wont care about this that much, as one of the design points of Jailer is that it's very opinionated.

That being said, I do recommend writing a parser with https://github.com/vishaps/voc that "converts" config files from other Jail orchestrtors to Jailer.

Given that the most common options are jail.conf (without directory style) and BastilleBSD, writing a converter for them would be a place to start.

Leaving this issue open until we write a converter for both of them.