-
Bug
-
Resolution: Done-Errata
-
Major
-
None
-
False
-
-
False
-
CLOSED
-
---
-
---
-
Storage Core Sprint 221, Storage Core Sprint 222, Storage Core Sprint 223
-
High
-
None
Description of problem:
When importing a gzipped raw image, nbdkid is started with the following args:
I0523 14:20:31.215028 1 nbdkit.go:238] Start nbdkit with: ['--foreground' '--readonly' '--exit-with-parent' '-U' '/var/run/nbdkit.sock' '--pidfile' '/var/run/nbdkit.pid' '--filter=gzip' '-r' 'curl' 'url=http://cdi-file-host.cdi/tinyCore.iso.gz']
The gzip plugin is specified. Internally, the gzip plugin downloads/uncompresses the target file to a temporary dir when it is initially accessed. See [1]. Unfortunately, that temp dir is on the container filesystem, not a PVC. This is obviously problematic for large images.
[1] https://github.com/libguestfs/nbdkit/blob/v1.31.7/filters/gzip/gzip.c#L126-L250
Version-Release number of selected component (if applicable):
How reproducible: 100%
Steps to Reproduce:
1. make cluster-up cluster-sync
2. Create this DataVolume
apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
name: dv1
annotations:
"cdi.kubevirt.io/storage.pod.retainAfterCompletion": "true"
spec:
source:
http:
url: "http://cdi-file-host.cdi/tinyCore.iso.gz"
pvc:
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
3. Check pod log to confirm that gzip plugin is used
Actual results:
Image is downloaded/uncompressed to container filesystem
Expected results:
It should be possible for the image to be downloaded/uncompressed directly to the target PVC with no temporary space
Additional info:
- external trackers