Bug 1731527

Summary: Image volume out of space erroneously reports Permission denied error
Product: Red Hat Enterprise Linux 8 Reporter: Jon Masters <jcm>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED INSUFFICIENT_DATA QA Contact: gaojianan <jgao>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: rbalakri, yalzhang
Target Milestone: rcFlags: mprivozn: needinfo? (jcm)
mprivozn: needinfo? (jcm)
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-13 15:25:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jon Masters 2019-07-19 16:20:49 UTC
If the images volume is out of space, "virsh start" will fail with "Permission denied". This is because it is unable to restore the context on the underlying image file. The reason for that is that the volume is out of space. Libvirt should correctly report to the admin the actual problem.

Here's the output:

error: Failed to start domain fedora30-arm-1
error: internal error: process exited while connecting to monitor: 2019-07-19 16:16:37.848+0000: Domain id=2 is tainted: host-cpu
2019-07-19T16:16:37.936692Z qemu-kvm: -drive file=/var/lib/libvirt/images/f30-armhfp-1.raw,format=raw,if=none,id=drive-virtio-disk0: Could not open '/var/lib/libvirt/images/f30-armhfp-1.raw': Permission denied

The output should be:

"Unable to start domain fedora30-arm-1 due to image volume out of space"


Comment 1 Michal Privoznik 2019-08-07 15:34:46 UTC
I'm inclined to close this, because libvirt does not inspect storage in any way. It can't possibly know that ENOSPC happened in QEMU. However, EPERM is the interesting part here. If there's not space at /var/lib/libvirt/images so that libvirt fails to relabel a file there then it should not continue and start qemu. What is the libvirt version please?

Comment 2 Michal Privoznik 2019-09-13 07:47:58 UTC

Comment 3 Michal Privoznik 2020-01-13 15:25:34 UTC
As suggested earlier, I am closing this. If you think this should be fixed please reply with the reasoning and libvirt version you encounter this problem with. Attaching debug logs is a big plus.