[cinder-csi-plugin] can not detach volume #2553
Labels
kind/bug
Categorizes issue or PR as related to a bug.
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug
What happened:
When pods are stopped, the Cinder volumes remain in status "reserved", resulting in errors when restarting the pod
What you expected to happen:
It should be possible to start the pod again without error
How to reproduce it:
Currently, the issue can be reproduced at will in the local environment.
Anything else we need to know?:
when pod is stopped, controllerplugin, container cinder-csi-plugin shows in its log:
I0216 15:11:38.327846 11 openstack_volumes.go:290] Successfully detached volume: 51f6ac5c-69e0-487a-bce7-f050f11a170c from compute: 0e5c3a64-3306-453d-bf94-6d4156d6dc2e
After scaling up to have the pod started again, the log reports
E0216 15:17:14.403924 11 controllerserver.go:209] Failed to AttachVolume: failed to attach 51f6ac5c-69e0-487a-bce7-f050f11a170c volume to 0e5c3a64-3306-453d-bf94-6d4156d6dc2e compute: Bad request with: [POST http://**openstack**:8774/v2.1/servers/0e5c3a64-3306-453d-bf94-6d4156d6dc2e/os-volume_attachments], error message: {"badRequest": {"code": 400, "message": "Invalid input received: Invalid volume: Volume 51f6ac5c-69e0-487a-bce7-f050f11a170c status must be available or in-use or downloading to reserve, but the current status is reserved. (HTTP 400) (Request-ID: req-4da2e9ee-2851-43ac-b535-95437cf6d186)"}}
cinder-api.log reports no errors on detach (just "Volume info retrieved successfully", "Begin detaching volume completed successfully", "[...]/action returned with HTTP 202")
Environment:
I0216 14:38:51.167889 11 driver.go:81] Driver: cinder.csi.openstack.org
I0216 14:38:51.167963 11 driver.go:82] Driver version: 2.0.0@v1.29.0
OpenStack version:
Cinder 17.4.1
Others:
Kubernetes v1.26.11+k3s2
runtime containerd://1.7.7-k3s1.26
"image": "registry.k8s.io/provider-os/cinder-csi-plugin:v1.29.0"
"imageRef": "registry.k8s.io/provider-os/cinder-csi-plugin@sha256:24d09525d215aad993b2319ec37a686d3470997c6f9ea73f30a82c2a53e7604d"
The text was updated successfully, but these errors were encountered: