Skip to content

Commit 70bec2f

Browse files
committed
Provide automatic migration 23.1 -> 23.4
1 parent 3b6b172 commit 70bec2f

File tree

2 files changed

+34
-5
lines changed

2 files changed

+34
-5
lines changed

CHANGELOG.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,23 @@ All notable changes to this project will be documented in this file.
77
### Added
88

99
- Generate OLM bundle for Release 23.4.0 ([#74]).
10+
- Provide automatic migration 23.1 -> 23.4 ([#77]).
1011

1112
[#74]: https://github.com/stackabletech/listener-operator/pull/74
13+
[#77]: https://github.com/stackabletech/listener-operator/pull/77
1214

1315
## [23.4.0] - 2023-04-17
1416

1517
### Added
1618

1719
- Allow configuring CSI docker images ([#61]).
1820

21+
### Changed
22+
23+
- Shortened the registration socket path for Microk8s compatibility ([#45]).
24+
- The old CSI registration path will be automatically migrated during upgrade to `23.4.1` ([#77]).
25+
- You might need to manually remove `/var/lib/kubelet/plugins_registry/listeners.stackable.tech-reg.sock` when downgrading.
26+
1927
[#61]: https://github.com/stackabletech/listener-operator/pull/61
2028

2129
## [23.1.0] - 2023-01-23
@@ -24,14 +32,10 @@ All notable changes to this project will be documented in this file.
2432

2533
- Helm installation on OpenShift ([#29]).
2634
- `operator-rs` `0.25.2` -> `0.27.1` ([#34]).
27-
- Shortened the registration socket path for Microk8s compatibility ([#45]).
28-
- After upgrading you will need to
29-
`rmdir /var/lib/kubelet/plugins_registry/listeners.stackable.tech-reg.sock` manually.
30-
This applies to *all* users, not just Microk8s.
3135
- Made kubeletDir configurable ([#45]).
3236
- Microk8s users will need to `--set kubeletDir=/var/snap/microk8s/common/var/lib/kubelet`.
3337

34-
3538
[#29]: https://github.com/stackabletech/listener-operator/pull/29
3639
[#34]: https://github.com/stackabletech/listener-operator/pull/34
3740
[#45]: https://github.com/stackabletech/listener-operator/pull/45
41+
[#77]: https://github.com/stackabletech/listener-operator/pull/77

deploy/helm/listener-operator/templates/node-daemonset.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,31 @@ spec:
6363
mountPath: /registration
6464
- name: csi
6565
mountPath: /csi
66+
initContainers:
67+
# https://github.com/stackabletech/listener-operator/issues/76
68+
# In https://github.com/stackabletech/listener-operator/pull/45 we introduced a breaking change by shortening the CSI registration path
69+
# This resulted in the following error "node_register.go:43] file exists in socketPath /registration/listeners.stackable.tech-reg.sock but it's not a socket.: &{name:listeners.stackable.tech-reg.sock size:4096 mode:2147484141 modTime:{wall:984732078ext:63815759330 loc:0xf864a0} sys:{Dev:64769 Ino:43688551 Nlink:2 Mode:16877 Uid:0 Gid:0 X__pad0:0 Rdev:0 Size:4096 Blksize:4096 Blocks:8 Atim:{Sec:1680162505 Nsec:36073186} Mtim:{Sec:1680162530 Nsec:984732078} Ctim:{Sec:1680162530 Nsec:984732078} X__unused:[0 0 0]}}"
70+
# This init container removes the "old" directory, so that a unix socket with the same path can be created instead
71+
# TODO: Should be removed in a release after 23.4
72+
- name: migrate-longer-csi-registration-path
73+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
74+
imagePullPolicy: {{ .Values.image.pullPolicy }}
75+
command:
76+
- /bin/bash
77+
- -euo
78+
- pipefail
79+
- -x
80+
- -c
81+
- |
82+
ls -la /registration
83+
echo "Removing old (long) CSI registration path"
84+
if [ -d "/registration/listeners.stackable.tech-reg.sock" ]; then rmdir /registration/listeners.stackable.tech-reg.sock; fi
85+
ls -la /registration
86+
volumeMounts:
87+
- name: registration-sock
88+
mountPath: /registration
89+
securityContext:
90+
runAsUser: 0
6691
volumes:
6792
- name: registration-sock
6893
hostPath:

0 commit comments

Comments
 (0)