linuxserver / docker-nextcloud

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

[BUG] `EXTRA_FILE` when upgrading 26.0.2 to 27.1.4 #385

Closed vitoyucepi closed 4 months ago

vitoyucepi commented 7 months ago

Is there an existing issue for this?

Current Behavior

When upgrading from 26.0.2 to 27.1.4 I get the same result as described in #324. Some of the files in the nextcloud installation are marked as EXTRA_FILE.

Expected Behavior

No integrity check warnings.

Steps To Reproduce

  1. compose.yaml

    services:
     app:
       image: linuxserver/nextcloud:26.0.2
       restart: always
       environment:
         TZ: UTC
       volumes:
         - app_data:/data
         - app_config:/config
       ports:
         - 30443:443
     db:
       image: postgres:16.1-alpine
       restart: always
       volumes:
         - db_data:/var/lib/postgresql/data
       environment:
         TZ: UTC
         POSTGRES_DB: nextcloud
         POSTGRES_USER: nextcloud
         POSTGRES_PASSWORD: nextcloud
    
    volumes:
     db_data: {}
     app_config: {}
     app_data: {}
  2. Start compose project using docker compose up.

  3. Go to http://localhost:30443 and finish the initialization process.

  4. Run docker compose exec app occ integrity:check-core to verify that everything is fine.

  5. Stop compose project.

  6. Change linuxserver/nextcloud image tag from 26.0.2 to 27.1.4.

    compose.yaml ```yaml services: app: image: linuxserver/nextcloud:27.1.4 restart: always environment: TZ: UTC volumes: - app_data:/data - app_config:/config ports: - 30443:443 db: image: postgres:16.1-alpine restart: always volumes: - db_data:/var/lib/postgresql/data environment: TZ: UTC POSTGRES_DB: nextcloud POSTGRES_USER: nextcloud POSTGRES_PASSWORD: nextcloud volumes: db_data: {} app_config: {} app_data: {} ```
  7. Start compose project and wait until migration ends.

  8. Remove old nginx configs. docker compose exec app rm /config/nginx/ssl.conf /config/nginx/site-confs/default.conf.

  9. Restart compose project.

  10. Run docker compose exec app occ integrity:check-core to get the verification error.

Environment

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

CPU architecture

x86-64

Docker creation

services:
  app:
    image: linuxserver/nextcloud:27.1.4
    restart: always
    environment:
      TZ: UTC
    volumes:
      - app_data:/data
      - app_config:/config
    ports:
      - 30443:443
  db:
    image: postgres:16.1-alpine
    restart: always
    volumes:
      - db_data:/var/lib/postgresql/data
    environment:
      TZ: UTC
      POSTGRES_DB: nextcloud
      POSTGRES_USER: nextcloud
      POSTGRES_PASSWORD: nextcloud
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"

volumes:
  db_data: {}
  app_config: {}
  app_data: {}

docker compose up

Container logs

Init log ``` [migrations] started [migrations] 01-nginx-site-confs-default: executing... [migrations] 01-nginx-site-confs-default: succeeded [migrations] done usermod: no changes ─────────────────────────────────────── ██╗ ███████╗██╗ ██████╗ ██║ ██╔════╝██║██╔═══██╗ ██║ ███████╗██║██║ ██║ ██║ ╚════██║██║██║ ██║ ███████╗███████║██║╚██████╔╝ ╚══════╝╚══════╝╚═╝ ╚═════╝ Brought to you by linuxserver.io ─────────────────────────────────────── To support LSIO projects visit: https://www.linuxserver.io/donate/ ─────────────────────────────────────── GID/UID ─────────────────────────────────────── User UID: 911 User GID: 911 ─────────────────────────────────────── Setting resolver to 127.0.0.11 Setting worker_processes to 6 generating self-signed keys in /config/keys, you can replace these with your own keys if required .+......+......+.....+...+............+++++++++++++++++++++++++++++++++++++++*....+.+++++++++++++++++++++++++++++++++++++++*..+......+..+.........+...+.......+...+........+...+..........++++++ ......+...............+.+++++++++++++++++++++++++++++++++++++++*.+.....+++++++++++++++++++++++++++++++++++++++*.+.....+......+....+.....+.......+..+...+...+....+.....+......+....+..+.+...+.....+...........................+...+............+...+....+...+..+............+...+.......+...........+....+.........+...........+..........+.........+..............+.+.....+....+.....+............+....+...........+..........+...+.................+.+.....+.........+.........+.+...+.....+.+..+...+...............+.......+...+............+.....+...+......+.+........+......+.+..............+....+..+..........+.....+............+.+..............+.+.....+....+............+...........+...+......+...+.+......+...+...........+.+..................+...+...+...........+.+..............+.+....................+...++++++ ----- # do daily/weekly/monthly maintenance # min hour day month weekday command */15 * * * * run-parts /etc/periodic/15min 0 * * * * run-parts /etc/periodic/hourly 0 2 * * * run-parts /etc/periodic/daily 0 3 * * 6 run-parts /etc/periodic/weekly 0 5 1 * * run-parts /etc/periodic/monthly # nextcloud cron */5 * * * * s6-setuidgid abc php -f /config/www/nextcloud/cron.php cp: not replacing '/config/crontabs/root' [custom-init] No custom files found, skipping... [ls.io-init] done. ```
Upgrade log ``` [migrations] started [migrations] 01-nginx-site-confs-default: skipped [migrations] 02-default-location: executing... updating root in /config/nginx/site-confs/default.conf [migrations] 02-default-location: succeeded [migrations] done usermod: no changes ─────────────────────────────────────── ██╗ ███████╗██╗ ██████╗ ██║ ██╔════╝██║██╔═══██╗ ██║ ███████╗██║██║ ██║ ██║ ╚════██║██║██║ ██║ ███████╗███████║██║╚██████╔╝ ╚══════╝╚══════╝╚═╝ ╚═════╝ Brought to you by linuxserver.io ─────────────────────────────────────── To support LSIO projects visit: https://www.linuxserver.io/donate/ ─────────────────────────────────────── GID/UID ─────────────────────────────────────── User UID: 911 User GID: 911 ─────────────────────────────────────── using keys found in /config/keys Migrating legacy install (this can take a while) ...) Initializing nextcloud 27.1.4.1 (this can take a while) ... Upgrading nextcloud from 26.0.2.1 ... Setting permissions Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Setting log level to debug Turned on maintenance mode Updating database schema Updated database Updating ... Updated to 1.17.0 Updating ... Updated to 1.15.0 Updating ... Updated to 1.15.1 Updating ... Updated to 1.17.0 Updating ... Updated to 2.3.0 Updating ... Updated to 1.22.0 Updating ... Updated to 2.19.0 Updating ... Updated to 27.0.1 Updating ... Updated to 1.10.0 Updating ... Fix broken values of calendar objects Starting ... Clean up old calendar subscriptions from deleted users that were not cleaned-up 0/0 [>---------------------------] 0% Starting ... Updated to 1.27.0 Updating ... Updated to 1.19.0 Updating ... Updated to 1.17.0 Updating ... Updated to 1.20.0 Updating ... Updated to 1.17.0 Updating ... Updated to 2.9.0 Updating ... Updated to 1.17.0 Updating ... Updated to 2.16.0 Updating ... Updated to 1.16.0 Updating ... Updated to 2.15.0 Updating ... Updated to 1.17.0 Updating ... Migrate old user accessibility config 0/0 [->--------------------------] 0% Starting ... Updated to 2.2.0 Updating ... Updated to 1.8.0 Updating ... Updated to 7.7.0 Updating ... Updated to 1.17.0 Updating ... Updated to 2.8.0 Updating ... Updated to 1.6.0 Updating ... Updated to 2.12.0 Updating ... Updated to 1.11.0 Updating ... Updated to 1.17.0 Updating ... Updated to 1.6.0 Updating ... Updated to 1.2.0 Updating ... Updated to 1.17.0 Updating ... Updated to 1.9.0 Updating ... Updated to 1.10.0 Updating ... Updated to 1.15.0 Updating ... Updated to 3.8.0 Updating ... Updated to 1.16.0 Updating ... Updated to 1.17.0 Updating ... Updated to 1.7.0 Updating ... Updated to 2.1.0 Updating ... Updated to 1.7.0 Starting code integrity check... Finished code integrity check Update successful Turned off maintenance mode Resetting log level Initializing finished System config value filelocking.enabled set to boolean true System config value memcache.locking set to string \OC\Memcache\APCu System config value upgrade.disable-web set to boolean true **** The following active confs have different version dates than the samples that are shipped. **** **** This may be due to user customization or an update to the samples. **** **** You should compare the following files to the samples in the same folder and update them. **** **** Use the link at the top of the file to view the changelog. **** ┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐ │ old date │ new date │ path │ ├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤ │ 2022-08-20 │ 2023-08-13 │ /config/nginx/ssl.conf │ │ 2023-04-13 │ 2023-06-23 │ /config/nginx/site-confs/default.conf │ └────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘ [custom-init] No custom files found, skipping... [ls.io-init] done. ```
github-actions[bot] commented 7 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 6 months ago

https://github.com/linuxserver/docker-nextcloud/issues/324#issuecomment-1629767386 should fix the issue

vitoyucepi commented 6 months ago

Hi @nemchik, It seems that the suggested commands don't fix the problem.

  1. Create force migration file. docker compose exec app touch /config/www/nextcloud/config/needs_migration
  2. Restart container.

    Log ``` [migrations] started [migrations] 01-nginx-site-confs-default: skipped [migrations] 02-default-location: skipped [migrations] done usermod: no changes ─────────────────────────────────────── ██╗ ███████╗██╗ ██████╗ ██║ ██╔════╝██║██╔═══██╗ ██║ ███████╗██║██║ ██║ ██║ ╚════██║██║██║ ██║ ███████╗███████║██║╚██████╔╝ ╚══════╝╚══════╝╚═╝ ╚═════╝ Brought to you by linuxserver.io ─────────────────────────────────────── To support LSIO projects visit: https://www.linuxserver.io/donate/ ─────────────────────────────────────── GID/UID ─────────────────────────────────────── User UID: 911 User GID: 911 ─────────────────────────────────────── using keys found in /config/keys Initializing nextcloud 27.1.4.1 (this can take a while) ... Upgrading nextcloud from 27.1.4.1 ... Setting permissions Nextcloud is already latest version Initializing finished [custom-init] No custom files found, skipping... [ls.io-init] done. ```
Verification log ``` - EXTRA_FILE: - dist/user_status-dashboard.js.map: - expected: - current: da60bf4427a79837ac110897810e8907406816b201db662cec148a9568aab5f9d72b00cfdabf67f135819259173f0c80f345cdf51c970250feb900684ae37653 - dist/files_trashbin-files_trashbin.js: - expected: - current: 24e537aff151f18ae18af31152bcfd7de9c96f0f6fdcca4c1ad975ece80bb35a2ab7d51c257af6a9762728d7688c9ba37a5359a950eb1e9f401d4b9d875d92b2 - dist/files_trashbin-files_trashbin.js.map: - expected: - current: 65c2a7ddc654364d8884aaee8af4e506da87e54ae82f011989d6b96a625b0dbfba14be6d6af545fa074a23ccf2cc29043a411dc3ac1f80a24955c8a9faa28754 - dist/files_trashbin-files_trashbin.js.LICENSE.txt: - expected: - current: 2e40e4786aa1f3a96022164e12a5868e0c6a482e89b3642e1d5eea6502725061e2077786c6cd118905e499b56b2fc58e4efc34d6810ff96a56c54bf990790975 - dist/user_status-dashboard.js: - expected: - current: 878dc4256dbcd760a21a9539cf001c1847e631c5f701012cbd523a98e1c8793ad10c9decd991f61f79afcd691e23dee00ed775069250f280ced31b8ad60cc689 - ocm-provider/index.php: - expected: - current: 08dfc9087d9cfd97c73c3d9a462935ed95a131b7918b9a79af8aa1af1a5767a517265f3018bf2cdecad5d4cc09c5f37df7d57951664c4adfbe438fc496ebf09e - core/l10n/es_PR.js: - expected: - current: 8a453eb6d189d6dad17d6bfb6e6282ecc45bb1a7f44f3351faedd401768a7e20f5d5e31949614716afda1cb4e35d21697aee72920dec102b16facc3361065bf4 - core/l10n/es_419.js: - expected: - current: 24e780e0f1b993980f3279b560f3d3ce028122f944698de3bab532cb0696088857dc4d37a652cd46977e91f9c2b64661cc83b5001a3917bb4d28670da8672064 - core/l10n/es_PR.json: - expected: - current: 7c2e896382991ac8cdc0c5c7f08192b038fd4090cb8c5eed0ac8ec4a7659a8915644c63ab185f894cf85768637d34dede766f6175efdaf546d58ac87615c194b - core/l10n/es_419.json: - expected: - current: 2eb21ffd973c044d9c038d867208375f29bd7a645a9bd8a4142f4a50dee669f47d4fcf7a81c133d7f90b5168994cc239a105813e4f4b251c5c6149e50e18631e - core/l10n/ka_GE.js: - expected: - current: 4b4b41033da4f0a6fec11c46c65928ba201a919043b9136d37c4de0d548ff9199be2de8669f3d846ab6d6f23dafa349796edc2927f4c8b1c97ef3fc70dc05092 - core/l10n/ka_GE.json: - expected: - current: e0d586dc0058dafdfd85ed6603171985cc3f193bda90e0fe66a4d73588adabc96179c84c1fac69aa9b6c4aef754d6c800b50ba9d82f1f4343832e19336fad53d - core/l10n/es_PY.js: - expected: - current: a430ab3265a616c89a2d4611da5f67a7b19dccddb97eb2e4c5632dfffafcb80152bdbe7597e0b3b64c7343414cf0de3c233e43b5ee047aa9fb9549f48722ea2b - core/l10n/es_PY.json: - expected: - current: 0f20d12327249d9509ff87f32718844a487efa089c8c8d6903d36341054a99c67883763757c7325ed28c6cc62c49e80e1baa729c241f1f6521ac634c692f44e0 - core/l10n/es_PE.js: - expected: - current: 60249b11601dcf86be0088166fdf159e2a94a8c77552f49c68b481759ddcc52a9c8721ef68ffdcb53002c27bf2eced9b634f2d56c31f12eb168846ceb9231b17 - core/l10n/es_PE.json: - expected: - current: a4a8939dfefff2712812eb369619469cd110b5aba0247aaa75974e6a57eb59ece603b0488c711773cc1547ba2ec91f6eede8686a87e37829e7b4bf28df684375 - core/Command/Security/ResetBruteforceAttempts.php: - expected: - current: 0f5e0c3e998ac2db9d11279bdefb37240a69208b0dd9a6963eaaa04609ba4f900f7b404d43b9b4ca66c9555d805056c50c3ecff1ac8ab64a4ce3f5a98803685c - core/js/tests/specs/appsSpec.js: - expected: - current: cf1ff76b5129943a1ffd6ea068ce6e8bc277718b9d0c81dccce47d723e1f290be20f197b6543f17f3b2ac78d8d4986354db4103de2b5e31c76e00e248984605b - lib/private/Updater/ChangesResult.php: - expected: - current: d2e964099dfd4c6d49ae8fc2c6cbc7d230d4f5c19f80804d5d28df5d5c65786a37ea6f554deacecad679d39dbba0d6bd6e4edadca292238f45f18f080277dad0 - lib/private/Files/ObjectStore/NoopScanner.php: - expected: - current: 62d6c5360faf2c7fca90eaafa0e92f85502794a42a5993e2fe032c58b4089947773e588ad80250def78f268499e0e1d9b6b05bc8237cc946469cd6f1fb0b590c - lib/public/WorkflowEngine/IOperationCompat.php: - expected: - current: 6c09c15e9d855343cc33a682b95a827546fa56c20cc6a249774f7b11f75486159ebfe740ffcba2c9fa9342ab115e7bf99b8c25f71bb490c5d844da251b9751ed - lib/public/WorkflowEngine/IEntityCompat.php: - expected: - current: ea1856748e5fcf8a901597871f1708bdf28db69d6fa8771c70f38212f028b2ff744b04019230721c64b484675982d495a2c96d1175453130b4563c6a61942213 ```
nemchik commented 6 months ago

This should be resolved after the next time a new version is released (the container does some cleanup when it installs new versions) or you can manually remove the files. You may also try recreating the container (not just restarting) and this could also resolve the issue now that you've done the steps above.

vitoyucepi commented 6 months ago

Yes, I can confirm that upgrading from 26.0.2 -> 27.1.3 -> 27.1.4 fixes the problem. In my case, the integrity problem will be solved after upgrading to 27.1.5.

If you don't have a better solution, feel free to close the issue with won't fix status.

LinuxServer-CI commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

vitoyucepi commented 5 months ago

Ping @nemchik.

nemchik commented 5 months ago

Can you try running docker compose down app (in your case the container for nextcloud is names app, according to your compose) then bring it back up? This should stop and remove the container and then recreate it. It should ensure there are no leftover files from a prior install/upgrade/migration on the inside of the container. Your persistent files should still exist in /config and /data. All of the extra files mentioned look to be core and lib files, which normally exist inside the container, and if you recreate the container they shouldn't be there anymore.

You can check for the files by opening a terminal into the container, ex: docker exec -it app bash and then listing files/folders, ex: ls -lah /app/www/public/core or ls -lah /app/www/public/lib (note that there are a handful of folders listed in your extra files, you can check or all of them if you'd like). None of the extra files should exist if you've recreated the container (or pulled a new image to upgrade versions). Those paths are all internal to the container and should not persist through a recreate.

vitoyucepi commented 5 months ago

Thanks @nemchik, Yes, stopping and removing the container helps. This also happens when you upgrade from one version to another.

LinuxServer-CI commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

vitoyucepi commented 4 months ago

Hey @nemchik, Are we happy with the current level of the issue mitigation?

nemchik commented 4 months ago

Yes. I haven't seen many cases where updating the container image doesn't fix the issue.

github-actions[bot] commented 3 months ago

This issue is locked due to inactivity