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

Nikunj A Dadhania nikunj at linux.vnet.ibm.com
Wed Aug 12 05:39:12 UTC 2015


Hi Daniel,

"Daniel P. Berrange" <berrange at redhat.com> 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 at linux.vnet.ibm.com>
>
> 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
   
3) libvirt created /machine
   As this was created manually by libvirt, should we delete it here in
   libvirt daemon

Regards,
Nikunj




More information about the libvir-list mailing list