Bug 1819382

Summary: Guest logical device name is showing partition instead of device name
Product: Red Hat Enterprise Virtualization Manager Reporter: nijin ashok <nashok>
Component: vdsmAssignee: Tomáš Golembiovský <tgolembi>
Status: CLOSED DUPLICATE QA Contact: meital avital <mavital>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.8CC: klaas, lsurette, rbarry, srevivo, ycui
Target Milestone: ovirt-4.4.1Flags: lsvaty: testing_plan_complete-
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-08 09:18:49 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 nijin ashok 2020-03-31 19:15:36 UTC
Description of problem:

The guest device name is obtained from the qemu-ga by querying "guest-get-fsinfo". The guest-get-fsinfo provides information about all the mounted filesystems in the guests. So this will be probably will be the partitions instead of the whole device as users mostly create partitions and create a filesystem in it instead of putting a filesystem on the whole device.

Example in my test environment.
===
{"execute":"guest-get-fsinfo"}

{"return": [{"name": "dm-2", "mountpoint": "/var/log/audit", "disk": [{"serial": "f630a636-e01a-4a6a-b", "bus-type": "virtio", "bus": 0, "unit": 0, "pci-controller": {"bus": 0, "slot": 7, "domain": 0, "function": 0}, "dev": "/dev/vda2", "target": 0}], "type": "xfs"}, {"name": "dm-3", "mountpoint": "/var/log", "disk": [{"serial": "f630a636-e01a-4a6a-b", "bus-type": "virtio", "bus": 0, "unit": 0, "pci-controller": {"bus": 0, "slot": 7, "domain": 0, "function": 0}, "dev": "/dev/vda2", "target": 0}], "type": "xfs"}, {"name": "dm-4", "mountpoint": "/var", "disk": [{"serial": "f630a636-e01a-4a6a-b", "bus-type": "virtio", "bus": 0, "unit": 0, "pci-controller": {"bus": 0, "slot": 7, "domain": 0, "function": 0}, "dev": "/dev/vda2", "target": 0}], "type": "xfs"}, {"name": "vda1", "mountpoint": "/boot", "disk": [{"serial": "f630a636-e01a-4a6a-b", "bus-type": "virtio", "bus": 0, "unit": 0, "pci-controller": {"bus": 0, "slot": 7, "domain": 0, "function": 0}, "dev": "/dev/vda1", "target": 0}], "type": "xfs"}, {"name": "dm-5", "mountpoint": "/tmp", "disk": [{"serial": "f630a636-e01a-4a6a-b", "bus-type": "virtio", "bus": 0, "unit": 0, "pci-controller": {"bus": 0, "slot": 7, "domain": 0, "function": 0}, "dev": "/dev/vda2", "target": 0}], "type": "xfs"}, {"name": "dm-6", "mountpoint": "/home", "disk": [{"serial": "f630a636-e01a-4a6a-b", "bus-type": "virtio", "bus": 0, "unit": 0, "pci-controller": {"bus": 0, "slot": 7, "domain": 0, "function": 0}, "dev": "/dev/vda2", "target": 0}], "type": "xfs"}, {"name": "dm-0", "mountpoint": "/", "disk": [{"serial": "f630a636-e01a-4a6a-b", "bus-type": "virtio", "bus": 0, "unit": 0, "pci-controller": {"bus": 0, "slot": 7, "domain": 0, "function": 0}, "dev": "/dev/vda2", "target": 0}], "type": "xfs"}]}
====

Then the vdsm is matching the serial with disk UUID and hence the device name it will match will be vda2 instead of vda.

====
# virsh -r dumpxml HostedEngine |grep -i guestName
<ovirt-vm:guestName>/dev/vda2</ovirt-vm:guestName>
====

However, the deprecated ovirt-guest-agent provides the name correctly.

====
# python /usr/share/ovirt-guest-agent/GuestAgentLinux2.py |grep -A1 "Disk Mapping"
Disk Mapping:{'QEMU_DVD-ROM_QM00003': {'name': '/dev/sr0'},
 'f630a636-e01a-4a6a-b': {'name': '/dev/vda'}}
====

As per https://gerrit.ovirt.org/#/c/98314/, we are preferring qemu-ga data than ovirt-guest-agent. So user will see /dev/vda2 instead of /dev/vda after the upgrade.


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

rhvm-4.3.8.2-0.4.el7.noarch
vdsm-4.30.40-1.el7ev.x86_64

How reproducible:

100%

Steps to Reproduce:

1. Check for the device name under the Disks tab of the VM. It will be showing partition if the filesystem within the VM is created on partitions.


Actual results:

The guest device name is showing partition instead of device name.

Expected results:

The guest device name should be /dev/vda instead of a /dev/vda2. Also, it breaks the older behavior of the guest agent and breaks any custom automation script which refers to this field.

Additional info:

Comment 1 Tomáš Golembiovský 2020-04-08 09:18:49 UTC

*** This bug has been marked as a duplicate of bug 1793290 ***