From 2d4fcaa8131a7add5196c631f117f06ebb987943 Mon Sep 17 00:00:00 2001 From: Giovanni Ferri Date: Tue, 22 Sep 2026 14:25:19 +0100 Subject: [PATCH] fix(agent): restore shared suspend snapshot storage --- charts/imp/templates/agent/daemonset.yaml | 7 ++++ charts/imp/tests/suspend-storage_test.yaml | 38 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 charts/imp/tests/suspend-storage_test.yaml diff --git a/charts/imp/templates/agent/daemonset.yaml b/charts/imp/templates/agent/daemonset.yaml index a890ada..7bf5ce2 100644 --- a/charts/imp/templates/agent/daemonset.yaml +++ b/charts/imp/templates/agent/daemonset.yaml @@ -74,6 +74,9 @@ spec: mountPath: /run/imp - name: image-cache mountPath: /var/lib/imp/images + # The agent creates and removes suspend directories; Firecracker writes snapshots. + - name: suspend-dir + mountPath: /var/lib/imp/suspend volumes: - name: dev-kvm hostPath: @@ -101,4 +104,8 @@ spec: {{- else }} emptyDir: {} {{- end }} + - name: suspend-dir + hostPath: + path: /var/lib/imp/suspend + type: DirectoryOrCreate terminationGracePeriodSeconds: 10 diff --git a/charts/imp/tests/suspend-storage_test.yaml b/charts/imp/tests/suspend-storage_test.yaml new file mode 100644 index 0000000..0298523 --- /dev/null +++ b/charts/imp/tests/suspend-storage_test.yaml @@ -0,0 +1,38 @@ +suite: shared suspend snapshot storage +templates: + - templates/agent/daemonset.yaml + - templates/runtime/daemonset.yaml +set: + agent.env.kernelPath: /var/lib/imp/vmlinux +tests: + - it: mounts node-local suspend storage into the agent + template: templates/agent/daemonset.yaml + asserts: + - contains: + path: spec.template.spec.containers[0].volumeMounts + content: + name: suspend-dir + mountPath: /var/lib/imp/suspend + - contains: + path: spec.template.spec.volumes + content: + name: suspend-dir + hostPath: + path: /var/lib/imp/suspend + type: DirectoryOrCreate + + - it: mounts the same node-local suspend storage into the runtime + template: templates/runtime/daemonset.yaml + asserts: + - contains: + path: spec.template.spec.containers[0].volumeMounts + content: + name: suspend-dir + mountPath: /var/lib/imp/suspend + - contains: + path: spec.template.spec.volumes + content: + name: suspend-dir + hostPath: + path: /var/lib/imp/suspend + type: DirectoryOrCreate