iocage update jail returns error "Snapshot already exists!"

Created on 10 Apr 2019  路  3Comments  路  Source: iocage/iocage

Make sure to follow and check these boxes before submitting an issue! Thank you.

  • [ ] Supply iocage --version
    Version FreeNAS 11.2-U3
  • [ ] Supply the commands used, along with any steps to recreate it.
    root@freenas:/mnt/MyVolume/scripts# iocage update transmission
  • [ ] Provide the output from the command you issued.
    Snapshot already exists!
  • [ ] Supply what you expected the result or output to be
    I expect iocage to tell me that the jail patch level is already up to date or that it brings it up to date.
  • [ ] Checked that the problem has not already been fixed on master if using
    a stable release.
    Sorry, I'm not a developer, I wouldn't know how to do that.

Here is the output of

root@freenas:/mnt/MyVolume/scripts# iocage snaplist transmission
+---------------------------------+-----------------------+-------+-------+
|              NAME               |        CREATED        | RSIZE | USED  |
+=================================+=======================+=======+=======+
| auto-20190315.1618-1m           | Fri Mar 15 16:18 2019 | 184K  | 120K  |
+---------------------------------+-----------------------+-------+-------+
| auto-20190315.1618-1m/root      | Fri Mar 15 16:18 2019 | 1.55G | 36.2M |
+---------------------------------+-----------------------+-------+-------+
| auto-20190322.1618-1m           | Fri Mar 22 16:18 2019 | 184K  | 120K  |
+---------------------------------+-----------------------+-------+-------+
| auto-20190322.1618-1m/root      | Fri Mar 22 16:18 2019 | 1.55G | 36.2M |
+---------------------------------+-----------------------+-------+-------+
| auto-20190329.1618-1m           | Fri Mar 29 16:18 2019 | 184K  | 112K  |
+---------------------------------+-----------------------+-------+-------+
| auto-20190329.1618-1m/root      | Fri Mar 29 16:18 2019 | 1.55G | 16.0K |
+---------------------------------+-----------------------+-------+-------+
| ioc_update_11.2-RELEASE-p7      | Sat Mar 30  9:01 2019 | 184K  | 112K  |
+---------------------------------+-----------------------+-------+-------+
| ioc_update_11.2-RELEASE-p7/root | Sat Mar 30  9:01 2019 | 1.55G | 16.0K |
+---------------------------------+-----------------------+-------+-------+
| auto-20190405.1618-1m           | Fri Apr  5 16:18 2019 | 184K  | 120K  |
+---------------------------------+-----------------------+-------+-------+
| auto-20190405.1618-1m/root      | Fri Apr  5 16:18 2019 | 1.55G | 35.8M |
+---------------------------------+-----------------------+-------+-------+

If I delete the ioc_update snapshot and run iocage update transmission again, it works!

root@freenas:/mnt/MyVolume/scripts# iocage snapremove -n ioc_update_11.2-RELEASE-p7 transmission
Snapshot: MyVolume/iocage/jails/transmission@ioc_update_11.2-RELEASE-p7 destroyed.
root@freenas:/mnt/MyVolume/scripts# iocage update transmission
Snapshot: MyVolume/iocage/jails/transmission@ioc_update_11.2-RELEASE-p7 created.

* Updating transmission to the latest patch level...
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 11.2-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

No updates needed to update system to 11.2-RELEASE-p9.

WARNING: FreeBSD 11.2-RELEASE is approaching its End-of-Life date.
It is strongly recommended that you upgrade to a newer
release within the next 2 months.
src component not installed, skipped
No updates are available to install.
Run '/tmp/tmps8hertxn fetch' first.

transmission has been updated successfully.
invalid

Most helpful comment

@rm76 Ah this probably could use some deconstructing. Hopefully this helps explain:

iocage takes a snapshot in case something terrible happens during the update. That is not the same as the update succeeding, as the actual update itself is from a different program (freebsd-update) inside the jail. The message you're seeing is because the old behavior was to keep that snapshot even with success.

It is now removed on success, so you can do multiple iocage update foo in succession.

All 3 comments

This is by design :) In 11.3 you will not need to manually destroy the snapshot.

Thanks for the issue!

I see! No big deal. The man page says nothing about this new feature, though...
Just to clarify, does the message "Snapshot already exists!" mean that the jail's patch level is already up to date?
If so, maybe it's just me but I believe that a message like "No updates needed to update system to 11.2-RELEASE-p9." would be less ambiguous.
Thank you!

@rm76 Ah this probably could use some deconstructing. Hopefully this helps explain:

iocage takes a snapshot in case something terrible happens during the update. That is not the same as the update succeeding, as the actual update itself is from a different program (freebsd-update) inside the jail. The message you're seeing is because the old behavior was to keep that snapshot even with success.

It is now removed on success, so you can do multiple iocage update foo in succession.

Was this page helpful?
0 / 5 - 0 ratings