YunoHost-Apps / peertube_ynh

Federated (ActivityPub) video streaming platform using P2P for YunoHost
https://joinpeertube.org/fr/
GNU Affero General Public License v3.0
87 stars 27 forks source link

Upgrading to peertube 4.1.1 from 4.0.0.0 failed, backup restoration failed: no more peertube at all! #325

Closed matlag closed 2 years ago

matlag commented 2 years ago

Describe the bug

Upgrade from peertube 4.0.0.0\~ynh2 to peertube 4.1.1\~ynh1 failed to install the last and then failed to restore the first.

Context

Steps to reproduce

Expected behavior

Upgrade to peertube 4.1.1~ynh2 to complete successfully

Logs

Link to logs

The upgrade itself seems to fail because of Prosody dependency.

The restoration of the backup is trickier: error message is the version of Yunohost of the backup is older than current (no update of system was done in the meantime, so this is a false assertion). Even better: I could restore peertube from my own backup (full one) that was done BEFORE attempting to upgrade the app, with no error.

yalh76 commented 2 years ago

Prosody didn't installed because you yunohost is not up to date: Requirements are not met for prosody, the package yunohost (BASH_XTRACEFD:) must be >= 4.3.0

matlag commented 2 years ago

Sorry, but I think you misread: my Yunohost's version is 4.3.6, so matching the condition >= 4.3.0.

But I figured why I get these failures: both the failure to install Prosody and the failure to restore Peertube from the backup done right before upgrade attempt. The clue was in peertube-pre-upgrade1.info.json: {"description": "", "created_at": 1658172281, "size": 1883347217, "size_details": {"system": {}, "apps": {"peertube": 1883346616}}, "apps": {"peertube": {"version": "4.0.0~ynh2", "name": "PeerTube", "description": "Video streaming platform using P2P directly in the web browser, connected to a federated network"}}, "system": {}, "**from_yunohost_version": "BASH_XTRACEFD:"**} So it looks like the warning related to BASH_XTRACEFD ends up as the return to the yunohost's version query. That explains the version check failure when attempting to install Prosody as well as the failure to restore Peertube.

I remember having that issue in the past on another instance and found a fix (or maybe we should consider it a workaround...): /bin/sh was pointing at bash dpkg-reconfigure dash Answer "Yes" to make it the default shell. /bin/sh now points at dash

No more BASH_XTRACEFD warning, no more error during Prosody install and Peertube upgrade. Solved!