Bug 1765488

Summary: [7.8][machines] The VM can not attach raw disks which have been created
Product: Red Hat Enterprise Linux 7 Reporter: YunmingYang <yunyang>
Component: cockpitAssignee: Katerina Koukiou <kkoukiou>
Status: CLOSED ERRATA QA Contact: YunmingYang <yunyang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.8CC: kkoukiou, leiwang, mpitt, mtessun, skobyda, wshi, xchen, ymao
Target Milestone: rcKeywords: Extras, Rebase
Target Release: 7.8   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1744484 Environment:
Last Closed: 2020-04-01 00:24:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1744484    
Bug Blocks:    

Description YunmingYang 2019-10-25 09:06:59 UTC
+++ This bug was initially created as a clone of Bug #1744484 +++

Description of problem:
If create a raw disk in advance, then attach it to the VM through the UI. The attaching is failed with an error message,that is 'operation failed: Incorrect disk format'.

Version-Release number of selected component (if applicable):
cockpit-machines-197.2-1.el8.noarch
libvirt-dbus-1.2.0-3.module+el8.1.0+3531+2918145b.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create an raw disk by using 'virsh vol-create-as $pool $disk $capacity --format raw' 
2. Login cockpit and Create a VM
3. Switch to the disk tab of the VM, then click attach button
4. Switch the raw disk which is prepared in advance from 'Using existing'

Actual results:
1. The attaching is failed with an error message that is 'operation failed: Incorrect disk format'.

Expected results:
1. The raw disks which have been created can be attached

Additional info:

--- Additional comment from Simon Kobyda on 2019-08-26 18:52:14 CST ---

This bug was already fixed and merged 19 days ago

commit 0eba27e0735c5eba1edbfed4d29237adf6d4249e
Author: Simon Kobyda <skobyda>
Date:   Thu Aug 1 13:27:59 2019 +0200

    machines: Fix incorrect disk format when attaching existing volume
    
    If you attach existing volume as a disk, default storage pool format
    would be used as disk format. That's however not correct, as we should
    use volume's format type as a disk's format type.
    Pool's default format type should be used only as a fallback when volume's
    format type is not present.

Comment 2 Xianghua Chen 2019-11-06 07:57:35 UTC
Please help to check and give pm_ack+ if we are going to fix it in rhel7.8.0, thanks.

Comment 3 Martin Pitt 2019-11-06 08:34:08 UTC
I can't hand out pm-ack myself, but I'll ask Terry. We also don't really need it for Extras, I think.

Comment 5 Xianghua Chen 2019-11-11 06:11:55 UTC
Thanks for the quick fix.
I think we still need the pm_ack+ flag according to the bug process, could you help to check  and set the flag? Thanks a lot.

Comment 6 YunmingYang 2019-11-15 09:34:30 UTC
Test Versions:
cockpit-machines-195.5-2.el7.x86_64
libvirt-dbus-1.3.0-1.el7.x86_64


Test Steps:
1. Create an raw disk by using 'virsh vol-create-as $pool $disk $capacity --format raw' 
2. Login cockpit and Create a VM
3. Switch to the disk tab of the VM, then click attach button
4. Switch the raw disk which is prepared in advance from 'Using existing'


Test Results:
The disk can be attached to the VM after step 4


According to the results, move the status to VERIFIED.

Comment 8 errata-xmlrpc 2020-04-01 00:24:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHBA-2020:1219