Skip to content

Commit 633da44

Browse files
committed
Version v4.0.1
1 parent 40dcbb3 commit 633da44

6 files changed

Lines changed: 539 additions & 20 deletions

File tree

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
## unreleased
22

3+
## v4.0.1 - 2026.06.04
4+
5+
Fixes a LUKS volume handling bug that could leave a volume stuck attached to a node after pod termination, surfacing later as a `Multi-Attach error`
6+
when the workload was rescheduled. The node plugin now verifies that an existing LUKS mapping is backed by the expected device before reusing it,
7+
and rejects a staging path that is already mounted from an unexpected source.
8+
9+
In addition, every gRPC handler now uses a request-scoped logger, so log lines include the volume and request context that triggered them.
10+
11+
### Detecting whether you were affected
12+
13+
The bug surfaces in two places, neither of which is the csi-cloudscale logs:
14+
15+
- `kube-controller-manager` logs (or the pod's events):
16+
`Multi-Attach error: volume is already exclusively attached and can't be attached to another node`
17+
- `kubelet` logs on the node listed in `attachedTo=[...]`: repeated
18+
`GetDeviceMountRefs check failed for volume ... is still mounted by other references` entries, typically every ~2 minutes.
19+
20+
### Recovering a stuck volume
21+
22+
Upgrading to v4.0.1 prevents new occurrences but does not clean up volumes that are already stuck. To recover one:
23+
24+
1. From the `Multi-Attach error` message, note the affected node listed in `attachedTo=[...]`. Confirm no pod is actively using the
25+
volume on that node (`kubectl get pods --all-namespaces -o wide` and check mount refs under `/var/lib/kubelet/pods/`).
26+
2. Cordon the node so no new workloads land on it during recovery: `kubectl cordon <node>`.
27+
3. On that node, inspect the stale state. They are the duplicated `.../globalmount` paths that share a `(major, minor)`:
28+
- `findmnt | grep globalmount`
29+
4. `umount` each stale staging path. Once `/proc/self/mountinfo` is clean, kubelet's next `NodeUnstageVolume` retry (within ~2 minutes) succeeds.
30+
The csi-cloudscale node plugin runs `cryptsetup close` itself as part of that unstage, the `VolumeAttachment` is deleted,
31+
and the cloudscale API detaches the volume. The next pod can then attach it elsewhere.
32+
5. Uncordon the node: `kubectl uncordon <node>`.
33+
34+
If a leftover `/dev/mapper/pvc-<name>` is still present after several minutes, close it manually with `cryptsetup close pvc-<name>` once
35+
nothing references it. If you cannot identify or clear the stale state safely, rebooting the node is a valid fallback.
36+
Kernel state is discarded and the volume detaches on the next reconcile.
37+
338
## v4.0.0 - 2026.03.30
439
⚠️ See the [update instructions](https://github.com/cloudscale-ch/csi-cloudscale#from-csi-cloudscale-v3x-to-v4x).
540

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ secret `my-pvc-luks-key`.
6464
## Releases
6565

6666
The cloudscale.ch CSI plugin follows [semantic versioning](https://semver.org/).
67-
The current version is: **`v4.0.0`**.
67+
The current version is: **`v4.0.1`**.
6868

6969
* Bug fixes will be released as a `PATCH` update.
7070
* New features (such as CSI spec bumps) will be released as a `MINOR` update.
@@ -92,15 +92,15 @@ We recommend using the latest cloudscale.ch CSI driver compatible with your Kube
9292
| 1.25 | v3.3.0 | v3.5.6 |
9393
| 1.26 | v3.3.0 | v3.5.6 |
9494
| 1.27 | v3.3.0 | v3.5.6 |
95-
| 1.28 | v3.3.0 | v4.0.0 |
96-
| 1.29 | v3.3.0 | v4.0.0 |
97-
| 1.30 | v3.3.0 | v4.0.0 |
98-
| 1.31 | v3.3.0 | v4.0.0 |
99-
| 1.32 | v3.3.0 | v4.0.0 |
100-
| 1.33 | v3.3.0 | v4.0.0 |
101-
| 1.34 [1] | v3.3.0 | v4.0.0 |
102-
| 1.35 | v3.4.1 | v4.0.0 |
103-
| 1.36 | v3.4.1 | v4.0.0 |
95+
| 1.28 | v3.3.0 | v4.0.1 |
96+
| 1.29 | v3.3.0 | v4.0.1 |
97+
| 1.30 | v3.3.0 | v4.0.1 |
98+
| 1.31 | v3.3.0 | v4.0.1 |
99+
| 1.32 | v3.3.0 | v4.0.1 |
100+
| 1.33 | v3.3.0 | v4.0.1 |
101+
| 1.34 [1] | v3.3.0 | v4.0.1 |
102+
| 1.35 | v3.4.1 | v4.0.1 |
103+
| 1.36 | v3.4.1 | v4.0.1 |
104104

105105
[1] Prometheus `kubelet_volume_stats_*` metrics not available in 1.34.0 and 1.34.1 due to a
106106
[bug in Kubelet](https://github.com/kubernetes/kubernetes/issues/133847). Fixed in `1.34.2`.
@@ -216,10 +216,10 @@ $ helm install -g -n kube-system --set controller.image.tag=dev --set node.image
216216
Before you continue, be sure to checkout to a [tagged
217217
release](https://github.com/cloudscale-ch/csi-cloudscale/releases).
218218
Always use the [latest stable version](https://github.com/cloudscale-ch/csi-cloudscale/releases/latest)
219-
For example, to use the latest stable version (`v4.0.0`) you can execute the following command:
219+
For example, to use the latest stable version (`v4.0.1`) you can execute the following command:
220220

221221
```
222-
$ kubectl apply -f https://raw.githubusercontent.com/cloudscale-ch/csi-cloudscale/master/deploy/kubernetes/releases/csi-cloudscale-v4.0.0.yaml
222+
$ kubectl apply -f https://raw.githubusercontent.com/cloudscale-ch/csi-cloudscale/master/deploy/kubernetes/releases/csi-cloudscale-v4.0.1.yaml
223223
```
224224

225225
The storage classes `cloudscale-volume-ssd` and `cloudscale-volume-bulk` will be created. The
@@ -446,15 +446,15 @@ $ git push origin
446446

447447
After it's merged to master, [create a new Github
448448
release](https://github.com/cloudscale-ch/csi-cloudscale/releases/new) from
449-
master with the version `v4.0.0` and then publish a new docker build:
449+
master with the version `v4.0.1` and then publish a new docker build:
450450

451451
```
452452
$ git checkout master
453453
$ make publish
454454
```
455455

456-
This will create a binary with version `v4.0.0` and docker image pushed to
457-
`cloudscalech/cloudscale-csi-plugin:v4.0.0`
456+
This will create a binary with version `v4.0.1` and docker image pushed to
457+
`cloudscalech/cloudscale-csi-plugin:v4.0.1`
458458

459459
### Release a pre-release version
460460

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v4.0.0
1+
v4.0.1

charts/csi-cloudscale/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ apiVersion: v2
22
name: csi-cloudscale
33
description: A Container Storage Interface Driver for cloudscale.ch volumes.
44
type: application
5-
version: 1.5.0
6-
appVersion: "4.0.0"
5+
version: 1.5.1
6+
appVersion: "4.0.1"
77
home: https://github.com/cloudscale-ch/csi-cloudscale
88
sources:
99
- https://github.com/cloudscale-ch/csi-cloudscale.git

charts/csi-cloudscale/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ controller:
107107
image:
108108
registry: quay.io
109109
repository: cloudscalech/cloudscale-csi-plugin
110-
tag: v4.0.0
110+
tag: v4.0.1
111111
pullPolicy: IfNotPresent
112112
serviceAccountName:
113113
logLevel: info
@@ -123,7 +123,7 @@ node:
123123
image:
124124
registry: quay.io
125125
repository: cloudscalech/cloudscale-csi-plugin
126-
tag: v4.0.0
126+
tag: v4.0.1
127127
pullPolicy: IfNotPresent
128128
nodeSelector: {}
129129
tolerations: []

0 commit comments

Comments
 (0)