Bug 1103308 - ignore storage volumes in directory pools that libvirtd lacks permissions to open
Summary: ignore storage volumes in directory pools that libvirtd lacks permissions to ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 21
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-30 17:06 UTC by Brian Lane
Modified: 2015-07-29 08:41 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-05 23:01:26 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1095786 unspecified CLOSED Could not start storage pool: cannot open volume '/var/lib/libvirt/images/lost+found': Permission denied 2021-01-20 06:05:38 UTC

Internal Links: 1095786

Description Brian Lane 2014-05-30 17:06:47 UTC
Description of problem:
I can no longer use /tmp/ to hold the target disk image. This used to work, but I am not sure what the working NVRs are.


Version-Release number of selected component (if applicable):
virt-install-1.0.1-3.fc20.noarch

How reproducible:
Every time

Steps to Reproduce:
1. virt-install -n temptest -r 2048 --noautoconsole --graphics vnc --disk path=/tmp/diskIPGADE.img,format=raw,size=5 --cdrom ~/isos/Fedora-20-x86_64-netinst.iso

Actual results:
ERROR    Error: --disk path=/tmp/diskIPGADE.img,format=raw,size=5: Could not start storage pool: cannot open volume '/tmp/atop.d': Permission denied

If I put the image on /var/tmp it runs fine.

Comment 1 Cole Robinson 2014-05-31 20:50:31 UTC
Latest virt-install will always try to create a libvirt storage pool for the disk image parent directory, so we can ask libvirt to do any storage creation or probing and not have to duplicate that logic.

However libvirt falls over if it doesn't have permissions for any file in that directory. Most users aren't likely to hit this with /tmp since they use the system libvirtd instance which runs as root, but you are using the user session.

IMO libvirt should just not track any volumes that it can't access for directory pools, reassigning

Comment 2 Fabian Deutsch 2014-07-02 16:27:07 UTC
Hey,

we - as a consumer of livemedia-creator / lorax - now run into this issue when we try to do out-of-/tmp builds.

Is there maybe a workaround or some progress on this?

We try to migrate away from livecd-tools, which makes us rely on livemedia-creator, it would be kind if this bug could be addressed.

Comment 4 Fabian Deutsch 2014-08-14 14:31:25 UTC
Sorry, wrong person to ask :)

Comment 5 Fabian Deutsch 2014-09-25 06:48:31 UTC
Ping?

This is preventing libvirt from beeing used in our CI setup.

Comment 6 Cole Robinson 2014-09-25 11:52:34 UTC
Fabian, does livemedia-creator use virt-install or something? I wonder what is creating the storage pool.

Can you provide the full command you are using that hits this issue, and the error output? I might be able to suggest a workaround

Also I'll try to find time to look into a proper fix over the next couple weeks

Comment 7 Fabian Deutsch 2014-09-29 06:29:40 UTC
Hey Cole, yes it is using virt-install.
And the commandline I am using is along these lines:

$ livemedia-creator --make-disk --ks my.ks --iso boot.iso

Comment 8 Brian Lane 2014-09-29 16:23:24 UTC
Also note that you have to run it as root since it needs to be able to mount filesystems, so this shouldn't be a user session problem. I simplified the problem in comment #1

What I think it boils down to is that it shouldn't even be trying to touch those other files when you've given it a path to a disk image.

Comment 9 Cole Robinson 2015-04-25 01:35:55 UTC
Sorry for never getting around to this. I'll post libvirt patches next week and get them into f21+

Comment 10 Cole Robinson 2015-04-27 15:59:10 UTC
Patch posted upstream:

https://www.redhat.com/archives/libvir-list/2015-April/msg01375.html

Comment 11 Fabian Deutsch 2015-04-28 08:41:43 UTC
Yey, I'm looking forward!

Comment 12 Fedora Update System 2015-04-28 16:55:13 UTC
libvirt-1.2.9.3-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/libvirt-1.2.9.3-1.fc21

Comment 13 Fedora Update System 2015-04-29 13:06:20 UTC
Package libvirt-1.2.9.3-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libvirt-1.2.9.3-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-7150/libvirt-1.2.9.3-1.fc21
then log in and leave karma (feedback).


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