See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240371
Make sure to follow and check these boxes before submitting an issue! Thank you.
iocage create --name basejail -r 13.4-RELEASE
iocage clone basejail --name depjail
iocage rename depjail depjail2
iocage destroy --recursive basejail
[root@jailhost-b ~]# iocage create --name basejail -r 13.4-RELEASE
basejail successfully created!
[root@jailhost-b ~]# iocage clone basejail --name depjail
depjail successfully cloned!
[root@jailhost-b ~]# iocage rename depjail depjail2
Jail: depjail renamed to depjail2
[root@jailhost-b ~]# iocage destroy basejail
This will destroy jail basejail
Are you sure? [y/N]: y
basejail has dependent jails (who may also have dependents), use --recursive to destroy:
depjail
This should show
basejail has dependent jails (who may also have dependents), use --recursive to destroy:
depjail2
The root of the problem is that the name of the dependent jails is determined by looking at the snapshot name.
So in the example above, the snapshots are still named @depjail after renaming:
zroot/iocage/jails/basejail@depjail 0B - 108K -
zroot/iocage/jails/basejail/root@depjail 0B - 1.49G -
Theoretically it could be possible to rename the snapshots to the new name on rename (which would also be less confusing when administering the system):
zfs rename -r zroot/iocage/jails/basejail@depjail zroot/iocage/jails/basejail@depjail2
In which case the destroy command works as expected:
[root@jailhost-b ~]# iocage destroy basejail
This will destroy jail basejail
Are you sure? [y/N]: y
basejail has dependent jails (who may also have dependents), use --recursive to destroy:
depjail2
I didn't check how complex this would be to fix in the rename command.
See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240371
Make sure to follow and check these boxes before submitting an issue! Thank you.
iocage --version:Version 1.8This should show
masterif usinga stable release.
The root of the problem is that the name of the dependent jails is determined by looking at the snapshot name.
So in the example above, the snapshots are still named @depjail after renaming:
Theoretically it could be possible to rename the snapshots to the new name on rename (which would also be less confusing when administering the system):
In which case the destroy command works as expected:
I didn't check how complex this would be to fix in the rename command.