Bug 1146073 - Failing to Attach a Storage Domain without Disk Profiles to a Data Center 3.5
Summary: Failing to Attach a Storage Domain without Disk Profiles to a Data Center 3.5
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: 3.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.5.0
Assignee: Gilad Chaplik
QA Contact: Nikolai Sednev
Whiteboard: sla
Depends On:
Blocks: 1073943
TreeView+ depends on / blocked
Reported: 2014-09-24 11:58 UTC by Federico Simoncelli
Modified: 2016-02-10 19:41 UTC (History)
12 users (show)

Fixed In Version: ovirt-3.5.0_rc4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-10-17 12:21:22 UTC
oVirt Team: SLA

Attachments (Terms of Use)
attach-sd-to-pool-failure.log.gz (3.31 KB, application/x-gzip)
2014-09-24 12:00 UTC, Federico Simoncelli
no flags Details

System ID Priority Status Summary Last Updated
oVirt gerrit 33428 master MERGED core: create default disk profile for attached SD Never
oVirt gerrit 33463 ovirt-engine-3.5 MERGED core: create default disk profile for attached SD Never

Description Federico Simoncelli 2014-09-24 11:58:58 UTC
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)
  SELECT uuid_generate_v1(),
  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

How reproducible:

Steps to Reproduce:
1. Try to attach an Unattached Storage Domain without a Disk Profile to a Data Center 3.5

Actual results:

Expected results:

Comment 1 Federico Simoncelli 2014-09-24 12:00:34 UTC
Created attachment 940757 [details]

Comment 2 Sandro Bonazzola 2014-10-17 12:21:22 UTC
oVirt 3.5 has been released and should include the fix for this issue.

Comment 3 Nikolai Sednev 2015-02-17 13:49:06 UTC
Works for me on rhevm-3.5.0-0.32.el6ev.noarch.

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