Bug 2167508 - [4.10] Use consistent cache mode setting logic for hotplugged disks
Summary: [4.10] Use consistent cache mode setting logic for hotplugged disks
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 4.10.7
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
: 4.10.8
Assignee: Alexander Wels
QA Contact: Yan Du
URL:
Whiteboard:
: 2162140 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-06 20:37 UTC by Adam Litke
Modified: 2023-08-08 10:39 UTC (History)
6 users (show)

Fixed In Version: 4.10.8-30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-08 10:39:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt kubevirt pull 8068 0 None Merged Set cache mode on hotplugged disks. 2023-02-06 20:38:59 UTC
Github kubevirt kubevirt pull 9179 0 None open [release-0.49] Hotplug cache none 2023-02-06 20:50:52 UTC
Red Hat Issue Tracker CNV-25116 0 None None None 2023-02-06 20:38:29 UTC
Red Hat Knowledge Base (Solution) 6995346 0 None None None 2023-03-28 13:45:36 UTC

Description Adam Litke 2023-02-06 20:37:28 UTC
Description of problem:

When hot plugging a disk the cache mode is not set explicitly which can result in a default cache mode being used.  We would like to use the same logic for hot plugged disks as for conventionally attached disks which is to prefer cache=none when the underlying storage supports direct IO.  


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


How reproducible: Always


Steps to Reproduce:
1. Create VM
2. Start VM
3. Hotplug a disk
4. Use `oc rsh` to connect to the appropriate virt-launcher Pod
5. Execute `virsh dumpxml 1`

Actual results: The xml shows a cache mode other than 'none' for the hotplug disk


Expected results: The cache mode should be set to 'none'


Additional info:

Comment 2 Yan Du 2023-03-01 05:13:47 UTC
Test on CNV-v4.10.8-37, cache mode is none


    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' error_policy='stop' io='native' discard='unmap'/>
      <source dev='/var/run/kubevirt/hotplug-disks/blank-dv' index='3'/>

Comment 3 Itamar Holder 2023-03-28 13:45:36 UTC
*** Bug 2162140 has been marked as a duplicate of this bug. ***


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