Skip to content

MakeAvailable: Do not force the DRBD client role onto EBS initiators - #514

Open
mateo-moon wants to merge 1 commit into
LINBIT:masterfrom
mateo-moon:fix/make-available-ebs-initiator-client
Open

MakeAvailable: Do not force the DRBD client role onto EBS initiators#514
mateo-moon wants to merge 1 commit into
LINBIT:masterfrom
mateo-moon:fix/make-available-ebs-initiator-client

Conversation

@mateo-moon

Copy link
Copy Markdown

Fixes #513.

CtrlRscMakeAvailableApiCallHandler hardcodes drbdClient=true; since 69eae9987 ("Drbd: Add client role", first in v1.34.0) CtrlRscCrtApiHelper coerces any resource on a backing-device-less storage pool into DRBD_DISKLESS + client. EBS_INIT pools report no backing device, so EBS initiator resources — despite make-available correctly selecting the EBS_INITIATOR diskless type — additionally received DRBD_DISKLESS, never bound a target EBS volume, and every mount failed. This makes EBS-backed CSI volumes unusable on v1.34.

Skip the coercion when the requested flags carry EBS_INITIATOR: the satellite attaches a target replica's EBS volume locally, so the resource acts as a diskful DRBD node, not a client.

Testing: :controller:compileJava + checkstyle clean; behavior validated live on the reproducing cluster — the identical resource created manually with --ebs-initiator (i.e. without the coerced flags) binds, attaches, syncs and mounts correctly; E2E of this patch on a v1.34.1-based build is running now, results to follow in #513.

Since 'Drbd: Add client role', make-available passes drbdClient=true and
createResource coerces any resource on a backing-device-less storage
pool into DRBD_DISKLESS + client. EBS_INIT pools report no backing
device, so EBS initiator resources - despite make-available correctly
selecting the EBS_INITIATOR diskless type - additionally received
DRBD_DISKLESS and the client role. Such a resource never binds a target
EBS volume (no EBSVlmId), never attaches, and its DRBD device has no
data source, so every mount fails; EBS-backed CSI volumes are unusable
on v1.34.

Skip the client coercion when the resource is flagged EBS_INITIATOR:
the satellite attaches the EBS volume of a target replica locally, so
the resource acts as a diskful DRBD node.
@mateo-moon

Copy link
Copy Markdown
Author

E2E-validated live on a 3-AZ Kubernetes cluster (arm64/Nitro, v1.34.1 base + all four of our EBS fix PRs): full validation report in #506 (comment) (latest comment). Highlights relevant to this PR are listed there; the four fixes together make native EBS work end-to-end on latest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

make-available forces the DRBD client role onto EBS_INITIATOR resources (v1.34 regression) — EBS CSI volumes never attach

1 participant