Bug 509306
Summary: | virsh vol-path and vol-delete commands don't support "name" parameter | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Alex Jia <ajia> |
Component: | libvirt | Assignee: | Dave Allan <dallan> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 5.4 | CC: | gren, hbrock, jialiu, veillard, virt-maint, xen-maint, yoyzhang |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-03-30 08:10:44 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Alex Jia
2009-07-02 05:49:55 UTC
[root@dhcp-66-70-18 ~]# uname -a Linux dhcp-66-70-18.nay.redhat.com 2.6.18-156.el5xen #1 SMP Mon Jun 29 18:24:43 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux [root@dhcp-66-70-18 ~]# rpm -qa|grep libvirt libvirt-0.6.3-13.el5 libvirt-debuginfo-0.6.3-12.el5 libvirt-python-0.6.3-13.el5 libvirt-devel-0.6.3-13.el5 virsh vol-delete commands support "name" parameter,we need to add "pool" optons such as: [root@dhcp-66-70-18 ~]# virsh vol-delete --pool nfspool virtimage Vol virtimage deleted I don't think this should go into 5.4 at this point in the release. Patch posted upstream at: https://www.redhat.com/archives/libvir-list/2009-December/msg00278.html applies cleanly. RHEL5.5 behavior is identical to upstream head. libvirt-0.6.3-25.el5 has been built in dist-5E-qu-candidate with the fix, Daniel 1. [root@dhcp-66-70-91 xml]# virsh vol-list nfspool Name Path ----------------------------------------- fedora11.img /var/lib/libvirt/images/fedora11.img rhel5u4_x86_64_kvm.img /var/lib/libvirt/images/rhel5u4_x86_64_kvm.img virtimage /var/lib/libvirt/images/virtimage 2. [root@dhcp-66-70-91 xml]# virsh help vol-path NAME vol-path - convert a vol UUID to vol path SYNOPSIS vol-path [--pool <string>] <vol> OPTIONS --pool <string> pool name or uuid <vol> vol name or key 3. [root@dhcp-66-70-91 xml]# virsh vol-path virtimage error: failed to get vol 'virtimage' error: invalid storage volume pointer in no storage vol with matching path 4. [root@dhcp-66-70-91 xml]# virsh help vol-delete NAME vol-delete - delete a vol SYNOPSIS vol-delete [--pool <string>] <vol> DESCRIPTION Delete a given vol. OPTIONS --pool <string> pool name or uuid <vol> vol name, key or path 5. [root@dhcp-66-70-91 xml]# virsh vol-delete virtimage error: failed to get vol 'virtimage' error: invalid storage volume pointer in no storage vol with matching path Additional information: [root@dhcp-66-70-91 xml]# uname -a Linux dhcp-66-70-91.nay.redhat.com 2.6.18-164.el5xen #1 SMP Tue Aug 18 15:59:52 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux [root@dhcp-66-70-91 xml]# rpm -qa|grep libvirt libvirt-debuginfo-0.6.3-25.el5 libvirt-0.6.3-25.el5 libvirt-python-0.6.3-25.el5 You have to specify the --pool <name of pool> argument if you specify the volume by name. Volume names are only unique within a pool. This bug has been verified with libvirt 0.6.3-25.el5 on RHEL-5.4.but I haven't permission change bug status to verified now.I will change bug statUs to 'VERIFIED' if I have. In addition, vol-delete operation led to libvirt daemon dead, I need to report a new bug. [root@dhcp-66-70-91 libvirt]# virsh pool-create pool-dir.xml Pool dirpool created from pool-dir.xml [root@dhcp-66-70-91 libvirt]# virsh vol-create dirpool vol.xml Vol virtimage created from vol.xml [root@dhcp-66-70-91 libvirt]# virsh vol-list dirpool Name Path ----------------------------------------- virtimage /var/lib/libvirt/images/virtimage [root@dhcp-66-70-91 libvirt]# virsh vol-path --pool dirpool virtimage /var/lib/libvirt/images/virtimage [root@dhcp-66-70-91 libvirt]# virsh vol-delete --pool dirpool virtimage error: Failed to delete vol virtimage error: server closed connection [root@dhcp-66-70-91 libvirt]# service libvirtd status libvirtd dead but pid file exists Addition information: 1.pool-dir.xml <pool type="dir"> <name>dirpool</name> <target> <path>/var/lib/libvirt/images</path> </target> </pool> 2.vol.xml <volume> <name>virtimage</name> <key>/var/lib/virt/images/virtimage</key> <source> </source> <capacity>10737418240</capacity> <allocation>142512128</allocation> <target> <path>/var/lib/virt/images/virtimage</path> <format type='raw'/> <permissions> <mode>0600</mode> <owner>0</owner> <group>0</group> <label>system_u:object_r:nfs_t</label> </permissions> </target> </volume> *** Bug 530990 has been marked as a duplicate of this bug. *** This bug has been verified with libvirt 0.6.3-25.el5 on RHEL-5.5.Already fixed, set status to VERIFIED. Version-Release number of selected component (if applicable): [root@dhcp-66-70-62 bug]# uname -a Linux dhcp-66-70-62.nay.redhat.com 2.6.18-183.el5xen #1 SMP Mon Dec 21 18:46:14 EST 2009 x86_64 x86_64 x86_64 GNU/Linux [root@dhcp-66-70-62 bug]# rpm -qa|grep libvirt libvirt-0.6.3-25.el5 libvirt-python-0.6.3-25.el5 libvirt-debuginfo-0.6.3-25.el5 [root@dhcp-66-70-62 bug]# rpm -qa|grep xen xen-libs-3.0.3-102.el5 xen-devel-3.0.3-102.el5 kmod-gnbd-xen-0.1.5-2.el5 kmod-gfs-xen-0.1.34-9.el5 xen-3.0.3-102.el5 xen-libs-3.0.3-102.el5 kernel-xen-2.6.18-183.el5 kmod-cmirror-xen-0.1.22-3.el5 Steps to Reproduce: [root@dhcp-66-70-62 ~]# cat pool-dir.xml <pool type="dir"> <name>dirpool</name> <target> <path>/var/lib/xen/images</path> </target> </pool> [root@dhcp-66-70-62 ~]# cat vol.xml <volume> <name>virtimage</name> <key>/var/lib/xen/images/virtimage</key> <source> </source> <capacity>10737418240</capacity> <allocation>142512128</allocation> <target> <path>/var/lib/xen/images/virtimage</path> <format type='raw'/> <permissions> <mode>0600</mode> <owner>0</owner> <group>0</group> <label>system_u:object_r:nfs_t</label> </permissions> </target> </volume> [root@dhcp-66-70-62 ~]# virsh pool-list --all Name State Autostart ----------------------------------------- [root@dhcp-66-70-62 ~]# virsh pool-create pool-dir.xml Pool dirpool created from pool-dir.xml [root@dhcp-66-70-62 ~]# virsh pool-list --allName State Autostart ----------------------------------------- dirpool active no [root@dhcp-66-70-62 ~]# virsh vol-create dirpool vol.xml Vol virtimage created from vol.xml [root@dhcp-66-70-62 ~]# virsh vol-list dirpool Name Path ----------------------------------------- rhel5u5_x86_64_xenfv.img /var/lib/xen/images/rhel5u5_x86_64_xenfv.img rhel5u5_x86_64_xenpv.img /var/lib/xen/images/rhel5u5_x86_64_xenpv.img virtimage /var/lib/xen/images/virtimage [root@dhcp-66-70-62 ~]# virsh vol-path --pool dirpool virtimage /var/lib/xen/images/virtimage [root@dhcp-66-70-62 ~]# virsh vol-delete --pool dirpool virtimage error: Failed to delete vol virtimage error: server closed connection Libvirtd is hang by 'virsh vol-delete',this is a another bug: https://bugzilla.redhat.com/show_bug.cgi?id=510450 An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2010-0205.html |