jails Issue with updating iocage basejail FreeBSD-12.2 to 12.2-p2

Hello,

I am running several jails on FreeBSD-12.2-RELEASE-p2 as host. All are "base" type jails and use FreeBSD-12.2 as a base and are managed with sysutils/py37-iocage.
Yesterday I decided to update the release base (used for the jails) to the latest patch level and I ran into a weird issue.

iocage produced some errors related to gunzip and the whole server rebooted! Never seen this behavior before.
Unfortunately I could not capture the output in order to show it here. What I noticed when the server rebooted is that the jailed services which rely on openssl (patch info) have not started producing an error related to libcrypto.so.111. Comparing this file in the host and the jail base showed differences. Apparently the file in the jail base release was corrupted so I ran the iocage update command once more. It did produce errors but now the files were the same and the services started successfully.
Here is the output of the second run:

Code:
# iocage update wwwjail
Snapshot: zroot/iocage/jails/wwwjail@ioc_update_12.2-RELEASE-p2_2020-12-10_13-24-53 created.
Updating jail...

* Updating 12.2-RELEASE to the latest patch level...
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 12.2-RELEASE from update4.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.
The following files will be updated as part of updating to
12.2-RELEASE-p2:
/usr/src/crypto/openssl/crypto/asn1/asn1_err.c
/usr/src/crypto/openssl/crypto/asn1/tasn_dec.c
/usr/src/crypto/openssl/crypto/err/openssl.txt
gunzip: (stdin): unexpected end of file
gunzip: (stdin): unexpected end of file
gunzip: (stdin): unexpected end of file
Installing updates...Installing updates...Installing updates...Installing updates...Scanning /zroot/iocage/releases/12.2-RELEASE/root/usr/share/certs/blacklisted for certificates...
gunzip: (stdin): unexpected end of file
Scanning /zroot/iocage/releases/12.2-RELEASE/root/usr/share/certs/trusted for certificates...
gunzip: (stdin): unexpected end of file
 done.
gunzip: (stdin): unexpected end of file
release: 12.2-RELEASE-p2 -> 12.2-RELEASE-p2
release: 12.2-RELEASE-p2 -> 12.2-RELEASE-p2
release: 12.2-RELEASE-p2 -> 12.2-RELEASE-p2
release: 12.2-RELEASE-p2 -> 12.2-RELEASE-p2
release: 12.2-RELEASE-p2 -> 12.2-RELEASE-p2
Updated jail successfully.

wwwjail updates have been applied successfully.

Now no matter how many times I run the update, the same output appears. Normally it should say that the jail is updated and there are no updates currently.

Anyone seen this?
 
Digging a little deeper, I now know what the issue is! :)
iocage downloads the source tree as part of fetching the release.
Something goes wrong with updating it. So I deleted the src folder completely, in my case it is under /zroot/iocage/releases/12.2-RELEASE/root/usr/src. Then I issued once more iocage update wwwjail and the result is ok since it skips the src component:
Code:
# iocage update wwwjail
Snapshot: zroot/iocage/jails/wwwjail@ioc_update_12.2-RELEASE-p2_2020-12-10_17-00-27 created.
Updating jail...

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

No updates needed to update system to 12.2-RELEASE-p2.
src component not installed, skipped
No updates are available to install.
Run '/tmp/tmpele0v9z5 fetch' first.
release: 12.2-RELEASE-p2 -> 12.2-RELEASE-p2
release: 12.2-RELEASE-p2 -> 12.2-RELEASE-p2
release: 12.2-RELEASE-p2 -> 12.2-RELEASE-p2
release: 12.2-RELEASE-p2 -> 12.2-RELEASE-p2
release: 12.2-RELEASE-p2 -> 12.2-RELEASE-p2
Updated jail successfully.

wwwjail updates have been applied successfully.

I hope it helps you too...
 
Back
Top