bsdpot / pot

pot: another container framework for FreeBSD, based on jails, ZFS and pf
BSD 3-Clause "New" or "Revised" License
341 stars 31 forks source link

Allow running flavour scripts on non-persistent pots #241

Closed grembo closed 1 year ago

grembo commented 1 year ago

Fixes #238

grembo commented 1 year ago

@bretton This patch should fix your problem, could you please give it a shot?

bretton commented 1 year ago

@bretton This patch should fix your problem, could you please give it a shot?

no luck, it doesn't start the first jail either, just goes straight to the error.

###>  pot name-amd64-13_1 is not in a state where it can start
fbsd-update.sh -> /mnt/srv/pot/jails/name-amd64-13_1/m/tmp/fbsd-update.sh
=====>  Executing fbsd-update script on name-amd64-13_1
jexec: jail "name-amd64-13_1" not found
###>  create: flavour fbsd-update failed (script)

and without -f fbsd-update

###>  pot name-amd64-13_1 is not in a state where it can start
name.sh -> /mnt/srv/pot/jails/name-amd64-13_1/m/tmp/name.sh
=====>  Executing name script on name-amd64-13_1
jexec: jail "name-amd64-13_1" not found
###>  create: flavour name failed (script)
grembo commented 1 year ago

That sounds like you have some leftover files from a previous failed start. Check jls if anything is running and then remove /tmp/pot_status* files.

bretton commented 1 year ago

remove /tmp/pot_status* files.

aha, this did the trick and patch worked this time

grembo commented 1 year ago

@bretton Luca fixed a bug in #235 where destroy left status files behind (which is what you might be experiencing here and unrelated to the problem).

grembo commented 1 year ago

This is the patch in question:

https://github.com/bsdpot/pot/commit/c11c744aae15f289b1e8bb9b7add554e575045d6.diff#diff-f2bfc9bdc864b91bd44c3884e3e777844f866e1c78898d7f1db4c7ad2bf98100

I think it's time to tag a new release soon.

grembo commented 1 year ago

As this was tested successfully (locally + one user), I'll merge it