Nextcloud app upgrade 32 → 33 → 34 #76

Merged
copper merged 2 commits from worktree-nextcloud-app-32-to-34 into main 2026-09-17 13:41:33 +00:00
Collaborator

Summary

Sequential major-version app upgrade for Nextcloud (task #8 of the infra update-audit): 32-apache → 33-apache → 34-apache, in two separate maintenance windows with a real-traffic soak between them, per the plan at ~/.claude/plans/2026-09-16-nextcloud-app-32-to-34-upgrade.md.

  • Hop 1 (32→33): uneventful mechanically, but surfaced a real incident — config/apps.config.php had been missing since the original 2026-07-04 Unraid migration, so all 10 app-store-installed apps (Calendar, Deck, Notes, Passwords, Talk, the Collabora bridge, notify_push, etc.) lived in the image-managed apps/ directory instead of the writable custom_apps/ path. The image's own upgrade entrypoint does rsync --delete against apps/ on every major version bump, which deleted 9 of those 10 apps' code outright (not just disabled) on first boot of the new image — notify_push included, which crash-looped push until fixed. No data was lost (recoverable via the pre-upgrade html backup, though not needed — fresh app-store installs were used instead). Fixed by adding the missing apps.config.php and reinstalling all 10 apps into custom_apps/; push's hardcoded entrypoint path was updated to match. Full writeup in ccnet-nextcloud-swarm/CLAUDE.md.
  • Hop 2 (33→34): clean — the apps.config.php fix let Nextcloud's own updater fetch NC34-compatible app-store releases automatically (deck 1.16.8→1.18.5, richdocuments 10.3.1→11.1.1, spreed/Talk 23.0.11→24.0.5) with no manual intervention. occweb (an obscure admin-tools app) has no NC34-compatible release upstream and was left disabled — a deliberate decision, not a gap.

Also caught and corrected mid-task: an earlier assumption (from the MariaDB 10.11→11.8 migration) that docker stack deploy preserves out-of-band docker service scale turned out to be false — it resets every service to its file-declared replica count on every deploy. No harm resulted (caught quickly, nothing degraded), but the migration pattern was changed to declare replicas: 0 in the stack file itself for the first deploy of each hop, matching the two-deploy pattern already used for the Postgres migrations.

An apparent ~14% oc_filecache row-count drop after hop 2 was investigated and exonerated — traced via the DB dumps taken before each hop to preview-cache cleanup that ran overnight after hop 1, entirely before hop 2 started. Not a data-loss regression.

Changes

  • ccnet-nextcloud-swarm/nextcloud-swarm-stack.yml: nextcloud/cron/push image tags 32-apache → 34-apache; push's entrypoint: updated from apps/notify_push/... to custom_apps/notify_push/....
  • ccnet-nextcloud-swarm/CLAUDE.md: documents the apps.config.php gap, root cause, and fix, plus confirms the Collabora pin (26.04.2.4.1) needed no change for either hop.
  • config/apps.config.php was added live on the CephFS bind mount (not tracked in this repo — app runtime config, not stack definition) with the image's stock apps_paths (shipped apps/ read-only, custom_apps/ writable).

Test plan

  • Hop 1: needsDbUpgrade: false, all 10 apps verified enabled via direct DB query (not occ app:list, unreliable under maintenance mode), oc_filecache count matched pre/post, occ richdocuments:activate-config (Collabora WOPI handshake) and occ notify_push:self-test (6/6) both clean, real HTTP check, overnight log audit across all 6 services (app log + container logs) found zero warnings/errors beyond expected internet bot-scan noise.
  • Hop 2: same verification suite, plus pre-flight app-compat check against app-store release listings before starting, and the oc_filecache investigation above.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TAp6m6GGf1PKfff1HKziBB

## Summary Sequential major-version app upgrade for Nextcloud (task #8 of the infra update-audit): `32-apache` → `33-apache` → `34-apache`, in two separate maintenance windows with a real-traffic soak between them, per the plan at `~/.claude/plans/2026-09-16-nextcloud-app-32-to-34-upgrade.md`. - **Hop 1 (32→33)**: uneventful mechanically, but surfaced a real incident — `config/apps.config.php` had been missing since the original 2026-07-04 Unraid migration, so all 10 app-store-installed apps (Calendar, Deck, Notes, Passwords, Talk, the Collabora bridge, notify_push, etc.) lived in the image-managed `apps/` directory instead of the writable `custom_apps/` path. The image's own upgrade entrypoint does `rsync --delete` against `apps/` on every major version bump, which deleted 9 of those 10 apps' code outright (not just disabled) on first boot of the new image — `notify_push` included, which crash-looped `push` until fixed. No data was lost (recoverable via the pre-upgrade `html` backup, though not needed — fresh app-store installs were used instead). Fixed by adding the missing `apps.config.php` and reinstalling all 10 apps into `custom_apps/`; `push`'s hardcoded entrypoint path was updated to match. Full writeup in `ccnet-nextcloud-swarm/CLAUDE.md`. - **Hop 2 (33→34)**: clean — the `apps.config.php` fix let Nextcloud's own updater fetch NC34-compatible app-store releases automatically (`deck` 1.16.8→1.18.5, `richdocuments` 10.3.1→11.1.1, `spreed`/Talk 23.0.11→24.0.5) with no manual intervention. `occweb` (an obscure admin-tools app) has no NC34-compatible release upstream and was left disabled — a deliberate decision, not a gap. Also caught and corrected mid-task: an earlier assumption (from the MariaDB 10.11→11.8 migration) that `docker stack deploy` preserves out-of-band `docker service scale` turned out to be false — it resets every service to its file-declared replica count on every deploy. No harm resulted (caught quickly, nothing degraded), but the migration pattern was changed to declare `replicas: 0` in the stack file itself for the first deploy of each hop, matching the two-deploy pattern already used for the Postgres migrations. An apparent ~14% `oc_filecache` row-count drop after hop 2 was investigated and exonerated — traced via the DB dumps taken before each hop to preview-cache cleanup that ran overnight after hop 1, entirely before hop 2 started. Not a data-loss regression. ## Changes - `ccnet-nextcloud-swarm/nextcloud-swarm-stack.yml`: `nextcloud`/`cron`/`push` image tags `32-apache` → `34-apache`; `push`'s `entrypoint:` updated from `apps/notify_push/...` to `custom_apps/notify_push/...`. - `ccnet-nextcloud-swarm/CLAUDE.md`: documents the `apps.config.php` gap, root cause, and fix, plus confirms the Collabora pin (`26.04.2.4.1`) needed no change for either hop. - `config/apps.config.php` was added live on the CephFS bind mount (not tracked in this repo — app runtime config, not stack definition) with the image's stock `apps_paths` (shipped `apps/` read-only, `custom_apps/` writable). ## Test plan - [x] Hop 1: `needsDbUpgrade: false`, all 10 apps verified enabled via direct DB query (not `occ app:list`, unreliable under maintenance mode), `oc_filecache` count matched pre/post, `occ richdocuments:activate-config` (Collabora WOPI handshake) and `occ notify_push:self-test` (6/6) both clean, real HTTP check, overnight log audit across all 6 services (app log + container logs) found zero warnings/errors beyond expected internet bot-scan noise. - [x] Hop 2: same verification suite, plus pre-flight app-compat check against app-store release listings before starting, and the `oc_filecache` investigation above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01TAp6m6GGf1PKfff1HKziBB
In-place major version bump via the official image's entrypoint upgrade
path (occ upgrade run manually after the entrypoint's own auto-upgrade
stalled on a lock-coordination edge case with a single replica). DB
schema migration clean (needsDbUpgrade: false), oc_filecache count
verified (979,128 vs. 979,127 pre-upgrade baseline -- a +1 from real
client activity during the window, not a loss).

Fixes push's entrypoint path from apps/notify_push/... to
custom_apps/notify_push/..., required by a separate fix documented in
ccnet-nextcloud-swarm/CLAUDE.md: config/apps.config.php had never been
configured since the 2026-07-04 Unraid cutover, so all 10 app-store apps
(calendar, deck, notes, notify_push, occweb, passwords, richdocuments,
spreed, tasks, twofactor_webauthn) lived in the image-managed apps/
directory instead of custom_apps/, and the entrypoint's rsync --delete
wiped 9 of them (calendar/circles are core-bundled in NC33, survived) on
this first major core bump since the cutover. Fixed by adding
config/apps.config.php (deployed live, not tracked in this repo -- app
config lives on the CephFS bind mount) and reinstalling all 10 apps via
occ app:install into the now-correct custom_apps/ path. Verified via
occ richdocuments:activate-config (Collabora WOPI handshake) and occ
notify_push:self-test (all 6 checks pass).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TAp6m6GGf1PKfff1HKziBB
Second and final hop of the sequential major version upgrade. Unlike hop
1, this one went cleanly through the image's own entrypoint auto-upgrade
path with no manual occ upgrade/app:install intervention needed -- the
config/apps.config.php fix from hop 1 let Nextcloud's own updater fetch
NC34-compatible app-store releases automatically for deck (1.16.8 ->
1.18.5), richdocuments (10.3.1 -> 11.1.1), and spreed/Talk (23.0.11 ->
24.0.5). occweb (0.2.3, no NC34-compatible release exists upstream) was
left disabled per user decision.

Verified: needsDbUpgrade false, all 10 custom_apps in their expected
enabled/disabled state via a direct oc_appconfig query, occ
richdocuments:activate-config (Collabora 26.04.2.4.1 WOPI handshake), occ
notify_push:self-test (6/6 checks pass), real HTTP check through Caddy.

oc_filecache count (843,723 vs. 979,127 pre-hop-1 baseline) looked like a
14% loss at first glance -- investigated via row counts in the pre-33 and
pre-34 DB dumps already on disk, which showed the drop had already
happened by 12:54 today, before hop 2's image bump even started. Traced
to preview-cache cleanup background jobs queued by hop 1's migration and
run by cron overnight (appdata_*/preview accounts for 589k of the 843k
rows; all files/* categories are intact). Not a hop 2 regression.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TAp6m6GGf1PKfff1HKziBB
copper merged commit 35a1df8a91 into main 2026-09-17 13:41:33 +00:00
Sign in to join this conversation.
No description provided.