files: the first nextcloud-cron run races the app-install oneshots and Nextcloud DELETES the freshly registered background jobs (richdocuments ObtainCapabilities, user_oidc CleanupSessions, calendar, contacts) — permanently, silently #1828
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1828
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
Whakatōhea Demo run #2 (gateway
134.199.167.181, founded 2026-09-23 22:38Z):oc_jobsholds none of the background jobs the founding's apps register — richdocumentsObtainCapabilities+Cleanup,OCA\Calendar\BackgroundJob\CleanUpOutdatedBookingsJob,OCA\Contacts\Cron\SocialUpdateRegistration,OCA\UserOIDC\Cron\CleanupSessions. Visible consequence: Collabora capabilities never fetched → no New document in Files (#1827). Invisible ones: user_oidc sessions never cleaned, calendar bookings never expired.Cause (journal + Nextcloud source on the box)
Timeline on the box:
nextcloud-setup.servicenextcloud-richdocuments(→22:39:11),nextcloud-calendar(→22:39:10),nextcloud-oidc(→22:39:10) — eachapp:install/app:enableregisters the app'sinfo.xmlbackground jobs inoc_jobsnextcloud-cron.servicestarts (unit isAfter=nextcloud-setup.serviceonly; timerOnBootSec=5m,OnUnitActiveSec=5m) and runs until 22:40:42ZCould not resolve OCA\Richdocuments\Backgroundjobs\ObtainCapabilities! Class … does not existOC\BackgroundJob\JobList::buildJob(Nextcloud 32.0.11,lib/private/BackgroundJob/JobList.php:319): when the container cannot build the job andclass_existsis false, it logs "failed to create instance of background job" and removes the row ("Remove job from disabled app or old version of an app"). The cron process loaded apps at 22:39:03 — before those apps were installed — so the freshly registered rows were unresolvable in that process and were deleted. They are never re-registered: onlyInstaller::installAppLastSteps(install) andAppManager::upgradeApp(version bump) add them;app:enableon an installed app does not.So every founding whose first cron run overlaps the app-install oneshots loses those jobs permanently. On a fast box it is a near-certainty (2 s gap here).
Fix
Order the first cron run after the app installs. Proposed: in the files render (
internal/clan/files.go), the node that renders any ofnextcloud-richdocuments/nextcloud-calendar/nextcloud-oidc/nextcloud-brandalso emitsfor exactly the oneshots it rendered (or
before = [ "nextcloud-cron.service" ]on each oneshot — same effect, pick the one that keeps the render honest about which units exist). Ordering only; norequires, so a failed oneshot does not block cron forever. Both units start in the same activation, so systemd holds cron's start job until the oneshots finish.Repair for the already-founded demo: no occ path re-adds jobs short of an app version bump. Options: (a) leave — the demo will re-register on the next richdocuments/calendar/user_oidc upgrade; (b) a one-off
occ app:remove+app:installis NOT acceptable for user_oidc (drops the provider config). Recommend (a) and note it in the ticket close-report; #1827'sactivate-configcovers the capabilities half regardless of the job.Acceptance criteria
nextcloud-cron.afternames every rendered app oneshot, and nothing when none is rendered).oc_jobscontainsOCA\Richdocuments\Backgroundjobs\ObtainCapabilitiesandOCA\UserOIDC\Cron\CleanupSessions(a post-founding probe over ssh:sudo -u nextcloud psql -d nextcloud -At -c "select class from oc_jobs where class like 'OCA\\Richdocuments%' or class like 'OCA\\UserOIDC%'").Could not resolve OCA\…line.Why it matters
A silent, permanent loss of every background job of every app installed by founding — on every community, not just the demo — with nothing red anywhere. #1020 was the last time the first cron activation bit us; this is the same window, a different wound.
swarm-claim host=matou-dev-server-01 run=31950
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1828 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope