Skip to content

Commit 618ec85

Browse files
committed
adjust udevadm calls, increase logging amount
udevadm when called concurrently may potentially redo symlinks. Adding a lock, so if multiple pods attach at the same time, we don't call udevadm concurrently. Adjusts the order so we first check if the device is available, before doing udevadm calls. Adjust order of udevadm calls itself: first trigger, then settle. Reason: - settle waits for new events to finish - trigger triggers new events but doesn't wait for them Improve logging and increase the amount of logs (in debug level) to potentially debug issues with more data.
1 parent 66e0b86 commit 618ec85

15 files changed

Lines changed: 599 additions & 72 deletions

File tree

.github/workflows/release-chart.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- master
7+
- 'release/[0-9]+.[0-9]+.*'
78

89
jobs:
910
release:

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
## unreleased
22
* Minimum supported Kubernetes version is now 1.28.
33

4+
## v3.5.7-rc1 - 2025.12.17
5+
* Adjust udevadm calls & reorder them, and put them behind a mutex to avoid a potential race condition
6+
* Improve logging by adding debug logs
7+
* Add `--log-level=(trace|debug|info|warn|error)` flag to customize log level
8+
9+
410
## v3.5.6 - 2024.04.18
511
* ~~Add support for Kubernetes 1.30~~
612
* No changes in the release

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ build: compile
7474

7575
.PHONY: push
7676
push:
77-
ifeq ($(DOCKER_REPO),cloudscalech/cloudscale-csi-plugin)
78-
ifneq ($(BRANCH),master)
77+
ifeq ($(DOCKER_REPO),quay.io/cloudscalech/cloudscale-csi-plugin)
78+
ifeq ($(filter master,$(BRANCH))$(filter release/%,$(BRANCH)),)
7979
ifneq ($(VERSION),dev)
80-
$(error "Only the `dev` tag can be published from non-master branches")
80+
$(error "Only the `dev` tag can be published from non-master/non-release branches")
8181
endif
8282
endif
8383
endif

README.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ secret `my-pvc-luks-key`.
6161
## Releases
6262

6363
The cloudscale.ch CSI plugin follows [semantic versioning](https://semver.org/).
64-
The current version is: **`v3.5.6`**.
64+
The current version is: **`v3.5.7-rc1`**.
6565

6666
* Bug fixes will be released as a `PATCH` update.
6767
* New features (such as CSI spec bumps) will be released as a `MINOR` update.
@@ -85,13 +85,13 @@ We recommend using the latest cloudscale.ch CSI driver compatible with your Kube
8585
| 1.21 | v2.0.0 | v3.5.2 |
8686
| 1.22 | v3.1.0 | v3.5.2 |
8787
| 1.23 | v3.1.0 | v3.5.2 |
88-
| 1.24 | v3.1.0 | v3.5.6 |
89-
| 1.25 | v3.3.0 | v3.5.6 |
90-
| 1.26 | v3.3.0 | v3.5.6 |
91-
| 1.27 | v3.3.0 | v3.5.6 |
92-
| 1.28 | v3.3.0 | v3.5.6 |
93-
| 1.29 | v3.3.0 | v3.5.6 |
94-
| 1.30 | v3.3.0 | v3.5.6 |
88+
| 1.24 | v3.1.0 | v3.5.7-rc1 |
89+
| 1.25 | v3.3.0 | v3.5.7-rc1 |
90+
| 1.26 | v3.3.0 | v3.5.7-rc1 |
91+
| 1.27 | v3.3.0 | v3.5.7-rc1 |
92+
| 1.28 | v3.3.0 | v3.5.7-rc1 |
93+
| 1.29 | v3.3.0 | v3.5.7-rc1 |
94+
| 1.30 | v3.3.0 | v3.5.7-rc1 |
9595
| 1.31 | v3.3.0 | v3.5.6 |
9696
| 1.32 | v3.3.0 | v3.5.6 |
9797
| 1.33 | v3.3.0 | v3.5.6 |
@@ -198,10 +198,10 @@ $ helm install -g -n kube-system --set controller.image.tag=dev --set node.image
198198
Before you continue, be sure to checkout to a [tagged
199199
release](https://github.com/cloudscale-ch/csi-cloudscale/releases).
200200
Always use the [latest stable version](https://github.com/cloudscale-ch/csi-cloudscale/releases/latest)
201-
For example, to use the latest stable version (`v3.5.6`) you can execute the following command:
201+
For example, to use the latest stable version (`v3.5.7-rc1`) you can execute the following command:
202202

203203
```
204-
$ kubectl apply -f https://raw.githubusercontent.com/cloudscale-ch/csi-cloudscale/master/deploy/kubernetes/releases/csi-cloudscale-v3.5.6.yaml
204+
$ kubectl apply -f https://raw.githubusercontent.com/cloudscale-ch/csi-cloudscale/master/deploy/kubernetes/releases/csi-cloudscale-v3.5.7-rc1.yaml
205205
```
206206

207207
The storage classes `cloudscale-volume-ssd` and `cloudscale-volume-bulk` will be created. The
@@ -421,15 +421,23 @@ $ git push origin
421421

422422
After it's merged to master, [create a new Github
423423
release](https://github.com/cloudscale-ch/csi-cloudscale/releases/new) from
424-
master with the version `v3.5.6` and then publish a new docker build:
424+
master with the version `v3.5.7-rc1` and then publish a new docker build:
425425

426426
```
427427
$ git checkout master
428428
$ make publish
429429
```
430430

431-
This will create a binary with version `v3.5.6` and docker image pushed to
432-
`cloudscalech/cloudscale-csi-plugin:v3.5.6`
431+
This will create a binary with version `v3.5.7-rc1` and docker image pushed to
432+
`cloudscalech/cloudscale-csi-plugin:v3.5.7-rc1`
433+
434+
### Release a pre-release version
435+
436+
To release a new pre-release (or a patch version based on an existing tag) version, follow the following steps:
437+
438+
1. create a new branch called `release/x.y` (or with the full version)
439+
2. push it to GitHub
440+
3. Follow the flow for creating a new release, making sure to set the appropriate versions.
433441

434442
## Contributing
435443

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v3.5.6
1+
v3.5.7-rc1

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.3.6
6-
appVersion: "3.5.6"
5+
version: 1.3.7-rc1
6+
appVersion: "3.5.7-rc1"
77
home: https://github.com/cloudscale-ch/csi-cloudscale
88
sources:
99
- https://github.com/cloudscale-ch/csi-cloudscale.git

charts/csi-cloudscale/templates/daemonset.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ spec:
5353
args :
5454
- "--endpoint=$(CSI_ENDPOINT)"
5555
- "--url=$(CLOUDSCALE_API_URL)"
56+
- "--log-level={{ .Values.node.logLevel }}"
5657
{{- with .Values.node.resources }}
5758
resources:
5859
{{ toYaml . | indent 12 }}

charts/csi-cloudscale/templates/statefulset.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ spec:
7777
args :
7878
- "--endpoint=$(CSI_ENDPOINT)"
7979
- "--url=$(CLOUDSCALE_API_URL)"
80+
- "--log-level={{ .Values.controller.logLevel }}"
8081
{{- with .Values.controller.resources }}
8182
resources:
8283
{{ toYaml . | indent 12 }}

charts/csi-cloudscale/values.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,10 @@ controller:
8484
image:
8585
registry: quay.io
8686
repository: cloudscalech/cloudscale-csi-plugin
87-
tag: v3.5.6
87+
tag: v3.5.7-rc1
8888
pullPolicy: IfNotPresent
8989
serviceAccountName:
90+
logLevel: info
9091
resources: {}
9192
# limits:
9293
# cpu: 100m
@@ -99,11 +100,12 @@ node:
99100
image:
100101
registry: quay.io
101102
repository: cloudscalech/cloudscale-csi-plugin
102-
tag: v3.5.6
103+
tag: v3.5.7-rc1
103104
pullPolicy: IfNotPresent
104105
nodeSelector: {}
105106
tolerations: []
106107
serviceAccountName:
108+
logLevel: info
107109
resources: {}
108110
# limits:
109111
# cpu: 100m

cmd/cloudscale-csi-plugin/main.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"os"
2525

2626
"github.com/cloudscale-ch/csi-cloudscale/driver"
27+
"github.com/sirupsen/logrus"
2728
)
2829

2930
func main() {
@@ -32,6 +33,7 @@ func main() {
3233
token = flag.String("token", "", "cloudscale.ch access token")
3334
url = flag.String("url", "https://api.cloudscale.ch/", "cloudscale.ch API URL")
3435
version = flag.Bool("version", false, "Print the version and exit.")
36+
logLevel = flag.String("log-level", "info", "Log level (trace, debug, info, warn, error, fatal, panic)")
3537
)
3638
flag.Parse()
3739

@@ -44,7 +46,12 @@ func main() {
4446
os.Exit(0)
4547
}
4648

47-
drv, err := driver.NewDriver(*endpoint, *token, *url)
49+
level, err := logrus.ParseLevel(*logLevel)
50+
if err != nil {
51+
log.Fatalf("invalid log level %q: %v", *logLevel, err)
52+
}
53+
54+
drv, err := driver.NewDriver(*endpoint, *token, *url, level)
4855
if err != nil {
4956
log.Fatalln(err)
5057
}

0 commit comments

Comments
 (0)