2026-10-22: Mattermost daily file backup failed on a read-only mount of its volume¶
Kind: reference (incident report)
Severity: warning · Status: resolved · Resolved by: operator agent (the cause was fixed by a person in PR #630) · Duration: ~0:27 from detection to resolution, 15:06–15:33 UTC on 2026-10-24 (fault from 2026-10-22 04:00 UTC, cause fixed 2026-10-22 16:16 UTC) · Taskbase task: #1544
Summary¶
The first scheduled run of the daily Mattermost file backup, mattermost/mattermost-files-backup-29877360
(2026-10-22 04:00 UTC), did not start its pod. The pod-level readOnly mount of mattermost-data was
refused on Mattermost's node, so the Job ran into its 3-hour deadline and failed. PR #630 fixed the
mount the same day, and the next runs succeeded. The CronJob keeps one failed Job
(failedJobsHistoryLimit: 1), so KubeJobFailed kept firing until the operator deleted that Job on
2026-10-24.
Impact¶
- Services: the 2026-10-22 daily file backup of
mattermost-datawas not taken. Mattermost itself was not affected. - Users: none noticed; the alert is a warning.
- Data: none lost. For that day the newest copy of the files off the volume was the gate's
mattermost-preupgradebackup from 2026-10-21. The run on 2026-10-24 04:00 succeeded. - Duration: fault from 2026-10-22 04:00 UTC (Job start), alert from 07:15 UTC, cause fixed in the cluster at 16:16 UTC. Detected as Taskbase task #1544 on 2026-10-24 15:06 UTC and resolved at 15:33 UTC.
Timeline¶
All times UTC.
| Time | Event | Source |
|---|---|---|
| 10-21 06:57 | Daily file backup CronJob added, with readOnly: true on the mattermost-data claim (#1421) |
commit 50bbfd3 |
| 10-22 04:00 | mattermost-files-backup-29877360 starts; its pod is pinned to Mattermost's node and cannot mount the volume |
Job startTime, commit f78440c |
| 10-22 07:00 | Job fails: DeadlineExceeded, "Job was active longer than specified deadline" (activeDeadlineSeconds: 10800) |
Job status.conditions |
| 10-22 07:15 | KubeJobFailed starts firing (fingerprint de8c8e7ccf1044b9) |
Alertmanager |
| 10-22 16:14 | PR #630 merged by a person: pod-level readOnly dropped, the containers keep it |
commit 3a9055a |
| 10-22 16:16 | Flux applies the fixed CronJob | CronJob managedFields (kustomize-controller) |
| 10-24 04:00 | Daily run succeeds in 42 s | CronJob lastSuccessfulTime 04:00:42 |
| 10-24 15:06 | Detected: Taskbase incident #1544 created | Taskbase |
| 10-24 15:29 | Operator: alert still active, not silenced or inhibited |
Alertmanager API v2 |
| 10-24 15:33 | Operator deletes the failed Job | kubectl delete job |
| 10-24 15:33 | Resolved: Alertmanager has no KubeJobFailed alert in mattermost, and kube_job_failed{namespace="mattermost"} is empty |
Alertmanager API v2, Prometheus API |
Root cause¶
The CronJob pins its pod to the node where Mattermost runs (podAffinity), because mattermost-data
is a ReadWriteOnce hcloud volume that Mattermost already has mounted read-write there. The pod's
volume set persistentVolumeClaim.readOnly: true. That asks the hcloud CSI driver for a second,
read-only mount of a disk that is already mounted read-write, which fails
(mount failed: exit status 255 ... Resource busy). The pod never started, and
activeDeadlineSeconds ended the Job (the error text is from the fix commit f78440c; the pod and
its events were gone when this incident was worked). The Harbor copy Job had the same fault, fixed in #588 on
2026-10-21 13:54 UTC, after the Mattermost CronJob was written.
The alert outlived the fix because of a deliberate design choice. A successful Job is not kept
(its pod holds a 20 GiB work volume), but the last failed one is, for its log, and kube-state-metrics
reports kube_job_failed for as long as that Job exists. The fixed runs do not replace it; only a
newer failed Job would.
What the agent did¶
Runbook: KubeJobFailed: find why the Job failed, fix that, then remove the failed Job.
kubectl -n monitoring port-forward svc/alertmanager-operated 9093, thencurl -sG .../api/v2/alerts --data-urlencode 'filter=alertname="KubeJobFailed"': the alert formattermost-files-backup-29877360isactive,silencedBy: [],inhibitedBy: []. (A secondKubeJobFailedformonitoring/dashboard-deployerbelongs to another incident and was not touched.)kubectl -n mattermost get cronjob,job,podanddescribe job: JobFailed 0/1, no pods left; CronJoblastScheduleTime2026-10-24 04:00,lastSuccessfulTime04:00:42.kubectl -n mattermost get job mattermost-files-backup-29877360 -o jsonpath='{.status}':DeadlineExceeded, started 10-22 04:00:00, failed 07:00:02.git log -- components/mattermost,git show f78440c: the cause and its fix (PR #630).- Compared the
datavolume of the live CronJob ({"claimName":"mattermost-data"}) with the failed Job's ("readOnly":true): the cluster runs the fix, and the Job is from before it. flux get kustomizations -A --status-selector ready=false: at first a dependency wave from the newest commit (mattermostwaiting onshared-gateway). After 90 s, no output;mattermost,mattermost-preupgrade,mattermost-postupgradeReady atmain@efceec2c.flux get helmreleases -A --status-selector ready=false: no output.kubectl -n mattermost get pods,pvc: no pod or work PVC of the failed Job left, so deleting it removes no data. Owner:CronJob/mattermost-files-backup.- Write:
kubectl -n mattermost delete job mattermost-files-backup-29877360. This is the runbook's fix, needed because the cause was already fixed in Git and in the cluster. Exit 0,job.batch "mattermost-files-backup-29877360" deleted. - Polled Alertmanager: no
KubeJobFailedalert inmattermostat 15:33:34. Prometheus:kube_job_failed{namespace="mattermost"} > 0andALERTS{alertname="KubeJobFailed",namespace="mattermost"}both empty. No active silence matchesKubeJobFailed. - This report's pull request also adds the "delete the failed Job once fixed" step to Mattermost backups: Daily file backup.
No silence was set, and nothing was suspended or annotated.
Resolution and verification¶
- Alertmanager API v2: no
KubeJobFailedalert withnamespace="mattermost". - Prometheus:
kube_job_failed{namespace="mattermost"} > 0returns an empty vector. kubectl -n mattermost get job: onlymattermost-preupgrade(Complete),mattermost-rollback(Suspended, as designed) andmattermost-smoke(Complete).- The live CronJob mounts
mattermost-datawithout pod-levelreadOnly, as inmain. flux get kustomizations -A --status-selector ready=falseandflux get helmreleases -A --status-selector ready=false: no output.
Follow-ups¶
- none as tasks. The doc change in this pull request covers the missing step. A search of
components/found no other pod-levelreadOnlyon apersistentVolumeClaim.
References¶
- Alert:
KubeJobFailed,mattermost/mattermost-files-backup-29877360on hetzner-mgmt; runbook - Taskbase incident task: #1544
- Runs: the
operatorrun of #1544 on 2026-10-24 - Pull requests: #630 (the fix), #588 (the same fault in Harbor), this report's pull request
- Runbook sections: Mattermost backups: Daily file backup
Open questions¶
- The run on 2026-10-23 04:00 is not on record: successful Jobs are not kept, and
lastSuccessfulTimeshows only the newest one. It did not fail, because a failed Job from it would have replaced the one from 10-22. - This run did not list
<cluster>/mattermost/daily/in the backup store. The first restore drill, due 2026-10-25 05:00 UTC, restores the newest daily backup and will show whether it is usable. - The alert fired from 2026-10-22 07:15 but the Taskbase task was created on 2026-10-24 15:06.
The record does not show why. It is probably the
taskbasereceiver that was down until #1516 (see the Alertmanager incident), as in #1542.