Closed autra closed 11 months ago
Hello,
We already recreate the venv if needed but only if we upgrade the source. And in the debian upgrade the package don't need at all case an upgrade of the package. Maybe I need to force to reinstall the source if the python version changed.
Well normally the upgrade should work as I already force to recreate the venv when the python version changed here: https://github.com/YunoHost-Apps/synapse_ynh/blob/master/scripts/upgrade#L165
We already recreate the venv if needed but only if we upgrade the source.
Yes, if there is an upgrade, it will work.
I think the hook would still be necessary to trigger such a reinstallation, what do you think?
Well yes in restoration we could add something to restore the venv if python version changed.
I don't get how the restoration script would help in case of a migration to another debian distro.
Describe the bug
When beta-testing the bullseye migration as described here on an instance with synapse_ynh installed, the synapse server fails to start after the serveur reboot.
Context
Steps to reproduce
Expected behavior
The service restarts correctly, the server is working
Actual behavior
The service does not start until the venv is recreated
Logs
the start error is:
Analysis
Migrating to bullseye involves recreating the venv of synapse, as synapse uses the system python3 (and it is updated when migrating to bullseye).
One possible fix would be to recreate the venv if python version is 3.9 and
/opt/yunohost/matrix-synapse/lib/python3.7/
exists during an upgrade. Admin would need to upgrade the app after bullseye migration, but it'll work.As discussed on the app channel, another possible fix is to implement a "distro upgrade" hook in yunohost core, and implement the venv recreation in this hook. The advantage of such approach is that admin won't need to do anything to have synapse in a working state after the upgrade. Another advantage is that the work would be done for next debian release (after bullseye). But it needs some work on yunohost itself.