qemu threads should not be counted in libvirt.service tasks limit

Bug #1567381 reported by Dr. Jens Harbott
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

When starting virtual machines under libvirt, the qemu process is accounted for in the TasksAccounting by systemd, see

http://paste.ubuntu.com/15667656/

This should probably not happen, similar to https://bugs.launchpad.net/systemd/+bug/1564451 the proper solution IMHO would be to detach the qemu processes from the libvirt slice.

Otherwise the default limit of 512 tasks will be much too low for a large virtualization server.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libvirt (Ubuntu):
status: New → Confirmed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I assume this won't happen if we use the machinectl interface to start the vms.

Changed in libvirt (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

In my case I'm not starting vms directly, but via OpenStack nova, not sure what happens there in detail and whether that might be a special case. In my current setup, I can start 4 cirros instances and get about 490 out of 512 tasks used, starting a 5th instance fails.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I'm going to work around this for now by setting the limit to infinity. We'll leave this bug open at high priority to properly fix it - by either using machinectl or fixing the manual path, or both.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I've pushed a package (version 1.3.1-1ubuntu9) which works around this by changing /lib/systemd/system/libvirt-bin.service, however it won't hit the archive yet because of a dependency block on zfsutils-linux.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Sorry - so I meant to say that you can work around this the same way, by adding the lines:

LimitNOFILE=infinity
LimitNPROC=infinity
TasksMax=infinity

to the end of the [Service] section in /lib/systemd/system/libvirt-bin.service after package install, then reloading systemctl and restarting systemd.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 1.3.1-1ubuntu9

---------------
libvirt (1.3.1-1ubuntu9) xenial; urgency=medium

  * Remove the tasks limit on libvirt-bin service (LP: #1567381)
    This should be un-done when it is properly fixed in the code so
    that virtual machines are started in their own pids cgroup.

 -- Serge Hallyn <email address hidden> Thu, 07 Apr 2016 10:05:01 -0500

Changed in libvirt (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.