Bug 1821692 - [blockdev] Don't disable blockdev with disk if='sd' by forbidding blockjobs
Summary: [blockdev] Don't disable blockdev with disk if='sd' by forbidding blockjobs
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Krempa
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-07 12:26 UTC by Peter Krempa
Modified: 2020-05-21 07:22 UTC (History)
16 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-05-20 14:12:08 UTC
Embargoed:


Attachments (Terms of Use)

Description Peter Krempa 2020-04-07 12:26:32 UTC
Description of problem:
Use of the 'sd' bus for a disk will disable blockdev. Since 'sd' disks are really used rarely for weird arm boards which don't have other storage we can attempt to fix it by forbidding blockjobs on 'sd' disks and enabling blockdev. 'sd' disks will still use -drive if='sd' though.

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



Steps to Reproduce:
1. Start vm with a 'sd' disk
2. -drive is used instead of -blockdev
3.

Comment 1 Peter Krempa 2020-05-12 09:38:18 UTC
Fixed upstream by:

3bcbdc51da qemu: process: Don't clear QEMU_CAPS_BLOCKDEV when SD card is present
e664abb62e qemu: Prepare for 'sd' card use together with blockdev
d876a93f05 qemu: Handle cases when 'qomName' isn't present
b50a8354f6 qemu: Refuse blockjobs on disk bus='sd' with -blockdev
59a3adbcf2 qemu: Forbid 'cdrom' on 'sd' bus
7288da8dc8 tests: Add tests for a virtio and sd disk in a single machine
961ba2b969 qemuDomainValidateStorageSource: Allow masking out blockdev support
6cd8234f08 qemuDomainValidateStorageSource: Extract check for BLOCKDEV capability
9fdf6aeb7a qemuDomainSetBlockThreshold: Call qemuBlockNodeNamesDetect only without blockdev
5ac95d8084 qemu: command: Remove 'virDomainDiskQEMUBus' enum converters
ffcd822578 qemuBuildDiskDeviceStr: Use XML disk bus type names in error message
7824bb8548 qemuBuildDriveStr: Refactor formatting of command line for 'sd' cards
10f5ad9b58 qemuBuildDiskCommandLine: Clarify logic around building -device for disks
cc4a277db2 qemu: Rename qemuDiskBusNeedsDriveArg to qemuDiskBusIsSD
514822dbbd qemuCheckDiskConfig: Remove and untangle callers
8b5cf013ef qemu: Move disk config validation to qemuValidateDomainDeviceDefDiskFrontend
ca03369c99 qemu: validate: Validate blkdeviotune settings in the validator
0b786e75b6 qemuValidateDomainDeviceDefDisk: Separate disk frontend config validation
8ddd7d840f qemuxml2(argv|xml): Modernize 'discard'/'detect-zero' tests
1071bda21f qemuxml2(argv|xml): Modernize 'blkdeviotune' tests

v6.3.0-57-g3bcbdc51da

Comment 2 Han Han 2020-05-13 02:50:29 UTC
Hi, Perter,
Since sd bus is disabled in downstream qemu, users could never start a VM with sd bus in redhat virt stack:
➜  ~ /usr/libexec/qemu-kvm -device \?|grep sd

I'd like move the Product to fedora

Comment 3 Cole Robinson 2020-05-20 14:12:08 UTC
I don't think sd bus gets much use in Fedora these days, arm32 supports virtio devices. So I'll close this and if anyone is impacted we can revisit backporting

Comment 4 Peter Krempa 2020-05-20 14:18:28 UTC
Moving to upstream tracker and closing properly since the patches were pushed upstream.

Comment 5 Ján Tomko 2020-05-21 07:22:34 UTC
The UPSTREAM resolution is invalid in the upstream tracker.
There's nothing upstream of the upstream tracker.


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