This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Bug 2216093 - "error","msg":"No disk capacity" logging continuously in virt-launcher pod
Summary: "error","msg":"No disk capacity" logging continuously in virt-launcher pod
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Virtualization
Version: 4.13.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: 4.15.0
Assignee: Igor Bezukh
QA Contact: Akash Kanni
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-20 05:55 UTC by nijin ashok
Modified: 2024-02-19 07:29 UTC (History)
1 user (show)

Fixed In Version: hco-bundle-v4.15.0.rhel9-1472
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-12-14 16:18:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
No disk capacity log count (13.55 KB, image/png)
2023-11-24 09:16 UTC, Akash Kanni
no flags Details
VM volumeStatus Configuration (64.96 KB, image/png)
2023-11-24 09:20 UTC, Akash Kanni
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt kubevirt pull 9999 0 None Merged Only enable expandDisksEnabled on PVC volumes 2023-08-31 14:44:22 UTC
Red Hat Issue Tracker   CNV-30086 0 None None None 2023-12-14 16:17:59 UTC

Description nijin ashok 2023-06-20 05:55:14 UTC
Description of problem:

The cloud-init disk will not have "capacity" defined in the disk xml:

~~~
bas64 -d of Domain xml from the virt-launcher logs:


		<disk device="disk" type="block" model="virtio-non-transitional">
			<source dev="/dev/rootdisk" name="rootdisk"></source>
			<target bus="virtio" dev="vda"></target>
			<driver cache="none" error_policy="stop" io="native" name="qemu" type="raw" discard="unmap"></driver>
			<alias name="ua-rootdisk"></alias>
			<boot order="1"></boot>
			<filesystemOverhead>0</filesystemOverhead>
			<capacity>32212254720</capacity>
			<expandDisksEnabled>true</expandDisksEnabled>
		</disk>



		<disk device="disk" type="file" model="virtio-non-transitional">
			<source file="/var/run/kubevirt-ephemeral-disks/cloud-init-data/nijin-cnv/rhel8-i181f1yxkfqqrv83/noCloud.iso"></source>
			<target bus="virtio" dev="vdb"></target>
			<driver cache="none" error_policy="stop" name="qemu" type="raw" discard="unmap"></driver>
			<alias name="ua-cloudinitdisk"></alias>              <<<
			<boot order="2"></boot>
			<expandDisksEnabled>true</expandDisksEnabled>
		</disk>
~~~

This is expected since the capacity is obtained from "volumeStatus.PersistentVolumeClaimInfo" and the cloud-init doesn't have an associated PVC.

~~~
oc get vmi  rhel8-i181f1yxkfqqrv83 -o yaml |yq '.status.volumeStatus'
- name: cloudinitdisk
  size: 1048576
  target: vdb
- name: rootdisk
  persistentVolumeClaimInfo:
    accessModes:
      - ReadWriteMany
    capacity:
      storage: 30Gi
    filesystemOverhead: "0"
    requests:
      storage: "32212254720"
    volumeMode: Block
  target: vda
~~~

However, both offline and online disk extension monitor also look at the the cloudinit disk, and since it doesn't contains "capacity", it logs the below message repeatedly:

~~~
{"component":"virt-launcher","level":"error","msg":"No disk capacity","pos":"manager.go:684","timestamp":"2023-06-20T05:43:37.728102Z"}

# oc logs virt-launcher-rhel8-i181f1yxkfqqrv83-n2fzf |grep "No disk capacity" |wc -l
18
~~~



Version-Release number of selected component (if applicable):

OpenShift Virtualization 4.13.0

How reproducible:

100%

Steps to Reproduce:

1. Start a VM with a cloud-init disk.
2. Watch the virt-launcher logs. It continuously logs "No disk capacity" error.

Actual results:

"error","msg":"No disk capacity" logging continuously in virt-launcher pod


Expected results:

Don't try to expand the cloud-init disk.


Additional info:

Comment 1 nijin ashok 2023-06-20 06:24:57 UTC
The same error will be logged if the VM has configmap or secret volumes.

Comment 2 Kedar Bidarkar 2023-06-21 12:35:22 UTC
Target version is set to 4.15 depending upon the severity of the bug. Currently it appears to be a log message only issue.

Comment 3 Igor Bezukh 2023-10-26 13:16:47 UTC
Moving ON_QA, checked it upstream. When there is a disk with non-PVC backend storage on the kube side, this error won't pop up.

It should be logged repeatedly when the PVC backed storage has disk expand enabled but no capacity bits in the PVC info.

In order to opt-out from disk expansion on a disk level, the disk expansion feature should be modified. An RFE is required for that.

Comment 4 Akash Kanni 2023-11-24 09:16:28 UTC
Created attachment 2001187 [details]
No disk capacity log count

Comment 5 Akash Kanni 2023-11-24 09:20:53 UTC
Created attachment 2001188 [details]
VM volumeStatus Configuration

Comment 6 Akash Kanni 2023-11-24 09:34:52 UTC
Verified this bug on cluster version 

1] Created VM with cloud-init disk 

[akanni@akanni-thinkpadt14sgen2i ocs]$ oc get vmi vm-rhel88-ocs -o yaml | grep -A 20 "volumeStatus"
  volumeStatus:
  - name: cloudinitdisk
    size: 1048576
    target: vdb
  - name: rootdisk
    persistentVolumeClaimInfo:
      accessModes:
      - ReadWriteMany
      capacity:
        storage: 25Gi
      filesystemOverhead: "0"
      requests:
        storage: 25Gi
      volumeMode: Block
    target: vda

2] bas64 -d of Domain xml from the virt-launcher logs

                 <disk device="disk" type="block" model="virtio-non-transitional">
			<source dev="/dev/rootdisk" name="rootdisk"></source>
			<target bus="virtio" dev="vda"></target>
			<driver cache="none" error_policy="stop" io="native" name="qemu" type="raw" discard="unmap"></driver>
			<alias name="ua-rootdisk"></alias>
			<filesystemOverhead>0</filesystemOverhead>
			<capacity>26843545600</capacity>
			<expandDisksEnabled>true</expandDisksEnabled>
		</disk>
		<disk device="disk" type="file" model="virtio-non-transitional">
			<source file="/var/run/kubevirt-ephemeral-disks/cloud-init-data/default/vm-rhel88-ocs/noCloud.iso"></source>
			<target bus="virtio" dev="vdb"></target>
			<driver cache="none" error_policy="stop" name="qemu" type="raw" discard="unmap"></driver>
			<alias name="ua-cloudinitdisk"></alias>
		</disk>

  As expected cloud-init disk does not have "capacity" defined in the disk xml.

3] The "error" "msg":"No disk capacity" is not logging in virt-launcher pod

   [akanni@akanni-thinkpadt14sgen2i ocs]$ oc logs virt-launcher-vm-rhel88-ocs-gdkkr |grep "No disk capacity" |wc -l
   0

since the error msg:"No disk capacity" is not logging in virt-launcher pod, Marking it as verified.

Comment 7 Akash Kanni 2023-11-24 10:30:49 UTC
Verified this bug on cluster version :- v4.15.0.rhel9-1721


Note You need to log in before you can comment on or make changes to this bug.