Bug 1309212

Summary: Allow changing DC type from local to shared and vice versa [if the SD types permit it]
Product: [oVirt] ovirt-engine Reporter: Allon Mureinik <amureini>
Component: BLL.StorageAssignee: Maor <mlipchuk>
Status: CLOSED CURRENTRELEASE QA Contact: Lilach Zitnitski <lzitnits>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.0.0CC: amureini, bugs, ratamir
Target Milestone: ovirt-4.1.0-alphaFlags: rule-engine: ovirt-4.1+
rule-engine: planning_ack+
amureini: devel_ack+
ratamir: testing_ack+
Target Release: 4.1.0.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-01 14:34:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1302185    
Bug Blocks:    

Description Allon Mureinik 2016-02-17 08:53:36 UTC
Description of problem:
Currently, a DC's local/shared property can't be changed. Bug 1302185 breaks down some of the distinction and allows attaching shared domains to local DCs.
The next step is the ability to convert a local DC to a shared one (and vice versa, although it's a less interesting usecase).

Prerequisite to convert a DC from local to shared: The storage pool has no local domains in it (regardless of the status).

Prerequisite to convert a DC from shared to local: The storage pool has no shared domains (i.e., no domains at all - regardless of status) and no more than one cluster which contains no more than one domain.

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

How reproducible:
100%

Comment 1 Sandro Bonazzola 2016-12-12 13:53:42 UTC
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.

Comment 2 Maor 2016-12-13 12:13:00 UTC
(In reply to Allon Mureinik from comment #0)
> Description of problem:
> Currently, a DC's local/shared property can't be changed. Bug 1302185 breaks
> down some of the distinction and allows attaching shared domains to local
> DCs.
> The next step is the ability to convert a local DC to a shared one (and vice
> versa, although it's a less interesting usecase).
> 
> Prerequisite to convert a DC from local to shared: The storage pool has no
> local domains in it (regardless of the status).
> 
> Prerequisite to convert a DC from shared to local: The storage pool has no
> shared domains (i.e., no domains at all - regardless of status) and no more
> than one cluster which contains no more than one domain.

We currently support this kind of update already.
Is there a reason to block this for a local DC updated to shared even if it contains more than one shared SD.

Comment 3 Lilach Zitnitski 2016-12-14 06:30:56 UTC
--------------------------------------
Tested with the following code:
----------------------------------------
vdsm-4.18.999-1138.git6c51957.el7.centos.x86_64
ovirt-engine-4.1.0-0.2.master.20161203231307.gitd7d920b.el7.centos.noarch

Tested with the following scenario:

Steps to Reproduce:
1. create new local dc with one host and few shared storage domains
2. edit the dc and change the storage type from local to shared 
3. edit again the dc and change the storage type from shared to local

Actual results:
dc type is being updated to the right storage type
 
Expected results:

Moving to VERIFIED!

Additional info: 
This was tested with active shared storage domains when updated from local to shared, though Allons' prerequisites mention no storage domains at all:
Prerequisite to convert a DC from shared to local: The storage pool has no shared domains (i.e., no domains at all - regardless of status)
This is still on NEED INFO

Comment 4 Allon Mureinik 2016-12-15 14:03:08 UTC
(In reply to Maor from comment #2)
> (In reply to Allon Mureinik from comment #0)
> > Description of problem:
> > Currently, a DC's local/shared property can't be changed. Bug 1302185 breaks
> > down some of the distinction and allows attaching shared domains to local
> > DCs.
> > The next step is the ability to convert a local DC to a shared one (and vice
> > versa, although it's a less interesting usecase).
> > 
> > Prerequisite to convert a DC from local to shared: The storage pool has no
> > local domains in it (regardless of the status).
> > 
> > Prerequisite to convert a DC from shared to local: The storage pool has no
> > shared domains (i.e., no domains at all - regardless of status) and no more
> > than one cluster which contains no more than one domain.
> 
> We currently support this kind of update already.
> Is there a reason to block this for a local DC updated to shared even if it
> contains more than one shared SD.
You are correct, this is definitely a mistake.
Shared domains shouldn't block changing a DC from local to shared. The only prerequisite should be "no more than one CLUSTER which contains no more than one HOST".