Repository navigation
Description
🤖 Generated by the Agentic Engineer
Root cause
A stale iSCSI node record for a deleted Longhorn volume poisons the whole node-level iSCSI database, so every Longhorn engine startup on that node fails and no volume can attach there. Observed on prod-worker-2.
The engine's frontend startup runs iscsiadm -m node -T <target> -o show, which parses every record under /var/lib/iscsi/nodes/. One unparseable record makes the whole call exit 7:
Failed to startup frontend … iscsiadm -m node -T iqn.2019-10.io.longhorn:pvc-e1a09374… -o show
iSCSI ERROR: Unknown parameter name node.session.conn_reopen_log_freq
iSCSI ERROR: config file /var/lib/iscsi/nodes/iqn.2019-10.io.longhorn:pvc-7733aefd-fa85-4a67-b99b-f75fd6ef1a09/10.244.22.17,3260,1/default invalid
exit status 7
pvc-7733aefd-fa85-4a67-b99b-f75fd6ef1a09 no longer exists as a Longhorn volume — its node record outlived it, and carries a parameter the current iscsiadm rejects.
Why it surfaced now, and why it looked node-specific
/var/lib/iscsi survives reboots. prod-worker-2 rebooted at 2026-08-16T20:13:03Z (fresh bootID, 50 of 60 pods restarted in that window), which made iscsid re-read the on-disk database and start failing on the invalid record.
The signature is distinctive and worth recognising directly:
- Replicas keep working; only engines fail. Replica instances never call
iscsiadm; the engine frontend does. So the node looks healthy — instance-managerRunning,Ready=True,Schedulable=True, disks fine — while attaching anything to it is impossible. - Every Longhorn
Ready/RequiredPackages/KernelModulesLoadedcondition reportsTrue, so no Longhorn-level health check catches this. - The visible symptom is
ControllerPublishVolumetiming out withDeadlineExceeded, which reads like a slow attach rather than a node fault.
Live impact: 11 volumes attached cluster-wide, zero on prod-worker-2, and two CNPG instances (coroot-db-1, wedding-db-11) stuck in a pod-recreate/attach-timeout loop for 25+ minutes. Both clusters stayed served at ready=2 of 3, so this degraded redundancy rather than causing an outage.
Not a fleet-wide upgrade issue
Ruled out by measurement: every node runs iscsi-tools=v0.2.0 and Talos v1.13.8, and prod-worker-1/prod-worker-3 rebooted on 2026-08-12 and attach volumes normally (4 and 5 respectively). The fault is a node-local corrupt record, not a version skew.
Fix
Remove the stale record from the affected node, then let the engines start.
Prevention (the actual ask here)
Nothing removes an iSCSI node record when its Longhorn volume is deleted, and nothing detects an unparseable one. Two candidates, in the spirit of the existing longhorn-stale-node-cleanup CronJob:
- A health check that runs
iscsiadm -m node -o showper node and reports non-zero exit — this is the gap that let a storage node sit silently unable to attach. - A cleanup that prunes
/var/lib/iscsi/nodes/records whose IQN has no corresponding Longhorn volume.
Acceptance criteria
-
iscsiadm -m node -o showexits 0 on every storage node - All Longhorn volumes reach
attached;coroot-dbandwedding-dbreturn toready=3 - A stale or invalid iSCSI record is detected automatically rather than by a stuck database
Size: the immediate repair is one directory removal per affected node; the detection/cleanup work is a small CronJob.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Effort
Projects
- StatusShow more project fields🧊 Icebox
Activity
coderabbitai commentedon Aug 16, 2026
🔗 Related PRs
#3109 - fix(deploy): avoid redundant GHCR node reboots [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
docs(autoscaling): correct the affinity explanation and add a pre-dra…
devantler commentedon Aug 17, 2026
This issue is no longer linked for auto-closure by PR #3181, and remains open with its ask
untouched.
#3181 carried
Fixes #3180while turning onorphanResourceAutoDeletion: replica-data. That settingreclaims orphaned Longhorn replica data; it neither inspects
iscsiadm -m node -o showoutput norremoves a stale record under
/var/lib/iscsi/nodes/. So it cannot meet any of this issue's acceptancecriteria, and merging it would have closed this issue while the failure mode described here — a node
silently unable to attach any volume, with every Longhorn health condition reporting
True— stayedlive and undetected.
The link is corrected: #3181 now points at #3201, the separately-evidenced orphaned-replica-data
incident it genuinely fixes (14 orphaned directories, 24% free,
DiskPressure, two databases unable torebuild a third replica). The two are different failure modes that happen to share a component.
Still outstanding here, unchanged from the Prevention section above:
iscsiadm -m node -o showper node and reporting non-zero exit/var/lib/iscsi/nodes/records whose IQN has no corresponding Longhorn volumeOne sequencing note for whoever picks this up: a CronJob with a ServiceAccount lands in this
repository's rendered authorization surface, so it will move the aggregate fingerprint and needs
the re-approval procedure. Do not land it concurrently with another fingerprint-touching PR — the two
are mutually exclusive until one merges.
docs(longhorn): point the incident reference at the issue this change…
devantler commentedon Sep 27, 2026
Root cause found upstream: an open-iscsi 2.1.12 regression, fixed in 2.1.13
The
Unknown parameter name node.session.conn_reopen_log_freqfailure is not unique to this cluster. It is longhorn/longhorn#13733, traced to open-iscsi/open-iscsi#540. Longhorn QA reproduced it by upgrading open-iscsi from ≤2.1.11 to 2.1.12 while volumes were attached, and a reporter confirmed that open-iscsi 2.1.13 no longer fails. Longhorn now has a knowledge-base update for it (longhorn/website#1446).The platform picked up 2.1.12 through the Talos
iscsi-toolsextension. I readstorage/iscsi-tools/vars.yamlat eachsiderolabs/extensionstag:The
release-1.13branch is still on 2.1.12, so no 1.13 patch release carries the fix. That matches the timing here: both incidents (#3093 on 2026-08-11 and prod-worker-2 on 2026-08-16) came after nodes rebooted into the new extension.What this changes
Suggested order: (1) make sure the Talos 1.14 migration targets ≥ v1.14.1; (2) ship the detection check; (3) run the whitelist reap once after the upgrade, and keep it as a CronJob only if records keep turning up. Per the note above, (2) and (3) touch the authorization fingerprint, so neither should land at the same time as another change to it.
Re-verified 2026-10-07 (interactive Claude Code session): not delivered, nothing has changed.
maincarries no iSCSI record check and no record cleanup, so the third acceptance criterion (automatic detection) is unmet.Still missing, in order: Talos 1.14.1 or later on the nodes (through #3850), then the detection check. The detection check does not wait on the upgrade and can be built now.