Merge lp:~jamesodhunt/upstart/bug-1357252 into lp:upstart
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 1661 | ||||
Proposed branch: | lp:~jamesodhunt/upstart/bug-1357252 | ||||
Merge into: | lp:upstart | ||||
Diff against target: |
503 lines (+287/-55) 8 files modified
ChangeLog (+21/-0) init/cgroup.c (+56/-53) init/cgroup.h (+2/-0) init/job.c (+30/-0) init/job.h (+7/-0) init/job_process.c (+15/-1) init/job_process.h (+2/-1) init/tests/test_job.c (+154/-0) |
||||
To merge this branch: | bzr merge lp:~jamesodhunt/upstart/bug-1357252 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stéphane Graber (community) | Approve | ||
Review via email: mp+232680@code.launchpad.net |
Description of the change
* init/cgroup.c:
- Removed nih_debug() and nih_warn() calls since, although
useful, this output pollutes job logs when running in debug mode.
- cgroup_clear(): New function to request cgroups be removed.
- cgroup_create(): Don't mark cgroups 'remove-on-empty' since Upstart
can race with cgmanager.
* init/job.c: job_last_process(): New helper function.
* init/job_process.c:
- job_process_
cgroup manager destroy all job cgroups after upstart has created
required cgroups for last job process which avoids the
'remove-
- job_process_
JOB_
* init/job_process.h: JobProcessError
JOB_PROCESS_
* init/tests/
job_last_
I suspect there may be some unwanted complications when two jobs share the same cgroup depending on the order they each move between states, but I guess it's a tiny tiny corner case.
The current fix seems sane.