Bug 1321585

Summary: [RFE] Add option to deactivate storage domain only if ovf store was updated
Product: [oVirt] ovirt-engine Reporter: Liron Aravot <laravot>
Component: BLL.StorageAssignee: Eyal Shenitzky <eshenitz>
Status: CLOSED CURRENTRELEASE QA Contact: Kevin Alon Goldblatt <kgoldbla>
Severity: high Docs Contact:
Priority: medium    
Version: 3.6.3.3CC: aefrat, amureini, bugs, eshenitz, jentrena, mkalinin, mtessun, pdwyer, ratamir, ylavi
Target Milestone: ovirt-4.2.0Keywords: FutureFeature
Target Release: 4.2.0Flags: rule-engine: ovirt-4.2+
ratamir: testing_plan_complete-
ylavi: planning_ack+
amureini: devel_ack+
ratamir: testing_ack+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Feature: Add ability to perform force maintenance to storage domain. Reason: Before this fix, storage domain could enter to maintenance even if OVF disks update failed. Now, storage domain deactivation will fail in case of OVF update failure. Force maintenance flag will supply the ability to deactivate the storage domain even in case of failure in OVF update.
Story Points: ---
Clone Of:
: 1364947 (view as bug list) Environment:
Last Closed: 2018-02-12 10:10:32 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: 1523225    
Bug Blocks: 1364947, 1548948    

Description Liron Aravot 2016-03-28 13:55:46 UTC
Description of problem:
Currently when a storage domain is deactivated we attempt to update its ovf stores. If the ovf update fails the domain will still be deactivated, in some cases we'd like to fail if the ovf update fails.


Steps to Reproduce:
1. Create a NFS Storage Domain
2. Attach the domain to DC with version 3.5 and up 
3. Activate the domain
4. Deactivate the domain
5. Ovf update should be executed for the domain and create ovf stores
6. Delete the images of the ovf stores from the storage
7. Activate the domain
8. deactivate the domain

Actual results:
The domain deactivation will succeed always

Expected results:
We might want to fail the deactivation when the ovf stores aren't updated

Additional info:

Comment 4 Kevin Alon Goldblatt 2017-12-10 16:15:18 UTC
Tested with the following code:
--------------------------------
ovirt-engine-4.2.0-0.6.el7.noarch
vdsm-4.20.9-1.el7ev.x86_64


Tested with following scenario:
--------------------------------
Steps to Reproduce:
1. Create a NFS Storage Domain
2. Attach the domain to DC with version 3.5 and up 
3. Activate the domain
4. Deactivate the domain
5. Ovf update should be executed for the domain and create ovf stores
6. Delete the images of the ovf stores from the storage ( I did this by accessing the nfs domain, and deleted the 2 images using "rm -rf" from: /mnt/kev369/ea995f89-bc02-4822-8fec-ac78dfcd767d/images/
7. Activate the domain
8. deactivate the domain - the images were created again

Not sure what the result should have been here as I expected the deactivation to fail

Comment 5 Eyal Shenitzky 2017-12-11 05:23:57 UTC
Hi Kevin, 

This bug depends on 1523225.

The steps to reproduce are:

1) Create a new SD (NFS preferred) with a VM and disk base on it.
2) To make sure OVF update will be triggered, change the VM name.
3) On the VDSM host: change the relevant SD images on (rhev/data/...) user & group ownership from kvm:vdsm (or 36:36) to root:root via :

"chwon -R root:root <image_path>"

4) Deactivate relevant SD.

Expected result:
The OVf update should fail and cause the deactivation to failed.

* By mark the 'Ignore OVF update failure' the SD will deactivate even if the OVF update failed.

Comment 6 Kevin Alon Goldblatt 2018-01-15 14:54:31 UTC
Tested with the following code:
--------------------------------
ovirt-engine-4.2.1-0.2.el7.noarch
vdsm-4.20.11-18.git92c490c.el7.centos.x86_64

The steps to reproduce are:

1) Create a new SD (NFS preferred) with a VM and disk base on it.
2) To make sure OVF update will be triggered, change the VM name.
3) On the VDSM host: change the relevant SD images on (rhev/data/...) user & group ownership from kvm:vdsm (or 36:36) to root:root via :

"chwon root:root <image_path>"

4) Deactivate relevant SD.

Expected result:
The OVf update should fail and cause the deactivation to failed.


Moving to VERIFIED

Comment 7 Sandro Bonazzola 2018-02-12 10:10:32 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.