Description of problem: Creating a thin-provision disk from VM Portal fails with the following error: ~~~ CREATE_DISK_FOR_VM failed [Cannot add Virtual Disk. Disk configuration (RAW Sparse backup-None) is incompatible with the storage domain type.] ~~~ In engine.log the following error is logged: ~~~ 2021-05-06 10:45:22,334-04 WARN [org.ovirt.engine.core.bll.storage.disk.AddDiskCommand] (default task-17) [108bff7d-adac-4c3d-a5e6-80707bc4fec5] Validation of action 'AddDisk' failed for user admin@internal-authz. Reasons: VAR__ACTION__ADD,VAR__TYPE__DISK,ACTION_TYPE_FAILED_DISK_CONFIGURATION_NOT_SUPPORTED,$volumeFormat RAW,$volumeType Sparse,$backup None 2021-05-06 10:45:22,335-04 INFO [org.ovirt.engine.core.bll.storage.disk.AddDiskCommand] (default task-17) [108bff7d-adac-4c3d-a5e6-80707bc4fec5] Lock freed to object 'EngineLock:{exclusiveLocks='', sharedLocks='[7d7fd19f-d16c-45da-a41f-1c9f19d78f57=VM]'}' 2021-05-06 10:45:22,350-04 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-17) [] Operation Failed: [Cannot add Virtual Disk. Disk configuration (RAW Sparse backup-None) is incompatible with the storage domain type.] ~~~ When creating a thin provision disk from the Admin Portal, it works and creates a sparse COW as expected: ~~~ 2021-05-06 10:49:20,390-04 INFO [org.ovirt.engine.core.bll.storage.disk.AddDiskCommand] (default task-23) [1718a91b-63d0-4e8c-977d-6939453f678e] Running command: AddDiskCommand internal: false. Entities affected : ID: 04ccf3fb-dae9-40f6-b06a-f3f606ce804a Type: StorageAction group CREATE_DISK with role type USER 2021-05-06 10:49:20,452-04 INFO [org.ovirt.engine.core.bll.storage.disk.image.AddImageFromScratchCommand] (default task-23) [1718a91b-63d0-4e8c-977d-6939453f678e] Running command: AddImageFromScratchCommand internal: true. Entities affected : ID: 04ccf3fb-dae9-40f6-b06a-f3f606ce804a Type: Storage 2021-05-06 10:49:20,506-04 INFO [org.ovirt.engine.core.vdsbroker.irsbroker.CreateVolumeVDSCommand] (default task-23) [1718a91b-63d0-4e8c-977d-6939453f678e] START, CreateVolumeVDSCommand( CreateVolumeVDSCommandParameters:{storagePoolId='9f57b888-d821-11ea-b14c-00163e13fb40', ignoreFailoverLimit='false', storageDomainId='04ccf3fb-dae9-40f6-b06a-f3f606ce804a', imageGroupId='b263c48e-59bf-4bc9-a12f-7fbe045517de', imageSizeInBytes='1073741824', volumeFormat='COW', newImageId='363b594b-2254-456d-8856-f5faf0f50537', imageType='Sparse', newImageDescription='{"DiskAlias":"delete","DiskDescription":""}', imageInitialSizeInBytes='0', imageId='00000000-0000-0000-0000-000000000000', sourceImageGroupId='00000000-0000-0000-0000-000000000000', shouldAddBitmaps='false'}), log id: 7c3f9349 ~~~ The issue appears to be that disks created from the VM Portal on block storage using thin provision attempt to create raw/sparse instead of cow/sparse. Version-Release number of selected component (if applicable): 4.4.5 How reproducible: 100% Steps to Reproduce: 1. Try to create thin disk on iSCSI storage from VM Portal Actual results: VM portal fails, because it tries to create raw/sparse Expected results: It works and creates qcow2/sparse like Admin Portal does. Additional info:
Lowering severity, as there is no data loss or 0day operation problem. WA: pre-create disks via AdminPortal/API / use pre-allocate. Raising priority as this is core functionality. Severity urgent: """ catastrophic issues which severely impact the mission-critical operations of an organization. This may mean that the operational servers, development systems or customer applications are down or not functioning and no procedural workaround exists. """
Unfortunately we didn't get to fix that for 4.4.7, postponing to 4.4.8
With https://github.com/oVirt/ovirt-web-ui/pull/1508 VM Portal will be aware of the disk format/sparse values that are required for each type of storage domain. Thin and Preallocated disks will be mapped properly based on storage domain type (the important ones for this BZ being 'file' and 'block' types).
Pavel, are you planning to verify this?
Verified in ovirt-engine-4.4.9.3-0.3.el8ev.noarch ovirt-web-ui-1.7.2-1.el8ev.noarch Creating a thin provisioned disk on an ISCSI storage domain is successful. I also successfully created provision & preallocated disks on ISCSI and NFS storages to make sure there are no regressions.
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 (Moderate: RHV Manager (ovirt-engine) security update [ovirt-4.4.9]), 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/RHSA-2021:4626