Bug 1731527 - Image volume out of space erroneously reports Permission denied error [NEEDINFO]
Summary: Image volume out of space erroneously reports Permission denied error
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: libvirt
Version: 8.2
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 8.0
Assignee: Michal Privoznik
QA Contact: gaojianan
Depends On:
TreeView+ depends on / blocked
Reported: 2019-07-19 16:20 UTC by Jon Masters
Modified: 2020-01-13 15:25 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-01-13 15:25:34 UTC
Type: Bug
Target Upstream Version:
mprivozn: needinfo? (jcm)
mprivozn: needinfo? (jcm)

Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.