Description of problem:
It seems that some old Storage Domains don't have a "Disk Profile". For example the "Unattached" Storage Domains or the ones in a Data Center < 3.5 (IIUC).
According to (03_06_0250_disk_profile_for_disk_image.sql):
-- Add disk profile for each SD, if compat version >= 3.5
INSERT INTO disk_profiles(id, name, storage_domain_id)
FROM storage_pool LEFT OUTER JOIN storage_pool_iso_map ON storage_pool.id = storage_pool_iso_map.storage_pool_id
LEFT OUTER JOIN storage_domain_static ON storage_pool_iso_map.storage_id = storage_domain_static.id
WHERE (storage_domain_static.storage_domain_type = 0 OR
storage_domain_static.storage_domain_type = 1) AND
cast(storage_pool.compatibility_version as float) >= 3.5;
Later when we try to attach those Storage Domains to a Data Center 3.5 we fail with:
2014-09-24 11:05:54,010 INFO [org.ovirt.engine.core.bll.storage.AttachStorageDomainToPoolCommand] (org.ovirt.thread.pool-6-thread-35) [4c431155] Register new floating OVF_STORE disk with disk id 3145168f-f1f6-4ada-b222-55d5160e2bba for storage domain a1f1ba36-4416-4e0b-9d77-947af011b3d4 has failed
Because setAndValidateDiskProfiles in RegisterDiskCommand fails to find the Disk Profile of the Storage Domain.
Version-Release number of selected component (if applicable):
Upstream master git hash: 2c12a39
Steps to Reproduce:
1. Try to attach an Unattached Storage Domain without a Disk Profile to a Data Center 3.5
Created attachment 940757 [details]
oVirt 3.5 has been released and should include the fix for this issue.
Works for me on rhevm-3.5.0-0.32.el6ev.noarch.