Closed himrock922 closed 5 years ago
A jail identified by id always assumes it to be existing. When creating it from a name, it is attempted to claim that id during creation.
import ioc
release = ioc.Release("11.2-RELEASE")
jail = ioc.Jail(dict(name="myjail"), new=True)
jail.create(release)
- jail = ioc.Jail(data=dict(id="myjail"), new=True)
+ jail = ioc.Jail(data=dict(name="myjail"), new=True)
The Handbook is wrong, I will update it accordingly. Thanks for reporting the mistake!
Hi all, I developing of jail hosting system via Django. the
ioc.Jail.create
function couldn't create jail system.Reference: https://bsdci.github.io/handbook/library-essentials/jail/
Sample Code:
After I did read above log, I think the below code happened problem.
https://github.com/bsdci/libioc/blob/master/ioc/Jail.py#L329
Before new jail system create, the code resolves
jail_name
from file system of existing jail...?Make sure to follow and check these boxes before submitting an issue! Thank you.
print(ioc.VERSION)
master
if using a stable release.