LimitNOFILE and LimitNPROC not being observed

Bug #1521980 reported by James Page
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The lxd systemd service file sets:

LimitNOFILE=-1
LimitNPROC=-1

However, on a Xenial install, I still see the standard limits being set of 1024 and 4096 on the LXD process; this causes a juju bootstrap using the new LXD provider in 1.26alpha2 to fail, as the MongoDB instance it runs tries to hike the file and process limits up and can't.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: lxd 0.23-0ubuntu2 [modified: lib/systemd/system/lxd.service]
ProcVersionSignature: Ubuntu 4.2.0-19.23-generic 4.2.6
Uname: Linux 4.2.0-19-generic x86_64
ApportVersion: 2.19.2-0ubuntu8
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Dec 2 11:33:54 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-11-25 (371 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Alpha amd64 (20141124)
SourcePackage: lxd
UpgradeStatus: Upgraded to xenial on 2015-11-02 (30 days ago)

Revision history for this message
James Page (james-page) wrote :
Revision history for this message
Stéphane Graber (stgraber) wrote :

Hi James,

Instead of -1, can you set the string "infinity" and see if that does the trick (you'll need to stop all lxd units, do a daemon reload and then start them again).

Revision history for this message
Stéphane Graber (stgraber) wrote :

root@castiana:~# cat /proc/2054/limits | egrep "Max proces|Max open"
Max processes unlimited unlimited processes
Max open files 65536 65536 files

Does appear to do the trick here, adding this to the packaging branch.

Changed in lxd (Ubuntu):
status: New → Fix Committed
Revision history for this message
Stéphane Graber (stgraber) wrote :

Uploaded

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

This bug was fixed in the package lxd - 0.23-0ubuntu3

---------------
lxd (0.23-0ubuntu3) xenial; urgency=medium

  * Fix systemd resource limits. (LP: #1521980)

 -- Stéphane Graber <email address hidden> Wed, 02 Dec 2015 12:34:14 -0500

Changed in lxd (Ubuntu):
status: Fix Committed → 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.