Problem with pyznap if you upgrade from older Ubuntu version to 24.04 #50
Replies: 5 comments 3 replies
-
I just run into this problem on another system and renaming lib folder did not work. In this case one of the modules used by pyznap had changes that made it incompatible after the upgrade. I don't know much about python but maybe installing pyznap without virtual environment will solve the problem. Hopefully both python and system level modules will be upgraded with OS upgrade. If that it not the case likely manual intervention is required. |
Beta Was this translation helpful? Give feedback.
-
Unfortunately I can't test your new code with straight 24.04 install. As I indicated in another thread my systems do not boot when I try it. So I install 22.04 followed by upgrade to 24.04 and that is when pyznap incompatibilities show up. As a workaround I comment out pyznap install from your script and I do it as a separate step after the upgrade. This is of cause is less then ideal. I don't know any good pyznap replacements. |
Beta Was this translation helpful? Give feedback.
-
Yes, I run you pyznapinstall after the upgrade and it works perfectly. If it's going to break again in the future depends on what possible python versioning incompatibilities may be introduced. One suggestion is to make pyznapinstall execution optional as well as to make new script parameter that execute just that part. After OS upgrade there will be a need to run "sudo pyznap snap" and if it errors out execute your script with that new parameter. My understanding sanoid is written in perl and zepl in go. I have no idea how these languages manage versioning. |
Beta Was this translation helpful? Give feedback.
-
That's good to know, thank you for the feedback. I will consider making the pyznap reinstall an option. I have already done the same with reinstalling zfsbootmenu. |
Beta Was this translation helpful? Give feedback.
-
There is another user asking a question about upgrading on another thread. Could you share your experience on upgrading? It’s not something I’ve tested. |
Beta Was this translation helpful? Give feedback.
-
I upgraded from Ubuntu 23.10 to 24.04 and pyznap stopped working. It's especially problematic because it's called on any apt commands. It appears that root of the problem is that in pyznap virtual environment python is upgraded to 3.12 while the folder with python libraries is still under old version. I solved it by renaming /opt/pyznap/venv/lib/(old version name) to 'python3.12'.
Beta Was this translation helpful? Give feedback.
All reactions