Bug 673025

Summary: RFE: allow renaming of default pool
Product: [Community] Virtualization Tools Reporter: Subhendu Ghosh <sghosh>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: unspecifiedCC: berrange, bsarathy, crobinso, cwei, dallan, dyuan, eblake, fche, ghelleks, jamescape777, jwu, jyang, mzhan, xen-maint, zpeng
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-29 16:29:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 756082    

Description Subhendu Ghosh 2011-01-27 04:34:39 UTC
Description of problem:
Two issues with libvirt's concept of default storage:

1)

/etc/libvirt/storage/default.xml defines the "default" storage pool in libvirt.

When using "virsh pool-delete default" - the running instance of libvirtd does not delete the definition, but does delete the directory (directory based pool)


2) There is no way to define a default storage pool that is called something other than default.

Version-Release number of selected component (if applicable):
libvirt-0.8.1-27.el6.x86_64

How reproducible:

Always:


[root@mcgill /]# virsh pool-list --all
Name                 State      Autostart 
-----------------------------------------
UserVM               active     yes       
default              inactive   yes       

[root@mcgill /]# virsh pool-delete default
Pool default deleted

[root@mcgill /]# virsh pool-list --all
Name                 State      Autostart 
-----------------------------------------
UserVM               active     yes       
default              inactive   yes       

[root@mcgill /]# virsh pool-delete default
error: Failed to delete pool default
error: failed to remove pool '/var/lib/libvirt/images': No such file or directory

[root@mcgill /]# ls /var/lib/libvirt/
boot  lxc  network  qemu
[root@mcgill /]# ls /etc/libvirt/storage/
autostart  default.xml  UserVM.xml




Steps to Reproduce:
1.
2.
3.
  
Actual results:

The XML definition file remains and libvirt attempts to use it.

Expected results:

Along with the directory, the XML definition file should be removed


Additional info:

Comment 1 Osier Yang 2011-01-28 08:21:31 UTC
IMHO this should be WONTFIX, it's by design somehow, if you want to get the XML away, should use "virsh pool-undefine" to undefine it, and if we fix it with invoking "virStoragePoolUndefine" in "virStoragePoolDelete", (is it a good idea? ) the applications which use libvirt storage APIs perhaps will be affected.

Comment 2 Dave Allan 2011-02-10 03:51:06 UTC
Subhendu, this is indeed correct behavior.  pool-delete removes (if possible) the underlying resource for the pool, in your case, the directory.  pool-undefine will remove the pool definition but leave the underlying resource alone.  There actually is no default pool as far as libvirt is concerned.  libvirt will let you undefine all pools.  virt-manager creates the pool called default.  I'm not sure if virt-manager will let you change the name, but I change what it points to on my system.  Cole can the default pool be renamed?

Comment 3 Cole Robinson 2011-02-10 14:59:26 UTC
There isn't any way to tell virt-manager to not use the pool named 'default'. You can create any pool you want named 'default' and virt-manager will use it though. It should be configurable though.

Comment 4 Dave Allan 2011-02-10 17:05:03 UTC
I've moved it to virt-manager as an RFE to allow the default pool to be renamed.

Comment 5 Suzanne Logcher 2011-03-28 20:29:15 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains 
unresolved, it has been rejected as it is not proposed as an 
exception or blocker.  It has been moved to RHEL 6.2 since 
it is a FutureFeature request.

Comment 9 Cole Robinson 2011-09-27 15:24:46 UTC
Not done upstream yet and would be an non-trivial backport, so deferring to 6.3

Comment 14 Cole Robinson 2012-01-17 22:52:46 UTC
*** Bug 649373 has been marked as a duplicate of this bug. ***

Comment 15 Cole Robinson 2013-09-29 16:29:49 UTC
Upstream now allows you to rename existing pools, so if you wanted to use a new pool as 'default', just rename it to 'default'.

While 'default' isn't really descriptive, it's been in use for a while now, and wiring up virt-manager to use a different named pool as the default storage location is more work than it's worth IMO since it's just cosmetic.