Repository navigation
Description
Scope
Multi-replica Async Processors are not officially supported yet. This issue covers making upgrades and restarts of the single-replica processor the chart ships (replicas: 1, ap-deployments.yaml#L51) safe by default. Adding a replica count or multi-replica settings is out of scope.
Problem Statement
Every helm upgrade, helm rollback or config change replaces the single processor pod. These chart gaps decide whether in-flight work survives that.
- The update strategy is implicit, and on one replica it overlaps two versions. The chart sets no
strategy, so the Deployment uses the defaultRollingUpdate(25% / 25%), which on one replica rounds tomaxSurge: 1,maxUnavailable: 0. The new pod starts and consumes as soon as it is Ready, while the old pod is still draining. For up todrainTimeout, two processor versions share the same queue, retry queue and claim keys. A rollback does the same in reverse ([Feature]: Safe single-replica processor upgrades and rollbacks: mixed-version message handling and claim handback on shutdown #561). The chart neither documents this nor lets operators choose the alternative:Recreategives no overlap, but a short gap in consumption while the queue buffers. - The grace period can't follow the drain timeout.
terminationGracePeriodSeconds: 130is hardcoded (ap-deployments.yaml#L203), butdrainTimeoutis a value (default2m,values.yaml#L55). The llm-d guide says "Ensure your podterminationGracePeriodSecondsis at leastdrainTimeout" (async-processor.md#L154). RaisingdrainTimeoutabove roughly 130s silently breaks that rule: the kubelet SIGKILLs the only processor mid-drain, and its claims then wait out the lease ([Feature]: Safe single-replica processor upgrades and rollbacks: mixed-version message handling and claim handback on shutdown #561). - Config changes don't restart the pod. The pod template has no
checksum/configannotation, so ahelm upgradethat only changes the ConfigMap (worker pools, gates, transforms, merge policy) doesn't take effect. The llm-d multitenant guide works around this with a manualkubectl rollout restart deploy/llm-d-asyncafterhelm upgrade(multitenant/README.md#L740,#L753). - The in-repo chart version doesn't match releases.
Chart.yamlsays0.7.0, and the publish script overwrites it at release time. [Docs]: state the supported version skew between the producer library and the processor #544 notes this as a separate gap.
Two items that would normally come up here don't fit a single replica:
- PodDisruptionBudget: with one replica, a PDB of
minAvailable: 1ormaxUnavailable: 0blocks node drains indefinitely. Node drains should instead rely on graceful drain plus claim handback ([Feature]: Safe single-replica processor upgrades and rollbacks: mixed-version message handling and claim handback on shutdown #561). - preStop sleep: the processor is a pull consumer with no Service traffic to wait out.
Proposed Solution
-
Make the update strategy explicit, and document it. Add a
strategyvalue whose default is spelled out in the template. Document the trade-off for one replica:RollingUpdatewithmaxSurge: 1,maxUnavailable: 0: no gap in consumption, but two versions overlap until the old pod finishes draining.Recreate: no version overlap, but nothing consumes the queue from SIGTERM until the new pod is Ready.
Choosing the default is part of this issue.
-
Make
terminationGracePeriodSecondsa value. Default it todrainTimeoutplus a margin (e.g. 10s), and fail the render when it is set belowdrainTimeout. -
Add a
checksum/configpod annotation computed over the AP ConfigMap, so a config-onlyhelm upgraderolls the pod. Then remove the manualrollout restartsteps from the llm-d guides. -
Fix the chart version: keep
Chart.yamlversionandappVersionin sync with releases, or document that they are placeholders. -
Add helm-unittest cases for the above.
-
Keep
replicas: 1hardcoded for now, with a template comment saying multi-replica is not supported yet.
Part of llm-d/llm-d#3073 (llm-d components upgrade).
Activity
jtechapps commentedon Nov 18, 2026
Note: multi-replica llm-d-async is unsupported. Single upgrade restarts/upgrades are the only thing in scope.
sohom-cs commentedon Nov 18, 2026
The hardcoded 130s is the actual bug. On SIGTERM the runner drains for up to
drainTimeout, cancels whatever is left, and only then flushes it to the retry set with its claim renewed, so the next pod picks it up within one poll. Work only waits out the 300s lease when the kubelet kills the pod before that flush, and today anydrainTimeoutabove about 120s causes exactly that. The grace period should bedrainTimeoutplus that flush tail.@jtechapps, one decision before the PR: Helm can't parse Go durations. Either the template accepts single-unit values (
90s,2m) and fails the render on anything else, or a newdrainTimeoutSecondsdrives both the flag and the grace period, withdrainTimeoutkept as a deprecated alias. I'd go with the second.I'll take this. The first PR fixes the grace period and makes the strategy explicit, keeping
RollingUpdatewithmaxSurge: 1since cancelled work already comes back through retry and the overlap only hurts on envelope changes (#561). It also addschecksum/configwith helm-unittest cases./assign
sohom-cs commentedon Nov 25, 2026
Correction: Helm templates can parse Go durations, since sprig's
mustDateModifyrunstime.ParseDuration, the same parser behind--drain-timeout. So the first option can take any duration with no new value and is the smaller change; the second still gives an integer setting, and either works for me.