Bug 1622135

Summary: Free space check on local bootstrap VM directory is not performed at ansible level
Product: [oVirt] ovirt-hosted-engine-setup Reporter: Simone Tiraboschi <stirabos>
Component: GeneralAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED CURRENTRELEASE QA Contact: Liran Rotenberg <lrotenbe>
Severity: low Docs Contact:
Priority: medium    
Version: 2.2.24CC: bugs
Target Milestone: ovirt-4.2.7Flags: rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-hosted-engine-setup-2.2.27-1.el7ev.noarch.rpm Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-02 14:29:02 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: 1629888    

Description Simone Tiraboschi 2018-08-24 14:17:07 UTC
Description of problem:
Free space check on local bootstrap VM directory is not performed at ansible level but still just on otopi side.
So the test is skipped at all if the setup is lead from cockpit.

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


How reproducible:
100%

Steps to Reproduce:
1. deploy hosted-engine from cockpit having low space in temp dir
2.
3.

Actual results:
it tried to extract the appliance and fail there

Expected results:
it fails before extracting the appliance with a clear error message

Additional info:

Comment 1 Liran Rotenberg 2018-10-02 13:28:03 UTC
Verified on:
ovirt-hosted-engine-setup-2.2.27-1.el7ev.noarch

Steps:
1. Install appliance and relevant rpms.
2. Fill the space of the host (check with # df -h /var/tmp)
Fill with
# dd if=/dev/zero of=file bs=100M count=20 (change bs/count accordingly)
3. Deploy HE using cockpit.

Result:
Deployment failed while checking if there enough space to extract the appliance.

[ INFO ] TASK [Install rhvm-appliance rpm]
[ INFO ] ok: [localhost]
[ INFO ] TASK [Parse appliance configuration for path]
[ INFO ] changed: [localhost]
[ INFO ] TASK [Parse appliance configuration for sha1sum]
[ INFO ] changed: [localhost]
[ INFO ] TASK [Get OVA path]
[ INFO ] ok: [localhost]
[ INFO ] TASK [Compute sha1sum]
[ INFO ] ok: [localhost]
[ INFO ] TASK [Compare sha1sum]
[ INFO ] skipping: [localhost]
[ INFO ] TASK [Register appliance PATH]
[ INFO ] skipping: [localhost]
[ INFO ] TASK [Check available space on local VM directory]
[ INFO ] changed: [localhost]
[ INFO ] TASK [Check appliance size]
[ INFO ] changed: [localhost]
[ INFO ] TASK [Ensure we have enough space to extract the appliance]
[ ERROR ] fatal: [localhost]: FAILED! => { "assertion": "local_vm_dir_space_out.stdout_lines[0]|int * 1024 > appliance_size.stdout_lines[0]|int * 1.1", "changed": false, "evaluated_to": false, "msg": "/var/tmp/localvmOCjI7Z doesn't provide enough free space to extract the engine appliance: 2567.65625 Mb are available while 3222.13867188 Mb are required.\n" }
[ INFO ] TASK [include_tasks]
[ INFO ] ok: [localhost]
[ INFO ] TASK [Remove local vm dir]
[ INFO ] changed: [localhost]
[ INFO ] TASK [Remove temporary entry in /etc/hosts for the local VM]
[ INFO ] ok: [localhost]
[ INFO ] TASK [Notify the user about a failure]
[ ERROR ] fatal: [localhost]: FAILED! => {"changed": false, "msg": "The system may not be provisioned according to the playbook results: please check the logs for the issue, fix accordingly or re-deploy from scratch.\n"}

Comment 2 Sandro Bonazzola 2018-11-02 14:29:02 UTC
This bugzilla is included in oVirt 4.2.7 release, published on November 2nd 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.7 release, it has been closed with a resolution of CURRENT RELEASE.

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