Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1944495

Summary: GET diskattachments for a VM using qemu-guest-agent is missing a logical_name for disks without monted file-system
Product: [oVirt] vdsm Reporter: Lili Zhu <lizhu>
Component: GeneralAssignee: Tomáš Golembiovský <tgolembi>
Status: CLOSED CURRENTRELEASE QA Contact: Qin Yuan <qiyuan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.40.50.8CC: ahadas, bugs, chhu, juzhou, lmen, lsurette, srevivo, tgolembi, xuzhang, ycui
Target Milestone: ovirt-4.4.7Flags: pm-rhel: ovirt-4.4+
Target Release: 4.40.70.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: vdsm-4.40.70.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-06 07:28:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lili Zhu 2021-03-30 03:54:19 UTC
Description of problem:
logical_name for disks without monted file-systems should be reported

Version-Release number of selected component (if applicable):
rhvm-4.4.5.9-0.1.el8ev.noarch
vdsm-4.40.50.8-1.el8ev.x86_64
ovirt-host-4.4.5-1.el8ev.x86_64
qemu-kvm-5.2.0-12.module+el8.4.0+10354+98272afe.x86_64
libvirt-daemon-7.0.0-9.module+el8.4.0+10326+5e50a3b6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. create a new guest and start the guest
2. prepare a disk
3. click the Disks tab and attach the disk
4. check the disk logical name in GUI

Actual results:
disk logical name is missing

Expected results:
should report disk logical name

Additional info:
1. login into the host, then check the disk info
# virsh guestinfo vm_3 --disk
Please enter your authentication name: lizhu
Please enter your password:
disk.count          : 7
disk.0.name         : /dev/sda1
disk.0.partition    : yes
disk.0.dependency.count: 1
disk.0.dependency.0.name: /dev/sda
disk.1.name         : /dev/sda2
disk.1.partition    : yes
disk.1.dependency.count: 1
disk.1.dependency.0.name: /dev/sda
disk.2.name         : /dev/sda
disk.2.partition    : no
disk.3.name         : /dev/dm-0
disk.3.partition    : no
disk.3.dependency.count: 1
disk.3.dependency.0.name: /dev/sda2
disk.3.guest_alias  : rhel-root
disk.4.name         : /dev/sr0
disk.4.partition    : no
disk.4.alias        : sdc
disk.5.name         : /dev/sdb          <=== logical name can be reported
disk.5.partition    : no
disk.6.name         : /dev/dm-1
disk.6.partition    : no
disk.6.dependency.count: 1
disk.6.dependency.0.name: /dev/sda2
disk.6.guest_alias  : rhel-swap

Comment 2 Arik 2021-03-30 07:21:33 UTC
Tomas, can you please take a look?

Comment 3 Tomáš Golembiovský 2021-03-30 09:02:08 UTC
(In reply to Lili Zhu from comment #0)

> disk.5.name         : /dev/sdb          <=== logical name can be reported
> disk.5.partition    : no

It looks like the disk address is not reported by guest agent. Can you please send the output of:

    # virsh qemu-agent-command vm_3 '{"execute":"guest-get-disks"}'

Comment 4 Lili Zhu 2021-03-30 09:11:39 UTC
# virsh qemu-agent-command vm_3 '{"execute":"guest-get-disks"}'
Please enter your authentication name: lizhu
Please enter your password: 
{"return":[{"name":"/dev/sda1","dependencies":["/dev/sda"],"partition":true},{"name":"/dev/sda2","dependencies":["/dev/sda"],"partition":true},{"name":"/dev/sda","dependencies":[],"partition":false,"address":{"serial":"0QEMU_QEMU_HARDDISK_6105e6ff-7844-4b17-9589-9daae2fc3a04","bus-type":"scsi","bus":0,"unit":0,"pci-controller":{"bus":4,"slot":0,"domain":0,"function":0},"dev":"/dev/sda","target":0}},{"name":"/dev/dm-0","dependencies":["/dev/sda2"],"partition":false,"alias":"rhel-root"},{"name":"/dev/sr0","dependencies":[],"partition":false,"address":{"serial":"QEMU_DVD-ROM_QM00005","bus-type":"sata","bus":0,"unit":2,"pci-controller":{"bus":0,"slot":31,"domain":0,"function":2},"dev":"/dev/sr0","target":0}},{"name":"/dev/sdb","dependencies":[],"partition":false,"address":{"serial":"0QEMU_QEMU_HARDDISK_895ec7d2-a14e-4fde-9844-6183a403ff10","bus-type":"scsi","bus":0,"unit":1,"pci-controller":{"bus":4,"slot":0,"domain":0,"function":0},"dev":"/dev/sdb","target":0}},{"name":"/dev/dm-1","dependencies":["/dev/sda2"],"partition":false,"alias":"rhel-swap"}]}

Comment 5 Qin Yuan 2021-06-03 07:20:42 UTC
Verified with:
vdsm-4.40.70.1-1.el8ev.x86_64
ovirt-engine-4.4.7-0.23.el8ev.noarch
qemu-guest-agent-4.2.0-34.module+el8.3.0+10437+1ca0c2ba.5.x86_64

Steps:
1. Prepare 2 disks, diskA and diskB.
2. Create a VM from template(used latest-rhel-guest-image-8.3-infra)
3. Attach diskA to the VM.
4. Run VM
5. Check logical name of diskA on UI.
6. Attach diskB to the running VM.
7. Check logical name of diskB on UI.

Results:
1. Logical name of diskA appears on UI right after the VM is up.
2. Logical name of diskB appears on UI about 5 mins after diskB is hot plugged to VM. (The logical name should appear right after the disk is hot plugged, there is another bug tracking it, see Bug 1967413)

Logical name of disk without mounted file system is reported, this bug is fixed, move status to VERIFIED.

Comment 6 Sandro Bonazzola 2021-07-06 07:28:13 UTC
This bugzilla is included in oVirt 4.4.7 release, published on July 6th 2021.

Since the problem described in this bug report should be resolved in oVirt 4.4.7 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.