Bug 1819382 - Guest logical device name is showing partition instead of device name
Summary: Guest logical device name is showing partition instead of device name
Keywords:
Status: CLOSED DUPLICATE of bug 1793290
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 4.3.8
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ovirt-4.4.1
: ---
Assignee: Tomáš Golembiovský
QA Contact: meital avital
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-31 19:15 UTC by nijin ashok
Modified: 2023-12-15 17:36 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-08 09:18:49 UTC
oVirt Team: Virt
Target Upstream Version:
Embargoed:
lsvaty: testing_plan_complete-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 4949191 0 None None None 2020-04-02 16:53:56 UTC

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 ***


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