Previously, when deploying Self-Hosted Engine, the Appliance size was not estimated correctly, and as a result, not enough space was allotted, and unpacking the Appliance failed.
In this release, the Appliance size estimation and unpacking space allotment are correct, and deployment succeeds.
DescriptionJaroslav Spanko
2020-04-06 19:36:02 UTC
Description of problem:
Hosted Engine deployment fails with failed to unpack message due to not enough space available. But in the hosted-engine log checks went fine
----
[ < 1 sec ] Check available space on local VM directory
[ < 1 sec ] Check appliance size
[ < 1 sec ] Ensure we have enough space to extract the appliance
[ FAILED ] Extract appliance to local VM directory
----
Version-Release number of selected component (if applicable):
ovirt-hosted-engine-setup-2.3.13-1.el7ev.noarch
How reproducible:
100%
Steps to Reproduce:
1. /var/ has available 3GB
2. run hosted-engine deploy
3. Size check are ok but deployment fails due to not enough space to extract appliance
Actual results:
Deployment fails due to not enough space to extract appliance
Expected results:
Size checks should handle this as mentioned in Documentation
----
If you are also installing the RHV-M Appliance for self-hosted engine installation, /var/tmp must be at least 5 GB.
----
Additional info:
Looking to the setup logs we can see available space calculation
-----
DEBUG var changed: host "localhost" var "local_vm_dir_space_out" type "<type 'dict'>" value: "{
"changed": true,
"cmd": "df -k --output=avail \"/var/tmp\" | grep -v Avail | cat",
"stderr": "",
"stderr_lines": [],
"stdout": "3369048",
"stdout_lines": [
"3369048"
]
}"
-----
And that appliance space calculation
-----
2020-04-06 14:53:00,455+0200 DEBUG var changed: host "localhost" var "appliance_size" type "<type 'dict'>" value: "{
"changed": true,
"cmd": "gzip -l \"/usr/share/ovirt-engine-appliance/rhvm-appliance-4.3-20200317.0.el7.ova\" | grep -v uncompressed | awk '{print $2}'",
"delta": "0:00:00.004485",
"end": "2020-04-06 14:53:00.075119",
"stderr_lines": [],
"stdout": "688011264",
"stdout_lines": [
"688011264"
]
}"
Which is ok 3290MB > 721MB
----
- name: Ensure we have enough space to extract the appliance
assert:
that:
- "local_vm_dir_space_out.stdout_lines[0]|int * 1024 > appliance_size.stdout_lines[0]|int * 1.1"
msg: >
{{ he_local_vm_dir_path }} doesn't provide enough free space to extract the
engine appliance: {{ local_vm_dir_space_out.stdout_lines[0]|int / 1024 | int }} Mb
are available while {{ appliance_size.stdout_lines[0]|int / 1024 / 1024 * 1.1 | int }} Mb
are required.
----
But gtar fails due to not enough space available as it needs at least 5GB to succesfull deployment, once is /var extended deployment works fine.
----
[ ERROR ] fatal: [localhost]: FAILED! => {"changed": false, "dest": "/var/tmp/localvmFj9li4", "extract_results": {"cmd": ["/bin/gtar", "--extract", "-C", "/var/tmp/localvmFj9li4", "-z", "--show-transformed-names", "--sparse", "-f", "/usr/share/ovirt-engine-appliance/rhvm-appliance-4.3-20200317.0.el7.ova"], "err": "/bin/gtar: images/5e30a8db-2787-421d-b8b6-7b397c3b93c8/85cd81dc-f950-43f8-8456-311ce5bb926b: Wrote only 4096 of 10240 bytes\n/bin/gtar: Exiting with failure status due to previous errors\n", "out": "", "rc": 2}, "gid": 36, "group": "kvm", "handler": "TgzArchive", "mode": "0775", "msg": "failed to unpack /usr/share/ovirt-engine-appliance/rhvm-appliance-4.3-20200317.0.el7.ova to /var/tmp/localvmFj9li4", "owner": "vdsm", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 4096, "src": "/usr/share/ovirt-engine-appliance/rhvm-appliance-4.3-20200317.0.el7.ova", "state": "directory", "uid": 36}
----
Does /var/tmp vs appliance size make sense as extration fails due to not enough space ?
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 (RHV Engine and Host Common Packages 4.4.z [ovirt-4.4.3]), 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/RHBA-2020:5212
Description of problem: Hosted Engine deployment fails with failed to unpack message due to not enough space available. But in the hosted-engine log checks went fine ---- [ < 1 sec ] Check available space on local VM directory [ < 1 sec ] Check appliance size [ < 1 sec ] Ensure we have enough space to extract the appliance [ FAILED ] Extract appliance to local VM directory ---- Version-Release number of selected component (if applicable): ovirt-hosted-engine-setup-2.3.13-1.el7ev.noarch How reproducible: 100% Steps to Reproduce: 1. /var/ has available 3GB 2. run hosted-engine deploy 3. Size check are ok but deployment fails due to not enough space to extract appliance Actual results: Deployment fails due to not enough space to extract appliance Expected results: Size checks should handle this as mentioned in Documentation ---- If you are also installing the RHV-M Appliance for self-hosted engine installation, /var/tmp must be at least 5 GB. ---- Additional info: Looking to the setup logs we can see available space calculation ----- DEBUG var changed: host "localhost" var "local_vm_dir_space_out" type "<type 'dict'>" value: "{ "changed": true, "cmd": "df -k --output=avail \"/var/tmp\" | grep -v Avail | cat", "stderr": "", "stderr_lines": [], "stdout": "3369048", "stdout_lines": [ "3369048" ] }" ----- And that appliance space calculation ----- 2020-04-06 14:53:00,455+0200 DEBUG var changed: host "localhost" var "appliance_size" type "<type 'dict'>" value: "{ "changed": true, "cmd": "gzip -l \"/usr/share/ovirt-engine-appliance/rhvm-appliance-4.3-20200317.0.el7.ova\" | grep -v uncompressed | awk '{print $2}'", "delta": "0:00:00.004485", "end": "2020-04-06 14:53:00.075119", "stderr_lines": [], "stdout": "688011264", "stdout_lines": [ "688011264" ] }" Which is ok 3290MB > 721MB ---- - name: Ensure we have enough space to extract the appliance assert: that: - "local_vm_dir_space_out.stdout_lines[0]|int * 1024 > appliance_size.stdout_lines[0]|int * 1.1" msg: > {{ he_local_vm_dir_path }} doesn't provide enough free space to extract the engine appliance: {{ local_vm_dir_space_out.stdout_lines[0]|int / 1024 | int }} Mb are available while {{ appliance_size.stdout_lines[0]|int / 1024 / 1024 * 1.1 | int }} Mb are required. ---- But gtar fails due to not enough space available as it needs at least 5GB to succesfull deployment, once is /var extended deployment works fine. ---- [ ERROR ] fatal: [localhost]: FAILED! => {"changed": false, "dest": "/var/tmp/localvmFj9li4", "extract_results": {"cmd": ["/bin/gtar", "--extract", "-C", "/var/tmp/localvmFj9li4", "-z", "--show-transformed-names", "--sparse", "-f", "/usr/share/ovirt-engine-appliance/rhvm-appliance-4.3-20200317.0.el7.ova"], "err": "/bin/gtar: images/5e30a8db-2787-421d-b8b6-7b397c3b93c8/85cd81dc-f950-43f8-8456-311ce5bb926b: Wrote only 4096 of 10240 bytes\n/bin/gtar: Exiting with failure status due to previous errors\n", "out": "", "rc": 2}, "gid": 36, "group": "kvm", "handler": "TgzArchive", "mode": "0775", "msg": "failed to unpack /usr/share/ovirt-engine-appliance/rhvm-appliance-4.3-20200317.0.el7.ova to /var/tmp/localvmFj9li4", "owner": "vdsm", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 4096, "src": "/usr/share/ovirt-engine-appliance/rhvm-appliance-4.3-20200317.0.el7.ova", "state": "directory", "uid": 36} ---- Does /var/tmp vs appliance size make sense as extration fails due to not enough space ?