Re: [PATCH] util: Remove empty resource partition created by libvirt

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

 



"Daniel P. Berrange" <berrange@xxxxxxxxxx> writes:

> On Wed, Aug 12, 2015 at 11:09:12AM +0530, Nikunj A Dadhania wrote:
>> 
>> Hi Daniel,
>> 
>> "Daniel P. Berrange" <berrange@xxxxxxxxxx> writes:
>> > On Tue, Aug 11, 2015 at 04:57:15PM +0530, Nikunj A Dadhania wrote:
>> >> The default resource partition is created in the domain start path if it
>> >> is not existing. Even when libvirtd is stopped after shutting down all
>> >> domains, the resource partition still exists.
>> >> 
>> >> The patch adds code to removes the default resource partition in the
>> >> cgroup removal path of the domain. If the default resource partition is
>> >> found to have no child cgroup, the default resource partition will be
>> >> removed.
>> >> 
>> >> Moreover, the code does not remove the user provided resource
>> >> partitions.
>> >> 
>> >> Signed-off-by: Nikunj A Dadhania <nikunj@xxxxxxxxxxxxxxxxxx>
>> >
>> > I don't think we want to be doing this. In non-systemd hosts this will
>> > be deleting the heirarchy that the sysadmin manually pre-created for
>> > their VMs.  In a systemd host it will also end up deleting slices that
>> > were created by systemd.
>> 
>> AFAIU, there are three cases here:
>> 
>> 1) User created resource partition, for example /production/foo
>>    As this is created by user, we should not touch them. And my patch
>>    does not remove them
>>    
>> 2) systemd created /machine.slice
>>    If not libvirt, should systemd clean this up when the libvirtd
>>    service is stopped ?
>> 
>>    Currently, my patch does remove this when its found empty
>
> It isn't libvirtd's job to delete /machine.slice - systemd will
> periodically prune empty slices itself.

Let me check that, did not see this happening.

>> 3) libvirt created /machine
>>    As this was created manually by libvirt, should we delete it here in
>>    libvirt daemon
>
> No, you can't assume /machine is created by libvirtd - it could have
> been created by the user, just like case 3.

Did you mean case 1 here?

Regards,
Nikunj

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