S4 · size M · part of inbuxa for Kubernetes (tracking issue in inbuxa-charts)
Background tasks already take locks in the store. Confirm that two replicas of the default (all roles) group never do the same work twice: scheduled tasks and reports, store and account maintenance, metrics calculation, the outbound queue, DSNs.
Done when
24 h on kind with two replicas: no duplicate reports, sends or DSNs
Lock handover seen when one replica is killed
Answer recorded: may the core group default to 2 replicas?
**S4** · size M · part of inbuxa for Kubernetes (tracking issue in inbuxa-charts)
Background tasks already take locks in the store. Confirm that two replicas of the default (all roles) group never do the same work twice: scheduled tasks and reports, store and account maintenance, metrics calculation, the outbound queue, DSNs.
**Done when**
- 24 h on kind with two replicas: no duplicate reports, sends or DSNs
- Lock handover seen when one replica is killed
- Answer recorded: may the core group default to 2 replicas?
jcoffey-dev
added this to the 27.1 milestone 2026-11-18 05:14:37 +00:00
Answer (lab + code, 2026-11-18): no. Two replicas of the full-role group duplicate work.
Shown in the lab. Two core nodes (no INBUXA_ROLE), account purge set to hourly at :06. At 07:06:00 each node logged its own task-manager.task-queued type = "purgeAccounts", so the purge was queued and run twice.
Why (crates/services/src/task_manager/scheduler.rs). Every node with the taskScheduler role enqueues a fresh maintenance task when its local timer fires (purge accounts, purge data, purge blobs, domain checks). The task manager's locks stop one queued task running twice, not two tasks queued by two schedulers. evaluateAlerts and calculateMetrics run on every node with metricsCalculate, so alert mail would go out twice. Scheduled reports are safe (they take a store lock for the hour). This matches our own cluster, which keeps the scheduler on one node.
For the chart (27.1):
core (scheduler, metrics calculation, alerts, spam training) is exactly one replica; the values schema refuses more. Losing it pauses those jobs until Kubernetes reschedules it (about a minute); mail keeps flowing through front and mta, which scale freely.
front = role peer, mta = role peer-mta, as in the lab registry setup.
After 27.1: a cluster-wide lease for the singleton roles so core can run two replicas safely (server issue filed).
Other lab findings on the way: first boot works through a bootstrap-mode pod with INBUXA_RECOVERY_ADMIN pinned (without it the one-time password is printed to the pod log); a fresh store has listeners on 25/443/465/993/995/4190/8080 by default; server #436 (node up without its HTTP listener after a concurrent first start).
**Answer (lab + code, 2026-11-18): no. Two replicas of the full-role group duplicate work.**
**Shown in the lab.** Two core nodes (no `INBUXA_ROLE`), account purge set to hourly at :06. At 07:06:00 each node logged its own `task-manager.task-queued type = "purgeAccounts"`, so the purge was queued and run twice.
**Why (crates/services/src/task_manager/scheduler.rs).** Every node with the `taskScheduler` role enqueues a fresh maintenance task when its local timer fires (purge accounts, purge data, purge blobs, domain checks). The task manager's locks stop one queued task running twice, not two tasks queued by two schedulers. `evaluateAlerts` and `calculateMetrics` run on every node with `metricsCalculate`, so alert mail would go out twice. Scheduled reports are safe (they take a store lock for the hour). This matches our own cluster, which keeps the scheduler on one node.
**For the chart (27.1):**
- `core` (scheduler, metrics calculation, alerts, spam training) is **exactly one replica**; the values schema refuses more. Losing it pauses those jobs until Kubernetes reschedules it (about a minute); mail keeps flowing through `front` and `mta`, which scale freely.
- `front` = role `peer`, `mta` = role `peer-mta`, as in the lab registry setup.
**After 27.1:** a cluster-wide lease for the singleton roles so `core` can run two replicas safely (server issue filed).
Other lab findings on the way: first boot works through a bootstrap-mode pod with `INBUXA_RECOVERY_ADMIN` pinned (without it the one-time password is printed to the pod log); a fresh store has listeners on 25/443/465/993/995/4190/8080 by default; server #436 (node up without its HTTP listener after a concurrent first start).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
S4 · size M · part of inbuxa for Kubernetes (tracking issue in inbuxa-charts)
Background tasks already take locks in the store. Confirm that two replicas of the default (all roles) group never do the same work twice: scheduled tasks and reports, store and account maintenance, metrics calculation, the outbound queue, DSNs.
Done when
Answer (lab + code, 2026-11-18): no. Two replicas of the full-role group duplicate work.
Shown in the lab. Two core nodes (no
INBUXA_ROLE), account purge set to hourly at :06. At 07:06:00 each node logged its owntask-manager.task-queued type = "purgeAccounts", so the purge was queued and run twice.Why (crates/services/src/task_manager/scheduler.rs). Every node with the
taskSchedulerrole enqueues a fresh maintenance task when its local timer fires (purge accounts, purge data, purge blobs, domain checks). The task manager's locks stop one queued task running twice, not two tasks queued by two schedulers.evaluateAlertsandcalculateMetricsrun on every node withmetricsCalculate, so alert mail would go out twice. Scheduled reports are safe (they take a store lock for the hour). This matches our own cluster, which keeps the scheduler on one node.For the chart (27.1):
core(scheduler, metrics calculation, alerts, spam training) is exactly one replica; the values schema refuses more. Losing it pauses those jobs until Kubernetes reschedules it (about a minute); mail keeps flowing throughfrontandmta, which scale freely.front= rolepeer,mta= rolepeer-mta, as in the lab registry setup.After 27.1: a cluster-wide lease for the singleton roles so
corecan run two replicas safely (server issue filed).Other lab findings on the way: first boot works through a bootstrap-mode pod with
INBUXA_RECOVERY_ADMINpinned (without it the one-time password is printed to the pod log); a fresh store has listeners on 25/443/465/993/995/4190/8080 by default; server #436 (node up without its HTTP listener after a concurrent first start).Folded into the checklist on inbuxa/inbuxa-charts#14 to keep the issue list short. The details stay here; reopen this when work on it starts.