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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]