init: support default "limit"s for jobs

Bug #282854 reported by Angus Salkeld on 2008-10-13
This bug affects 4 people
Affects Status Importance Assigned to Milestone

Bug Description

If I want to set global ulimit settings I currently have to edit all my jobs.

This is a pain for thinks like enabling core dumps.

Can we have one place to change the global defaults, whilst still allowing
individual jobs to override these settings?

Changed in upstart:
importance: Undecided → Wishlist
status: New → Confirmed

Default environment, nice, umask, etc too?

Need to think about relationship with PAM

 - arguably PAM supplies defaults for login environments, upstart could provide defaults for services (which happens to include the login services before the PAM session is activated)

Changed in upstart:
status: Confirmed → Triaged
summary: - There is no way of globally changing the "limit" settings
+ init: support default "limit"s for jobs
James Hunt (jamesodhunt) wrote :

This would indeed be a useful feature.

However, as Scott says, the scope of the patch is too limited right now though since if we allow 'limit' to be used globally, we should also allow the following stanzas in /etc/init.conf:

- env
- export
- console
- umask
- nice
- oom
- chroot
- chdir
- limit
- kill
- kill timeout

Adding support for these stanzas "piecemeal" is not a good idea IMHO since it would frustrate/confuse users expecting all/most of the currently supported stanzas to work in /etc/init.conf.

There is also the matter of adding support to handle /etc/init.override for all of the above.

Further, we would need:

- a full set of tests for all of the above.
- an update to the init.5 man page.

Also, we would need to consider how /etc/init.conf would work from the perspective of user sessions. Finally, we need to decide the precedence of entries in /etc/init.conf versus specifying a default on the init command line (the latter should probably take priority).

Angus Salkeld (asalkeld) wrote :

This is a seriously old bug - I don't need this functionality anymore and
won't be doing any more work on it. If you want you can close it.


To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers