I want to upgrade from 13.0-U6.1 to 13.3-RELEASE but i currently have a jail that is already on 13.3 that has Plex inside. I don’t want to screw up the jail. Any risks or points of attention?
Concerning the jail? Shouldn’t be any issues.
I just upgraded Core to 13.3-RELEASE. All went well but i cannot seem to upgrade my nextcloud jail that is still on 13.2-RELEASE-p10 to 13.3-RELEASE. I did iocage fetch 13.3-RELEASE which went as planned but when i stop the jail execute iocage upgrade nextcloudv2 -r 13.3-RELEASE, it returns a bunch of errors and then restarts the jail:
root@truenas-e3-1270[~]# iocage upgrade nextcloudv2 -r 13.3-RELEASE
Snapshot already exists
Traceback (most recent call last):
File "/usr/local/bin/iocage", line 10, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/iocage_cli/upgrade.py", line 40, in cli
ioc.IOCage(jail=jail, skip_jails=skip_jails).upgrade(release)
File "/usr/local/lib/python3.9/site-packages/iocage_lib/iocage.py", line 2086, in upgrade
new_release = ioc_upgrade.IOCUpgrade(
File "/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_upgrade.py", line 236, in upgrade_basejail
self.__snapshot_jail__()
File "/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_upgrade.py", line 403, in __snapshot_jail__
ioc.IOCage(jail=self.uuid, skip_jails=True, silent=True).snapshot(name)
File "/usr/local/lib/python3.9/site-packages/iocage_lib/iocage.py", line 1719, in snapshot
ioc_common.logit(
File "/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_common.py", line 107, in logit
callback(content, exception)
File "/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_common.py", line 92, in callback
raise callback_exception(message)
iocage_lib.ioc_exceptions.Exists: Snapshot already exists
Any ideas?
i found some stuff in the old forums. It appears i had to remove the snapshot that was created during the upgrade. Did that, stopped the jail and now i am getting something else:
Mounting src into jail failed! Rolling back snapshot.
Well, a reboot fixed it. Just rebooted TrueNAS, stopped the jail and executed iocage upgrade and all went well
After having waited several days i have now upgraded the packages in the 13.3-RELEASE Nextcloud jail which i couldn’t before since 13.2 pkg was deprecated. That all went well and i now noticed that Python 3.11 was installed. Python 3.9 is still present though. I did a pkg autoremove -n to check whether py39 is still in use. Aparently it is not, together with some others. It seems not. Based on the below, is it safe to execute the autoremove command?
root@nextcloudv2:~ # pkg autoremove -n
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 36 packages:
Installed packages to be REMOVED:
argp-standalone: 1.5.0
dejavu: 2.37_3
encodings: 1.1.0,1
font-bh-ttf: 1.0.3_5
font-misc-ethiopic: 1.0.4
font-misc-meltho: 1.0.3_5
go120: 1.20.14_1
py39-anyio: 4.3.0
py39-async_generator: 1.10
py39-attrs: 23.2.0
py39-certifi: 2024.2.2_1
py39-cffi: 1.16.0
py39-cryptography: 42.0.7,1
py39-exceptiongroup: 1.2.1
py39-h11: 0.14.0
py39-h2: 4.1.0
py39-hpack: 4.0.0
py39-httpcore: 1.0.5
py39-hyperframe: 6.0.0
py39-idna: 3.7
py39-importlib-metadata: 7.1.0
py39-openssl: 23.2.0,1
py39-outcome: 1.3.0_1
py39-packaging: 24.1
py39-pyasn1: 0.6.0
py39-pycparser: 2.22
py39-pylsqpack: 0.3.18
py39-setuptools: 63.1.0_1
py39-sniffio: 1.3.1
py39-socksio: 1.0.0_1
py39-sortedcontainers: 2.4.0
py39-trio: 0.25.1
py39-typing-extensions: 4.11.0
py39-zipp: 3.19.0
python39: 3.9.19
xorg-fonts-truetype: 7.7_1
Number of packages to be removed: 36
The operation will free 366 MiB.
root@nextcloudv2:~ #
The clue is in “Snapshot already exists”.
iocage performs a snapshot of your jail before any attempt to update or upgrade. If that fails for some reason, any second attempt will fail because of the leftover snapshot.
Find that snapshot with zfs list -t snap | grep ...
and manually delete it.
Python 3.9 is still supported - if anything you need depends on that, you can always reinstall.
Thanks Patrick. I checked Nextcloud and all works well. I was under the assumption that autoremove checks if there still is any dependency, right? Is there a command that allows me only to remove py39 and leave the others just to be sure?
It does, but it does not know what scripts you might have installed outside of the package system, that don’t work with Python 3.11 …
It is recommended to run “pkg updating” before updating the pkg.
For example, for python, “pkg updating python|less”
The web also shows information on pkgs that are not installed, but you can see this information below.
https://cgit.freebsd.org/ports/plain/UPDATING
I am just concerned that with pkg autoremove, i am removing packages that will break my Nextcloud.
pkg autoremove removes orphan packages, why should it break your nextcloud?
Besides, you can always use pkg-set(8).
I don’t know. Because the list contains some packages that i have no clue what they do. So if the list contains something like argp-standalone, i get suspicious.
Nextcloud was installed from source using @dan s script. So there is really no telling what packages are necessary.
pkg autoremove does not touch explicitly installed packages.
Run pkg info -d -a | less
to check pkg dependencies.
Thanks for that. I think i will refrain from touching py39 until i know that Nextcloud uses py311 and i haven’t figured out yet how i can check which version is active.
I am confused now, if execute python --version in the nextcloud jail, this returns “command not found”. If i execute the same command in truenas root, it returns “Python 3.9.18”. However, if i execute “pkg version” in the nextcloud jail, it shows both 3.9 and 3.11 but i cannot execute the “pkg version” command in truenas root.
So Python seems to be installed in the jail but i cannot figure out which version is in use. Some thread mention a “make.conf” file but i cannot find that anywhere. Not in root nor in the jail.
Any ideas how to proceed?
Try python3 --version
.