Skip to content

Commit f6a7a3f

Browse files
vlademVlad Volodkin
andauthored
Recreate dbus connection (#512)
*Issue #, if available:* #309, #515, #516 *Description of changes:* Recreate dbus connection after receiving a "connection closed" error. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --------- Signed-off-by: Vlad Volodkin <vlaad@amazon.com> Co-authored-by: Vlad Volodkin <vlaad@amazon.com>
1 parent ec7f4c7 commit f6a7a3f

8 files changed

Lines changed: 443 additions & 41 deletions

File tree

charts/aws-mountpoint-s3-csi-driver/templates/node.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ spec:
155155
mountPropagation: HostToContainer
156156
{{- end }}
157157
- name: systemd-bus
158-
mountPath: /run/systemd/private
158+
mountPath: /run/systemd
159+
mountPropagation: HostToContainer
159160
- name: host-dev
160161
mountPath: /host/dev
161162
ports:
@@ -236,8 +237,8 @@ spec:
236237
type: DirectoryOrCreate
237238
- name: systemd-bus
238239
hostPath:
239-
path: /run/systemd/private
240-
type: Socket
240+
path: /run/systemd
241+
type: Directory
241242
- name: kubelet-dir
242243
hostPath:
243244
path: {{ .Values.node.kubeletPath }}

deploy/kubernetes/base/node-daemonset.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ spec:
113113
# without needing to mount "/proc/mounts" from host.
114114
mountPropagation: HostToContainer
115115
- name: systemd-bus
116-
mountPath: /run/systemd/private
116+
mountPath: /run/systemd
117+
mountPropagation: HostToContainer
117118
- name: host-dev
118119
mountPath: /host/dev
119120
ports:
@@ -201,8 +202,8 @@ spec:
201202
type: DirectoryOrCreate
202203
- name: systemd-bus
203204
hostPath:
204-
path: /run/systemd/private
205-
type: Socket
205+
path: /run/systemd
206+
type: Directory
206207
- name: kubelet-dir
207208
hostPath:
208209
path: /var/lib/kubelet

pkg/driver/node/mounter/systemd_mounter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type SystemdMounter struct {
2828
}
2929

3030
func NewSystemdMounter(credProvider *credentialprovider.Provider, mpMounter *mpmounter.Mounter, mpVersion string, kubernetesVersion string) (*SystemdMounter, error) {
31-
runner, err := system.StartOsSystemdSupervisor()
31+
runner, err := system.StartSystemdRunner(system.OsSystemdSupervisorFactory{})
3232
if err != nil {
3333
return nil, fmt.Errorf("failed to start systemd supervisor: %w", err)
3434
}

pkg/system/mocks/mock_systemd.go

Lines changed: 135 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)