Description of problem:
Deploy HE with nfs storage failed under the [Copy local VM disk to shared storage] task.
From the cockpit, raise the error:
[ INFO ] TASK [Copy local VM disk to shared storage]
[ ERROR ] fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["qemu-img", "convert", "-n", "-O", "raw", "/var/tmp/localvmgSGNOR/images/50755da7-5742-4753-9d26-b862340e7bff/50b84698-99d5-4bd7-a90d-3e15a13ad41c", "/rhev/data-center/mnt/10.66.148.11:_home_yzhao_nfs3/9cd9fa2c-aeec-4104-b700-178e8d13bfa5/images/962e04f4-75b8-4009-80c8-5cf5ec9e63d8/1e745505-d49c-4b91-910a-f4992a39a7b0"], "delta": "0:00:00.188629", "end": "2018-03-26 11:40:56.391288", "msg": "non-zero return code", "rc": 1, "start": "2018-03-26 11:40:56.202659", "stderr": "qemu-img: Could not open '/var/tmp/localvmgSGNOR/images/50755da7-5742-4753-9d26-b862340e7bff/50b84698-99d5-4bd7-a90d-3e15a13ad41c': Failed to get shared \"write\" lock\nIs another process using the image?", "stderr_lines": ["qemu-img: Could not open '/var/tmp/localvmgSGNOR/images/50755da7-5742-4753-9d26-b862340e7bff/50b84698-99d5-4bd7-a90d-3e15a13ad41c': Failed to get shared \"write\" lock", "Is another process using the image?"], "stdout": "", "stdout_lines": []}
Version-Release number of selected component (if applicable):
rhvh-4.2.2.0-0.20180322.0+1
cockpit-ovirt-dashboard-0.11.19-1.el7ev.noarch
ovirt-hosted-engine-setup-2.2.14-1.el7ev.noarch
ovirt-hosted-engine-ha-2.2.7-1.el7ev.noarch
rhvm-appliance-4.2-20180322.0.el7.noarch
How reproducible:
60%
Steps to Reproduce:
1. Deploy HE with NFS storage via cockpit
Actual results:
The same as the description.
Expected results:
Deploy HE successfully
Additional info:
Comment 3Simone Tiraboschi
2018-03-26 12:23:55 UTC
I think it's a duplicate of https://bugzilla.redhat.com/1559750 with additional side effects on RHEL 7.5.
On RHEL 7.5, qemu introduces an additional locking mechanism to prevent also qemu-img to write an image while in use and it's exactly what we got here:
"stderr_lines": ["qemu-img: Could not open '/var/tmp/localvmgSGNOR/images/50755da7-5742-4753-9d26-b862340e7bff/50b84698-99d5-4bd7-a90d-3e15a13ad41c': Failed to get shared \"write\" lock", "Is another process using the image?"]
Due to https://bugzilla.redhat.com/1559750 we could start copying that image while the VM is still running since ansible virt module is basically async.
*** This bug has been marked as a duplicate of bug 1559750 ***