[libvirt] Incomplete cleanup in storage backend for physical disks?

Hi all, I have some questions related to the storage backend for physical disks. If I try to create a new storage pool connected to a physical disk that doesn't have a partition table I get the following error messages: error: Failed to create pool from /root/physical_disk_pool.xml error: internal error non-zero exit status from command 2 However, the pool is still exists in inactive state. If I check the code some part of the pool is freed: cleanup: virStoragePoolDefFree(def); if (pool) { virStoragePoolObjUnlock(pool); } storageDriverUnlock(driver); return ret; but not the pool object itself. It feels like I end up with an non-complete pool. What is the story here, shouldn't the pool object also be freed in this case? And what is the suggested to create and start up a storage pool connected to a physical disk that doesn't have a partition table yet? Regards, Henrik

On Wed, May 20, 2009 at 04:38:08PM +0200, Henrik Persson E wrote:
Hi all,
I have some questions related to the storage backend for physical disks. If I try to create a new storage pool connected to a physical disk that doesn't have a partition table I get the following error messages: error: Failed to create pool from /root/physical_disk_pool.xml error: internal error non-zero exit status from command 2
However, the pool is still exists in inactive state. If I check the code some part of the pool is freed:
cleanup: virStoragePoolDefFree(def); if (pool) { virStoragePoolObjUnlock(pool); } storageDriverUnlock(driver); return ret;
but not the pool object itself. It feels like I end up with an non-complete pool. What is the story here, shouldn't the pool object also be freed in this case?
Yes, it appears to be missing a call to virStoragePoolObjRemove(&driver->pools, pool); in the failure case. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
participants (2)
-
Daniel P. Berrange
-
Henrik Persson E