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

Bug 1859092

Summary: Logical Name is missing when attaching RO direct LUN to a VM
Product: [oVirt] ovirt-engine Reporter: Evelina Shames <eshames>
Component: BLL.VirtAssignee: Liran Rotenberg <lrotenbe>
Status: CLOSED CURRENTRELEASE QA Contact: Qin Yuan <qiyuan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4.1.8CC: aefrat, ahadas, bugs, lrotenbe, qiyuan, sfishbai
Target Milestone: ovirt-4.4.4Keywords: Automation, Reopened
Target Release: 4.4.4.2Flags: eshames: needinfo?
pm-rhel: ovirt-4.4+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.4.2 Doc Type: Enhancement
Doc Text:
Previously, the logical name of LUN disks within the guest weren't pull to the user visibility. Now, the LUN logical name is pulled and shown in the disk device.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-12 16:24:04 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:
Attachments:
Description Flags
logs
none
logs none

Description Evelina Shames 2020-07-21 09:13:40 UTC
Created attachment 1701861 [details]
logs

Description of problem:
Logical name is missing when attaching RO direct LUN to a VM, for example:
<disk_attachment href="/ovirt-engine/api/vms/5322c11a-d7d1-4c3f-ae38-421bf6b49349/diskattachments/77a3aafc-c946-4ac6-b174-d170fe27db2b" id="77a3aafc-c946-4ac6-b174-d170fe27db2b">
    <active>true</active>
    <bootable>false</bootable>
    <interface>virtio</interface>
    <pass_discard>false</pass_discard>
    <read_only>true</read_only>
    <uses_scsi_reservation>false</uses_scsi_reservation>
    <disk href="/ovirt-engine/api/disks/77a3aafc-c946-4ac6-b174-d170fe27db2b" id="77a3aafc-c946-4ac6-b174-d170fe27db2b"/>
    <vm href="/ovirt-engine/api/vms/5322c11a-d7d1-4c3f-ae38-421bf6b49349" id="5322c11a-d7d1-4c3f-ae38-421bf6b49349"/>
</disk_attachment>

Version-Release number of selected component (if applicable):
4.4.1.8-0.7.el8ev


How reproducible:
100% 

Steps to Reproduce:
1. Create a VM with disk
2. Run the VM
3. Create Direct LUN (iSCSI)
4. Attach Direct LUN as RO to the VM
 

Actual results:
Logical Name is missing on REST-API.

Expected results:
Logical Name should appear.

Additional info:
Attaching logs of the failed TC.

Comment 2 Arik 2020-07-27 19:09:56 UTC
I don't see anything related to VM 5322c11a-d7d1-4c3f-ae38-421bf6b49349 or to disk 77a3aafc-c946-4ac6-b174-d170fe27db2b in the attached logs, can you please double check that those are the right logs?

Comment 3 Evelina Shames 2020-07-28 07:30:39 UTC
(In reply to Arik from comment #2)
> I don't see anything related to VM 5322c11a-d7d1-4c3f-ae38-421bf6b49349 or
> to disk 77a3aafc-c946-4ac6-b174-d170fe27db2b in the attached logs, can you
> please double check that those are the right logs?

This VM is not related to the logs of the test that failed.
I tried to reproduce it manually and check on rest-api if it is really missing, so this VM is from my manual testing.
The logs I attached are from our automation test that tests this flow.

Comment 4 Tomáš Golembiovský 2020-08-03 22:29:27 UTC
I was able to reproduce this on 4.4.1.10-0.1.el8ev, but the data are reported properly from EL8 guest. Probably engine just fails to map the serial number to the actual disk.

Comment 6 Liran Rotenberg 2020-09-22 12:39:33 UTC
Bare in mind that until BZ 1836661 is resolved, the LUN must be mounted in the guest.

Comment 7 Qin Yuan 2020-10-26 06:13:17 UTC
Created attachment 1724116 [details]
logs

Comment 8 Qin Yuan 2020-10-26 06:13:54 UTC
Tested with:
ovirt-engine-4.4.3.7-0.22.el8ev.noarch
vdsm-4.40.34-1.el8ev.x86_64

Steps:
1. Create a VM with disk
2. Run VM
3. Create iSCSI direct lun
4. Attach direct lun as RO to the VM
5. Mount the lun in the guest
6. Get vm diskattachments via API

Results:
No logical name for the direct lun on REST API.

API message:
<disk_attachments>
    <disk_attachment href="/ovirt-engine/api/vms/20880dbd-8970-426a-a31c-08204bbbdd39/diskattachments/3eaad627-8d86-4397-bf88-c26c03b6e2fb" id="3eaad627-8d86-4397-bf88-c26c03b6e2fb">
        <active>true</active>
        <bootable>true</bootable>
        <interface>virtio</interface>
        <logical_name>/dev/vda</logical_name>
        <pass_discard>false</pass_discard>
        <read_only>false</read_only>
        <uses_scsi_reservation>false</uses_scsi_reservation>
        <disk href="/ovirt-engine/api/disks/3eaad627-8d86-4397-bf88-c26c03b6e2fb" id="3eaad627-8d86-4397-bf88-c26c03b6e2fb"/>
        <vm href="/ovirt-engine/api/vms/20880dbd-8970-426a-a31c-08204bbbdd39" id="20880dbd-8970-426a-a31c-08204bbbdd39"/>
    </disk_attachment>
    <disk_attachment href="/ovirt-engine/api/vms/20880dbd-8970-426a-a31c-08204bbbdd39/diskattachments/a4d5c7c7-19d9-4c69-b64c-2f7b8657d89a" id="a4d5c7c7-19d9-4c69-b64c-2f7b8657d89a">
        <active>true</active>
        <bootable>false</bootable>
        <interface>virtio</interface>
        <pass_discard>false</pass_discard>
        <read_only>true</read_only>
        <uses_scsi_reservation>false</uses_scsi_reservation>
        <disk href="/ovirt-engine/api/disks/a4d5c7c7-19d9-4c69-b64c-2f7b8657d89a" id="a4d5c7c7-19d9-4c69-b64c-2f7b8657d89a"/>
        <vm href="/ovirt-engine/api/vms/20880dbd-8970-426a-a31c-08204bbbdd39" id="20880dbd-8970-426a-a31c-08204bbbdd39"/>
    </disk_attachment>
</disk_attachments>

Check inside VM:
[root@vm-30-85 ~]# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0     11:0    1 1024M  0 rom  
vda    253:0    0   10G  0 disk 
├─vda1 253:1    0    1M  0 part 
├─vda2 253:2    0  100M  0 part /boot/efi
└─vda3 253:3    0  9.9G  0 part /
vdb    253:16   0    3G  1 disk 
└─vdb1 253:17   0    3G  1 part /mnt/test

Comment 10 RHEL Program Management 2020-10-26 07:30:41 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 22 Qin Yuan 2021-01-05 04:17:41 UTC
Verified with:
ovirt-engine-4.4.4.6-0.1.el8ev.noarch

Steps:
1. Create a VM with disk
2. Run VM
3. Create iSCSI direct lun
4. Attach direct lun as RO to the VM
5. Mount the lun in the guest
6. Get vm diskattachments via API

Result:
The logical name of direct lun is present.

<disk_attachments>
    <disk_attachment href="/ovirt-engine/api/vms/6f0a90f4-eb0e-44f8-a9bc-d051557316de/diskattachments/9a8c4fbf-202a-43d8-b116-7e14a8f1ca37" id="9a8c4fbf-202a-43d8-b116-7e14a8f1ca37">
        <active>true</active>
        <bootable>true</bootable>
        <interface>virtio</interface>
        <logical_name>/dev/vda</logical_name>
        <pass_discard>false</pass_discard>
        <read_only>false</read_only>
        <uses_scsi_reservation>false</uses_scsi_reservation>
        <disk href="/ovirt-engine/api/disks/9a8c4fbf-202a-43d8-b116-7e14a8f1ca37" id="9a8c4fbf-202a-43d8-b116-7e14a8f1ca37"/>
        <vm href="/ovirt-engine/api/vms/6f0a90f4-eb0e-44f8-a9bc-d051557316de" id="6f0a90f4-eb0e-44f8-a9bc-d051557316de"/>
    </disk_attachment>
    <disk_attachment href="/ovirt-engine/api/vms/6f0a90f4-eb0e-44f8-a9bc-d051557316de/diskattachments/63525a05-140d-4c5e-9df9-6a2a109db4fd" id="63525a05-140d-4c5e-9df9-6a2a109db4fd">
        <active>true</active>
        <bootable>false</bootable>
        <interface>virtio</interface>
        <logical_name>/dev/vdb</logical_name>
        <pass_discard>false</pass_discard>
        <read_only>true</read_only>
        <uses_scsi_reservation>false</uses_scsi_reservation>
        <disk href="/ovirt-engine/api/disks/63525a05-140d-4c5e-9df9-6a2a109db4fd" id="63525a05-140d-4c5e-9df9-6a2a109db4fd"/>
        <vm href="/ovirt-engine/api/vms/6f0a90f4-eb0e-44f8-a9bc-d051557316de" id="6f0a90f4-eb0e-44f8-a9bc-d051557316de"/>
    </disk_attachment>
</disk_attachments>

Comment 23 Sandro Bonazzola 2021-01-12 16:24:04 UTC
This bugzilla is included in oVirt 4.4.4 release, published on December 21st 2020.

Since the problem described in this bug report should be resolved in oVirt 4.4.4 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.