Bug 1347340

Summary: [RFE] hosted engine should check the actual size of the qcow instead of relying on the OVA
Product: [oVirt] ovirt-hosted-engine-setup Reporter: Ryan Barry <rbarry>
Component: RFEsAssignee: Ryan Barry <rbarry>
Status: CLOSED CURRENTRELEASE QA Contact: Artyom <alukiano>
Severity: medium Docs Contact:
Priority: high    
Version: 2.0.0CC: bugs, dfediuck, didi, fdeutsch, mavital, melewis, mkalinin, rbarry, stirabos, ylavi
Target Milestone: ovirt-4.0.5Keywords: FutureFeature, Triaged
Target Release: 2.0.3Flags: rule-engine: ovirt-4.0.z+
ylavi: planning_ack+
dfediuck: devel_ack+
mavital: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Previously, ovirt-hosted-engine-setup relied on the OVA metadata to determine the size of the image contained in OVAs, and the amount of temporary disk space needed to unpack it. However, sparsified images would report a value much higher than the actual space required on-disk. Now, ovirt-hosted-engine-setup will check the actual size of images contained in OVAs in order to determine the amount of temporary storage required.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-18 07:39:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1379964    

Description Ryan Barry 2016-06-16 14:49:20 UTC
Description of problem:
ovirt-hosted-engine-setup currently checks the OVA metadata to determine the local storage requirements, but the size indicated by the OVA is much larger than the actual size of the qcow

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

How reproducible:
100%

Steps to Reproduce:
1. Use an OVA for the engine appliance
2. Check the space required in the temporary folder

Actual results:
The OVA asks for 50GB

Expected results:
The actual size of the qcow is something like 3.2GB. This should be the required size.

Comment 1 Red Hat Bugzilla Rules Engine 2016-06-16 14:51:31 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 2 Yedidyah Bar David 2016-06-19 06:01:46 UTC
This is a subtle issue, and I am pretty certain was already discussed, or at least considered, when writing current code.

Didn't review linked patch.

Perhaps we should:
1. Show both sizes (actual and configured)
2. Give some short hints for actual needs, perhaps with a link somewhere with more info
3. Do require only the actual size + a bit more (say, +2GB or so, need to consider this).

Comment 3 Fabian Deutsch 2016-06-20 13:00:51 UTC
One note: We need to differentiate between two space requirements:
1. Temporary requirement when the OVA is getting extracted, this might be related to the sparse size
2. Persistent storage requirements, this should probably be related to the maximum allocation size

Comment 4 Yaniv Lavi 2016-06-28 13:45:44 UTC
Why no fix metadata of the OVA then?

Comment 5 Ryan Barry 2016-06-28 14:06:53 UTC
The OVA is intended as informational, and the full size (50GB) is actually used on shared storage as part of hosted-engine-setup by qemu-img convert. It's just much more space than is needed in the local tmpdir.

Comment 6 Yaniv Kaul 2016-07-17 13:32:09 UTC
Since it's not in even in master, time to move to 4.1?

Comment 7 Yaniv Lavi 2016-08-24 21:10:53 UTC
We need to resolve this since the current flow is very likely for customers to hit. If we fix this, the default /var size should be enough to setup HE.

Comment 8 Fabian Deutsch 2016-08-25 14:27:58 UTC
Yes - This should be solved sooner than later.

It will also help to reduce the storage requirements of Node.

Comment 9 Artyom 2016-10-05 13:32:10 UTC
Verified on ovirt-hosted-engine-setup-2.0.3-2.el7ev.noarch

2016-10-05 16:06:49 DEBUG otopi.plugins.gr_he_common.vm.boot_disk boot_disk._parse_ovf:316 Configuring Disk
2016-10-05 16:06:49 DEBUG otopi.plugins.gr_he_common.vm.boot_disk boot_disk._parse_ovf:323 alukiano: IMAGE size: 50
2016-10-05 16:06:49 WARNING otopi.plugins.gr_he_common.vm.boot_disk boot_disk._parse_ovf:333 OVF does not contain a valid image description, using default.
2016-10-05 16:06:49 DEBUG otopi.plugins.gr_he_common.vm.boot_disk boot_disk._parse_ovf:352 alukiano: QCOW size: 3
2016-10-05 16:06:49 DEBUG otopi.plugins.gr_he_common.vm.boot_disk boot_disk._parse_ovf:353 Configuring CPUs
2016-10-05 16:06:49 DEBUG otopi.plugins.gr_he_common.vm.boot_disk boot_disk._parse_ovf:373 Configuring memory
2016-10-05 16:06:49 DEBUG otopi.plugins.gr_he_common.vm.boot_disk boot_disk._customization:644 alukiano: TEMPDIR: /var/tmp
2016-10-05 16:06:49 DEBUG otopi.ovirt_hosted_engine_setup.domains domains.check_available_space:110 Checking available space on /var/tmp
2016-10-05 16:06:49 DEBUG otopi.ovirt_hosted_engine_setup.domains domains.check_available_space:117 Available space on /var/tmp is 15271Mb
2016-10-05 16:06:49 DEBUG otopi.context context.dumpEnvironment:760 ENVIRONMENT DUMP - BEGIN
2016-10-05 16:06:49 DEBUG otopi.context context.dumpEnvironment:770 ENV OVEHOSTED_STORAGE/imgSizeGB=int:'50'
2016-10-05 16:06:49 DEBUG otopi.context context.dumpEnvironment:770 ENV OVEHOSTED_STORAGE/qcowSizeGB=int:'3'

Comment 10 Marina Kalinin 2017-04-04 19:02:50 UTC
Current release means 4.0.5 from talking to rbarry today.