Closed iswbm closed 9 months ago
Hi @iswbm can you tell us a little more about the target image? What is the size and format (qcow/raw) and is it compressed?
Hi @iswbm can you tell us a little more about the target image? What is the size and format (qcow/raw) and is it compressed?
Hi, @mhenriks
The image I use is qcow2 format, 800M, and it has been compressed.
the problem was solved when I changed the parameters of qemu-img from writeback to directsync, I guess it was the cache problem.
Hi @iswbm what compression was used? Gzip? xz? qcow build in compression?
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
/close
@kubevirt-bot: Closing this issue.
I got a similar issue
$ virtctl image-upload pvc iso-win-2019 --access-mode=ReadWriteOnce --size=8G --uploadproxy-url=https://palmita:32001 --force-bind --insecure --wait-secs=60 --image-path ~/Downloads/SW_DVD9_Win_Server_STD_CORE_2019_1909.4_64Bit_English_DC_STD_MLF_X22-29333.ISO
PVC default/iso-win-2019 not found
PersistentVolumeClaim default/iso-win-2019 created
Waiting for PVC iso-win-2019 upload pod to be ready...
Pod now ready
Uploading data to https://palmita:32001
563.06 MiB / 5.01 GiB [==============>----------------------------------------------------------------------------------------------------------------------] 10.98% 17s
unexpected return value 502,
I was using local-storage with tmpfs, and this is why I ended up with this error.
As soon as a switched to non tmpfs storage, I was able to import it.
same issue here. /reopen
@ydcool: You can't reopen an issue/PR unless you authored it or you are a collaborator.
same issue here. DataVolume define
apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
name: "ubuntu"
spec:
storage:
resources:
requests:
storage: 5Gi
source:
http:
url: "https://mirrors.tuna.tsinghua.edu.cn/ubuntu-cloud-images/bionic/20230607/bionic-server-cloudimg-amd64-root.tar.xz"
when i watch the datavolumes, the terminal info
kubectl get datavolumes -w
ubuntu ImportInProgress 33.38% 28s
ubuntu ImportInProgress 38.01% 30s
ubuntu ImportInProgress 42.42% 32s
ubuntu ImportInProgress 46.55% 34s
ubuntu ImportInProgress 50.82% 36s
ubuntu ImportInProgress 55.40% 38s
ubuntu ImportInProgress 60.19% 40s
ubuntu ImportInProgress 64.79% 42s
ubuntu ImportInProgress 64.79% 43s
ubuntu ImportInProgress 64.79% 1 44s
ubuntu ImportInProgress 4.44% 1 46s
ubuntu ImportInProgress 8.33% 1 48s
ubuntu ImportInProgress 11.34% 1 50s
ubuntu ImportInProgress 15.55% 1 52s
always restart to import the image
describe import-xxx pod info
importer:
Container ID: docker://79e6dc41b90bd86e59f3f481219eae8b53885146cb630b586e35ca0d805145bb
Image: quay.io/kubevirt/cdi-importer:v1.58.0
Image ID: docker-pullable://quay.io/kubevirt/cdi-importer@sha256:72ee3dd7073a8c25c016f29d2075afe220a607e6081c50f48b0b0a16ddb516f6
Port: 8443/TCP
Host Port: 0/TCP
SeccompProfile: RuntimeDefault
Args:
-v=1
State: Running
Started: Fri, 29 Dec 2023 15:53:04 +0800
Last State: Terminated
Reason: OOMKilled
Exit Code: 137
Started: Fri, 29 Dec 2023 15:52:19 +0800
Finished: Fri, 29 Dec 2023 15:52:50 +0800
Ready: True
Restart Count: 2
Limits:
cpu: 750m
memory: 600M
Requests:
cpu: 100m
memory: 60M
And i patch the cdi podResourceRequirements
then import success
kubectl patch cdi cdi --patch '{"spec": {"config": {"podResourceRequirements": {"limits": {"memory": "1G"}}}}}' --type merge
/reopen /remove-lifecycle rotten
Thanks for adding a solution @NeverTeaser
@adiroiban image-upload is a totally different flow from import. Can you open a sepparate issue with logs from "cdi-uploadproxy" and "cdi-upload-" pod
@akalenyu any thoughts on this? I think you've looked into mem consumption before
@mhenriks: Reopened this issue.
any thoughts on this? I think you've looked into mem consumption before
Sure. CDI writes to target using cache=writeback (utilizes page cache) so this is likely a brief (or not) period of time where a significant chunk of your image sits essentially in memory before being flushed to disk, triggering OOM. There have been several bugs about that, but specifically when the nodes are on cgroupsv1. cgroupsv2 behaves differently. Are your nodes using cgroupsv1?
For a detailed explanation and ways to mitigate on cgroupsv1, see https://bugzilla.redhat.com/show_bug.cgi?id=2196072#c14
My report is not a bug. It's a misconfiguration on my side.
The default pod created by kubevirt has a memory limit of memory: 600M
And I was using tmpfs storage ... so that tmpfs storage counts towards memory usage.
As soon as I have replaced by volume with a openEBS it worked.
I'm closing this since the issue has been addressed, feel free to reopen if necessary. Thanks!
Is this a BUG REPORT or FEATURE REQUEST?:
What happened:
I wanted to use cdi to create a virtual machine, and the cdi pod OOM failed,
I had to modify the cdi configuration to make it successful.
I used kubectl top to check the resource usage and found that cdi consumes up to 4G of memory
What I'm wondering is why it needs to consume so much memory.
What you expected to happen:
cdi-import can work with less memory usage
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
datavolume datavolume spec:
Environment:
kubectl get deployments cdi-deployment -o yaml
): v1.43.0kubectl version
): 1.20