Bug 1449641

Summary: [downstream clone - 4.1.2] Unable to import a template to RHV 4.1 from Storage domain imported of RHEV 3.5
Product: Red Hat Enterprise Virtualization Manager Reporter: rhev-integ
Component: ovirt-engineAssignee: jniederm
Status: CLOSED ERRATA QA Contact: Israel Pinto <ipinto>
Severity: urgent Docs Contact:
Priority: high    
Version: 4.1.1CC: eedri, ipinto, kshukla, lsurette, mavital, melewis, michal.skrivanek, mkalinin, mtessun, rbalakri, Rhev-m-bugs, srevivo, ykaul
Target Milestone: ovirt-4.1.2Keywords: ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, when attempting to import a template from a non-master data domain that was imported from a version of Red Hat Virtualization earlier than 4.1 a pop-up error message displayed, "Cannot import Template. Memory size (X MB) cannot exceed maximum memory size (0MB)." Now, the maximum amount of memory that can be handled during a template import has been corrected.
Story Points: ---
Clone Of: 1449353 Environment:
Last Closed: 2017-05-24 11:24:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1449353    
Bug Blocks:    

Description rhev-integ 2017-05-10 12:01:17 UTC
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1449353 +++
======================================================================

Created attachment 1277417 [details]
engine.log

Description of problem:
Unable to import a template to RHV 4.1 from Storage domain imported of RHEV 3.5. Storage domain previously attached to RHEV 3.5.

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

Red Hat Virtualization Manager Version: 4.1.1.8-0.1.el7 

How reproducible:
100%

Steps to Reproduce:
1. Detach a NFS Storage domain containing a Template configured with Memory 8GB
2. Import Storage domain to RHV 4.1 
3. Try to Import the Template.

Actual results:
Template import fails with below errors.

2017-05-09 23:31:15,697+05 WARN  [org.ovirt.engine.core.bll.exportimport.ImportVmTemplateFromConfigurationCommand] (default task-19) [96ef9c83-ee83-4db4-9216-46a9b4bf2b4e] Validation of action 'ImportVmTemplateFromConfiguration' failed for user admin@internal-authz. Reasons: VAR__ACTION__IMPORT,VAR__TYPE__VM_TEMPLATE,ACTION_TYPE_FAILED_MAX_MEMORY_CANNOT_BE_SMALLER_THAN_MEMORY_SIZE,$maxMemory 0,$memory 8192


Expected results:
Template should be imported sucessfully.


Additional info:
Attaching engine.log of RHV 4.1 environment.

Details: 

Template name: test-template
CPU : 1
Memory : 8GB

Failure event from engine.log

2017-05-09 23:31:14,621+05 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (default task-19) [96ef9c83-ee83-4db4-9216-46a9b4bf2b4e] START, GetImageInfoVDSCommand( GetImageInfoVDSCommandParameters:{runAsync='true', storagePoolId='00000001-0001-0001-0001-000000000311', ignoreFailoverLimit='false', storageDomainId='178d4880-af35-48fa-88ff-e5a2b455d0bd', imageGroupId='1f91fc2d-e326-4fa7-8470-9b2c48054220', imageId='1976d000-cf13-4c13-be5e-c9eb4eb026d3'}), log id: 5f4ea8bb
2017-05-09 23:31:14,622+05 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-19) [96ef9c83-ee83-4db4-9216-46a9b4bf2b4e] START, GetVolumeInfoVDSCommand(HostName = hosted-engine1, GetVolumeInfoVDSCommandParameters:{runAsync='true', hostId='4eb08795-9d4b-4bff-9a9d-e6a9e881a4bf', storagePoolId='00000001-0001-0001-0001-000000000311', storageDomainId='178d4880-af35-48fa-88ff-e5a2b455d0bd', imageGroupId='1f91fc2d-e326-4fa7-8470-9b2c48054220', imageId='1976d000-cf13-4c13-be5e-c9eb4eb026d3'}), log id: 1811eaa
2017-05-09 23:31:15,680+05 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-19) [96ef9c83-ee83-4db4-9216-46a9b4bf2b4e] FINISH, GetVolumeInfoVDSCommand, return: org.ovirt.engine.core.common.businessentities.storage.DiskImage@742517c2, log id: 1811eaa
2017-05-09 23:31:15,680+05 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (default task-19) [96ef9c83-ee83-4db4-9216-46a9b4bf2b4e] FINISH, GetImageInfoVDSCommand, return: org.ovirt.engine.core.common.businessentities.storage.DiskImage@742517c2, log id: 5f4ea8bb
2017-05-09 23:31:15,697+05 WARN  [org.ovirt.engine.core.bll.exportimport.ImportVmTemplateFromConfigurationCommand] (default task-19) [96ef9c83-ee83-4db4-9216-46a9b4bf2b4e] Validation of action 'ImportVmTemplateFromConfiguration' failed for user admin@internal-authz. Reasons: VAR__ACTION__IMPORT,VAR__TYPE__VM_TEMPLATE,ACTION_TYPE_FAILED_MAX_MEMORY_CANNOT_BE_SMALLER_THAN_MEMORY_SIZE,$maxMemory 0,$memory 8192

(Originally by Koutuk Shukla)

Comment 5 rhev-integ 2017-05-10 12:01:41 UTC
done on master

(Originally by michal.skrivanek)

Comment 6 Michal Skrivanek 2017-05-10 12:14:09 UTC
done in 4.1.z

Comment 8 rhev-integ 2017-05-12 15:10:23 UTC
INFO: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Tag 'ovirt-engine-4.1.2' doesn't contain patch 'https://gerrit.ovirt.org/76017']
gitweb: https://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=shortlog;h=refs/tags/ovirt-engine-4.1.2

For more info please contact: rhv-devops

Comment 9 Michal Skrivanek 2017-05-12 16:32:28 UTC
AFAICT it is included just fine. Please take a look at what's being checked

Comment 12 Israel Pinto 2017-05-14 11:15:25 UTC
Verify with:
RHVM Version: 4.1.2.2-0.1.el7

Steps:
1. Create Template on 35 DC and export it, with memory of 8GM 
2. Detach Storage domain containing a Template configure
2. Import Storage domain to RHV 4.1 
3. Import the Template and create VM
4. Run VM
5. Stop VM and edit VM max memory to 10 GB
6. Run VM again

Results:
VM is up in both cases with no error, no error in import template also.

Comment 17 errata-xmlrpc 2017-05-24 11:24:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHEA-2017:1280