helm icon indicating copy to clipboard operation
helm copied to clipboard

Allows jumps of multiple versions

Open kiriakos opened this issue 3 years ago • 1 comments

Hi, I noticed that NextCloud still cannot migrate over more than one major version, resulting in an unworkable and unrecoverable system. In order to help others avoid this tearful realization how about marking the image: section respectively, warning users to upgrade one version at a time?

Cheers

kiriakos avatar Mar 30 '21 03:03 kiriakos

For anyone who forgot this, like me (goofed and tried to run 21.0.2 over 19.0.12), and then set the image tag back a version but then Nextcloud says Can't start Nextcloud because the version of the data (21.0.2.1) is higher than the docker image version (20.0.10.1) and downgrading is not supported. Are you sure you have pulled the newest image version?

The quick and dirty fix is delete /var/www/html/version.php from the PV, restart the container (via kubectl delete po) to recreate version.php with the current version info, and you will see by the logs, it will think it needs to install a new Nextcloud. Restart it again and you can proceed with the upgrade.

In my case, I couldn't delete that file by execing something on the pod because of the container exiting immediately. But on the node that has the storage volume mounted for that pod, I was able to (as root) cd into that mount to delete it there. Don't know how messy that makes things, but it seems to have worked for me. Then I could finish the upgrade with the now-running 20.0.10 container.

export NEXTCLOUD_POD_NAME=`/usr/local/bin/kubectl get po -l "app.kubernetes.io/instance=nextcloud" -o jsonpath='{.items[0].metadata.name}'`
kubectl exec -it $NEXTCLOUD_POD_NAME -- bash
# inside the nextcloud pod bash:
su www-data -s /bin/bash
./occ upgrade
./occ maintenance:mode --off

I am using the mariadb installed by the chart. YMMV

ftab avatar May 27 '21 20:05 ftab

This is not possible with Nextcloud in general: https://docs.nextcloud.com/server/latest/admin_manual/maintenance/upgrade.html#approaching-upgrades

provokateurin avatar Jul 25 '24 10:07 provokateurin