[libvirt] [PATCH] Fixed documentation for destroy storage pool

Francesc Guasch frankie at telecos.upc.edu
Fri Jan 5 08:47:51 UTC 2018

On 03/01/18 10:47, Erik Skultety wrote:
> On Sat, Dec 30, 2017 at 09:15:34AM +0100, frankie at telecos.upc.edu wrote:
>> From: Francesc Guasch <frankie at telecos.upc.edu>
>> diff --git a/lib/Sys/Virt/StoragePool.pm b/lib/Sys/Virt/StoragePool.pm
>> index 0bc1d50..2ba5101 100644
>> --- a/lib/Sys/Virt/StoragePool.pm
>> +++ b/lib/Sys/Virt/StoragePool.pm
>> @@ -115,14 +115,11 @@ C<define_storage_pool> method in L<Sys::Virt>.
>>   Remove the configuration associated with a storage pool previously defined
>>   with the C<define_storage pool> method in L<Sys::Virt>. If the storage pool is
>> -running, you probably want to use the C<shutdown> or C<destroy>
>> -methods instead.
>> +running, you probably want to use the C<destroy> method instead.
> If you want to make the pool unmanaged by libvirt, destroy doesn't help at
> all since it would only stop a running pool, but wouldn't undefine it.
> Therefore, we should either omit the sentence completely or use something like
> this: 'Calling C<undefine> on a running pool makes it transient, thus leaving
> the underlying object intact, so if object discard is desired, C<destroy> should
> be called first.'

Good point. But I use destroy to set the storage pool inactive, it works 
for me.

> However, truth to be told, even my suggested sentence isn't correct, since
> undefine on running pools results in an error - we need to fix that since it
> should behave the same way as domains and make them transient. Maybe we can
> drop the additional sentence now and update it later when things work the
> expected way.

My initial concern was that shutdown is not in the Storage Pool API. 
Only destroy can be used. I guess it got pasted from the Domain module.

More information about the libvir-list mailing list