Bug 1244080
Summary: | Fail to create dir pool from virt-manager when the target path already exist | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | tingting zheng <tzheng> |
Component: | libvirt | Assignee: | John Ferlan <jferlan> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.2 | CC: | cfergeau, dyuan, jferlan, juzhou, mzhan, rbalakri, xiaodwan, xuzhang, yanyang, yisun |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.17-3.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 06:48:05 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: | |
Embargoed: |
Description
tingting zheng
2015-07-17 03:35:22 UTC
https://www.redhat.com/archives/libvir-list/2015-July/msg00627.html should hopefully fix that. A patch was pushed upstream: $ git show 60d5ed8c520462fd8fbc2d8dfac7b7c16ae5eb51 commit 60d5ed8c520462fd8fbc2d8dfac7b7c16ae5eb51 Author: Christophe Fergeau <cfergeau> Date: Fri Jul 17 10:02:20 2015 +0200 storage: Fix pool building when directory already exists Currently, when trying to virsh pool-define/virsh pool-build a new 'dir' pool, if the target directory already exists, virsh pool-build/virStoragePoolBuild will error out. This is a change of behaviour compared to eg libvirt 1.2.13 This is caused by the wrong type being used for the dir_create_flags variable in virStorageBackendFileSystemBuild , it's defined as a bool but is used as a flag bit field so should be unsigned int (this matches the type virDirCreate expects for this variable). This should fix https://bugzilla.gnome.org/show_bug.cgi?id=752417 (GNOME Boxes) and https://bugzilla.redhat.com/show_bug.cgi?id=1244080 (downstream virt-manager). $ git describe 60d5ed8c520462fd8fbc2d8dfac7b7c16ae5eb51 v1.2.17-124-g60d5ed8 $ test on: libvirt-1.2.17-6.el7.x86_64 virt-manager-1.2.1-6.el7 VERIFIED. Steps: pure libvirt: 1. # cat dir.pool <pool type='dir'> <name>test</name> <source> </source> <target> <path>/var/lib/libvirt/images/</path> <permissions> <mode>0711</mode> <owner>0</owner> <group>0</group> </permissions> </target> </pool> 2. # ll /var/lib/libvirt/images total 3649748 -rw-r--r--. 1 qemu qemu 197120 Aug 5 16:14 1.qcow2 -rw-r--r--. 1 root root 1048576 Aug 19 21:25 cdrom.img 3. # virsh pool-define dir.pool Pool test defined from dir.pool 4. # virsh pool-build test Pool test built 5. # virsh pool-start test Pool test started 6. # virsh vol-list test Name Path ------------------------------------------------------------------------------ 1.qcow2 /var/lib/libvirt/images/1.qcow2 cdrom.img /var/lib/libvirt/images/cdrom.img virt-manager: 1.Create a directory,/mnt 2.Click "Add Pool" button during creating new VM 3.Target path set to "/mnt" 4.Click OK and pool successfully created. 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, 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://rhn.redhat.com/errata/RHBA-2015-2202.html |