Bug 1121556

Summary: Data Center downgrade should not be allowed if it implies downgrading the storage format
Product: [Retired] oVirt Reporter: Allon Mureinik <amureini>
Component: ovirt-engine-coreAssignee: Amit Aviram <aaviram>
Status: CLOSED CURRENTRELEASE QA Contact: Ori Gofen <ogofen>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.4CC: acanan, bugs, ecohen, gklein, lsurette, rbalakri, yeylon, ylavi
Target Milestone: ---   
Target Release: 3.5.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: User was able to downgrade a DC's version even if the target version doesn't support storage features that were already installed on the DC's hosts. Consequence: unsupported installed features could cause a system failure if a host with an older VDSM version were to be attached to it. Fix: Three reasons for downgrading to be disabled: A. if the DC contains mixed storage types, and the target version does not support that. In other words, DCs of mixed typed cannot be downgraded below the 3.4 compatibility version. B. If the storage format implied from the target version is different. In other words, DCs from compatibility version 3.1 and above that contain at least one storage domain cannot be downgraded to compatibility version 3.0. C. if the target version does not support some of the storage types that are attached to the DC. In other words, a DC that contains a POSIX storage domain cannot be downgraded to compatibility version 3.0 and a DC that contains a GlusterFS storage domain cannot be downgraded to compatibility version 3.2 or below. Result: By implementing all of the aforementioned restrictions it is now not possible to have a DC that can potentially allow attaching a host that does not support some of the used storage features in it.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-29 06:19:40 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:    
Bug Blocks: 1193058, 1196662, 1197441    

Description Allon Mureinik 2014-07-21 08:29:42 UTC
Description of problem:
Downgrading a DC's compatibility version was introduced in oVirt 3.4 (see bug 1057029).
However, an additional validation is missing to make sure the DC isn't downgraded to a DC which supports a different storage format.

Without this validation, the implication is that you could, for example, theoretically create a 3.5 DC, have a 3.5 host connect to it and create a storage pool, and then downgrade it to a 3.0 DC while keeping the V3 storage format. This would mean you now have a 3.0 DC that 3.0 hosts can't connect to.

Note: This restriction should only apply if the DC has storage domains in it (i.e., if a storage pool was created).

Version-Release number of selected component (if applicable):
3.4.2 (see bug 1057029)

How reproducible:
100%

Steps to Reproduce:
1. Create a 3.5 DC
2. Create a 3.5 Cluster
3. Connect a host to the cluster
4. Create the first storage domain (implicitly creates the pool).

Attempt to downgrade the DC to 3.4: should succeed

Attempt to downgrade the DC to 3.0:
- In the UI, there should be no such option
- In REST API, you should get a canDoAction() error.

Comment 1 Eyal Edri 2015-02-26 12:33:13 UTC
this ovirt bug was fixed during 3.5.1 cycle and is included in the build, and therefore should be verified.

Comment 2 Ori Gofen 2015-03-19 09:13:43 UTC
verified on vt14: 
* From Rhevm-UI the option that downgrades the DC to 3.0 exists, but the action is blocked with CDA
* From Rest the operation is also blocked with CDA, with Error message:
"Cannot edit Data Center. This action will cause storage format downgrading which is not supported. The following storage domains cannot be downgraded: FCp_1,
FCp."

Comment 3 Eyal Edri 2015-04-29 06:19:40 UTC
ovirt 3.5.2 was GA'd. closing current release.