linuxserver / docker-nextcloud

GNU General Public License v3.0
678 stars 128 forks source link

[BUG] Can't start nextcloud due to data version newer than image version #349

Closed evanwht closed 10 months ago

evanwht commented 10 months ago

Is there an existing issue for this?

Current Behavior

I followed the steps listed here.

I ran docker exec -it nextcloud updater.phar multiple times with the last update going from 26.0.5 > 27.0.2. I switched my image to lscr.io/linuxserver/nextcloud:version-27.0.0 but got an error message saying that the version of data is newer than the image version. I checked docker hub and the newest container image is 27.0.1 which is still behind the data version.

Expected Behavior

After updating nextcloud on the cmd line, nextcloud starts normally with the latest image version.

Steps To Reproduce

  1. Starting from older versions of nextcloud
  2. run docker exec -it nextcloud updater.phar until 27.x.x is installed
  3. update container image to be latest
  4. restart nextcloud

Environment

- OS: ubuntu 20
- How docker service was installed: distro's packagemanager

CPU architecture

x86-64

Docker creation

nextcloud:
    container_name: nextcloud
    restart: always
    image: lscr.io/linuxserver/nextcloud
    volumes:
      - ${DATADIR}/docker/nextcloud:/config
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
    networks:
      - traefik_proxy
      - default
    depends_on:
      - mariadb

Container logs

using keys found in /config/keys
Can't start Nextcloud because the version of the data (27.0.2.1) is higher than the docker image version (27.0.1.2) and downgrading is not supported. Are you sure you have pulled the newest image version?
github-actions[bot] commented 10 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

nemchik commented 10 months ago

this is actually pretty obnoxious on NC's part. The latest stable release on https://github.com/nextcloud/server/releases as of writing is v27.0.1 which means our stable releases are current. they have 27.0.2 RC (release candidate) pre-releases. our image only builds stable releases at the moment.

There isn't a great answer for this other than wait for them to release 27.0.2 as stable.

GuiPoM commented 10 months ago

Hello,

There is still something I don't understand, and this is getting "worse" since the image has been switched to the installation self contained. Nextcloud is asking for an update : 27.0.2. I can also see that on their github it is not indicated as released. But Nextcloud 27.0.2 IS released here: https://nextcloud.com/fr/changelog/ image Tag exists: https://github.com/nextcloud/server/tree/v27.0.2 https://github.com/nextcloud/server/tree/v27.0.2

So there is something inconsistent with this change, even if the update management is set to enterprise with a update page removed to avoid any issue, we rely on a delivery that is late behind the official release (maybe this is always a question of days, but keeping nextcloud up to date can be an administrative task that keeps sending notifications)

j0nnymoe commented 10 months ago

Nextcloud are yet to cut a release on their github https://github.com/nextcloud/server/releases which is why we don't have a tag for it yet.

this is getting "worse" since the image has been switched to the installation self contained.

This is purely a coincidence. It's not the first time they've messed up their releases.

GuiPoM commented 10 months ago

Can we get in touch with them to explain why a proper release process is very important to then be integrated in other services ? Maybe they are not aware that they are missing some steps after tagging, or they do it intentionnaly for an unknown reason. But I would expect a tag + a release as soon as they publish the zipfile on their website

I know that this is not the first time it happened, but until now I was able to force update if needed, here there is nothing I can do, and maybe also nothing that could be done here as we rely on nextcloud for getting the proper installation.

j0nnymoe commented 10 months ago

Opened an issue here https://github.com/nextcloud/server/issues/39845

Hopefully they see it soon or explain why it hasn't been released.

GuiPoM commented 10 months ago

Thank you ! ☺

mirisbowring commented 10 months ago

How can we bypass this problem for now? I am stuck with an offline nextcloud instance. Could i "just paste" the content of their 17.0.2 tag into my www folder?

j0nnymoe commented 10 months ago

Simply put, no.

nemchik commented 10 months ago

Our image now has a tag for lscr.io/linuxserver/nextcloud:version-27.0.2 Also the lscr.io/linuxserver/nextcloud:latest tag currently includes NC version 27.0.2 (and will update anytime this repo tags a new stable release at https://github.com/nextcloud/server/releases/latest ).

The best way to avoid this issue in the future is to get your instance updated to 27 and run a version specific tag for a 27.x.x or later (when those release in the future). latest is doable if you accept the risks.

The way this issue happened is people who were running a version of our image pre-27.x and ran the CLI updater, which updated to 27.0.2 before NC tagged 27.0.2 as the latest stable release. The CLI updater has been removed from our image (it is also removed in NC's official image).

I am also looking into removing the Update Notification NC app from our image. With that removed, the NC admin status page will not show when there is an update. The pros and cons there are that users won't be bugged about an update to a NC version that we don't have an image for (if this situation ever happens again) but users who look for that notification as an indication for when to update their docker image would need to switch to tracking releases on this repo instead. This also won't stop users from manually reinstalling the Update Notification app after the container starts (but they would have to do it after every container restart). So I'm not 100% sure how to handle it. p.s. NC's aio image also removes the update notification app, but this is not done in their standalone image.